/* self-hosted fonts */
@font-face {
    font-family: 'Spectral';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/spectral-latin-400-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Spectral';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/assets/fonts/spectral-latin-500-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Spectral';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/spectral-latin-600-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Spectral';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/spectral-latin-700-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-sans-latin-700-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Spectral';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/spectral-latin-400-italic.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Sans Devanagari';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-sans-devanagari-devanagari-400-normal.woff2') format('woff2');
    unicode-range: U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B09;
}

@font-face {
    font-family: 'IBM Plex Sans Devanagari';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-sans-devanagari-devanagari-500-normal.woff2') format('woff2');
    unicode-range: U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B09;
}

@font-face {
    font-family: 'IBM Plex Sans Devanagari';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-sans-devanagari-devanagari-600-normal.woff2') format('woff2');
    unicode-range: U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B09;
}

@font-face {
    font-family: 'Tiro Devanagari Marathi';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/tiro-devanagari-marathi-devanagari-400-normal.woff2') format('woff2');
    unicode-range: U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+25CC,U+A830-A839,U+A8E0-A8FF;
}

/* ============ TOKENS ============ */
/* ============ COLOUR TOKENS: Indigo & Saffron (approved by the University, Oct 2026) ============
   --primary = indigo, --accent = saffron, --neutral = muted indigo-grey for table headers. */
:root {
    --ink: #17162a;
    --ink-soft: #302f48;
    --muted: #615f7a;
    --faint: #8d8ba3;
    --primary: #2f2a6e;
    --primary-deep: #1d1a4b;
    --primary-tint: #e7e6f5;
    --accent: #f0a02e;
    --accent-deep: #a35c06;
    --accent-tint: #fcefdc;
    --header: #e8e7f4;
    --neutral: #5d5a88;
    --neutral-tint: #ecebf5;
    --footer: #181540;
    --paper: #fafafd;
    --surface: #ffffff;
    --surface-2: #f3f3f9;
    --line: #e3e2ef;
    --line-strong: #d0cfe2;
    --chip-line: #d2cfee;
}

:root {
    --ok: #2f6b3a;
    --ok-tint: #e8f1e9;
    --radius: 10px;
    --radius-sm: 7px;
    --shadow: 0 1px 2px rgba(28,27,25,.05), 0 8px 26px -14px rgba(28,27,25,.25);
    --shadow-soft: 0 1px 2px rgba(28,27,25,.05);
    --wrap: 1220px;
    --serif: "Spectral",Georgia,serif;
    --sans: "IBM Plex Sans","IBM Plex Sans Devanagari",system-ui,Segoe UI,Roboto,sans-serif;
    --dev: "IBM Plex Sans Devanagari","IBM Plex Sans",sans-serif;
    color-scheme: light;
}

* {
    box-sizing: border-box
}

html, body {
    margin: 0;
    padding: 0
}

html {
    overflow-x: clip
}

:root {
    padding-top: env(safe-area-inset-top,0px)
}

html {
    scroll-padding-top: calc(118px + env(safe-area-inset-top,0px))
}

body {
    font-family: var(--sans);
    color: var(--ink);
    background: var(--paper);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2 {
    font-family: var(--serif);
    font-weight: 600;
    line-height: 1.18;
    margin: 0;
    letter-spacing: -.01em;
    color: var(--ink)
}

a {
    color: inherit;
    text-decoration: none
}

button {
    font-family: inherit
}

img {
    max-width: 100%
}

.wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 28px
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 3px
}

@media (prefers-reduced-motion:reduce) {
    * {
        transition: none !important;
        animation: none !important
    }
}

/* top safe-area fill under translucent system bars */
body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto;
    height: env(safe-area-inset-top,0px);
    background: var(--primary);
    z-index: 60
}

/* ============ BUTTONS / BITS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: var(--surface);
    color: var(--ink);
    transition: background .15s,border-color .15s,color .15s
}

    .btn.primary {
        background: var(--primary);
        color: #fff
    }

        .btn.primary:hover {
            background: var(--primary-deep)
        }

    .btn.ghost {
        background: transparent;
        border-color: var(--line-strong);
        color: var(--ink-soft)
    }

        .btn.ghost:hover {
            border-color: var(--primary);
            color: var(--primary)
        }

    .btn.small {
        padding: 7px 13px;
        font-size: 13px
    }

.lnk {
    color: var(--primary);
    font-weight: 600;
    cursor: pointer
}

    .lnk:hover {
        color: var(--primary-deep);
        text-decoration: underline;
        text-underline-offset: 3px
    }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    padding: 3px 9px;
    border-radius: 100px;
    border: 1px solid var(--line-strong);
    color: var(--muted);
    background: var(--surface)
}

    .pill.type {
        color: var(--primary);
        border-color: var(--chip-line);
        background: var(--primary-tint)
    }

.icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round
}

.iconbtn {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
    position: relative
}

    .iconbtn:hover {
        background: var(--primary-tint);
        color: var(--primary)
    }

.eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent-deep);
    font-family: var(--sans)
}

.dev {
    font-family: var(--dev)
}

/* ============ HEADER ============ */
header.site {
    position: sticky;
    top: env(safe-area-inset-top,0px);
    z-index: 50;
    background: var(--header);
    border-bottom: 1px solid var(--line-strong)
}

.mainbar .wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 82px
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    flex: 0 0 auto
}

    .brand img {
        height: 52px;
        width: auto;
        display: block
    }

    .brand .wm {
        line-height: 1.05
    }

        .brand .wm .t1 {
            font-family: var(--serif);
            font-size: 21px;
            font-weight: 600;
            color: var(--ink)
        }

        .brand .wm .t2 {
            font-size: 11.5px;
            font-weight: 600;
            letter-spacing: .18em;
            text-transform: uppercase;
            color: var(--primary);
            margin-top: 3px
        }

.hsearch {
    flex: 1 1 auto;
    max-width: 460px;
    position: relative;
    margin-left: 4px
}

    .hsearch svg {
        position: absolute;
        left: 13px;
        top: 50%;
        transform: translateY(-50%);
        width: 18px;
        height: 18px;
        stroke: var(--faint);
        fill: none;
        stroke-width: 1.8
    }

    .hsearch input {
        width: 100%;
        height: 44px;
        border: 1px solid var(--line-strong);
        border-radius: 8px;
        background: var(--surface);
        padding: 0 14px 0 40px;
        font-size: 14px;
        font-family: inherit;
        color: var(--ink)
    }

        .hsearch input:focus {
            background: #fff;
            border-color: var(--primary);
            outline: none
        }

.topnav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto
}

    .topnav .navlink {
        padding: 9px 13px;
        font-size: 14px;
        font-weight: 600;
        color: var(--ink-soft);
        border-radius: 7px;
        cursor: pointer;
        position: relative
    }

        .topnav .navlink:hover {
            color: var(--primary)
        }

        .topnav .navlink.active {
            color: var(--primary)
        }

            .topnav .navlink.active::after {
                content: "";
                position: absolute;
                left: 13px;
                right: 13px;
                bottom: 2px;
                height: 2px;
                background: var(--accent);
                border-radius: 2px
            }

.hsep {
    width: 1px;
    height: 26px;
    background: var(--line);
    margin: 0 6px
}

.acct {
    position: relative
}

    .acct .avatar {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: var(--primary);
        color: #fff;
        display: grid;
        place-items: center;
        font-weight: 600;
        font-size: 13px;
        cursor: pointer;
        border: none
    }

.menu {
    position: absolute;
    right: 0;
    top: 46px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
    min-width: 216px;
    padding: 6px;
    display: none;
    z-index: 70
}

    .menu.open {
        display: block
    }

    .menu .who {
        padding: 10px 12px 8px;
        border-bottom: 1px solid var(--line);
        margin-bottom: 4px
    }

        .menu .who b {
            display: block;
            font-size: 14px
        }

        .menu .who span {
            font-size: 12px;
            color: var(--muted)
        }

    .menu a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 9px 12px;
        border-radius: 7px;
        font-size: 14px;
        font-weight: 500;
        color: var(--ink-soft);
        cursor: pointer
    }

        .menu a:hover {
            background: var(--surface-2);
            color: var(--primary)
        }

        .menu a .icon {
            width: 17px;
            height: 17px
        }

    .menu .div {
        height: 1px;
        background: var(--line);
        margin: 4px 0
    }

.burger {
    display: none
}

/* ============ PAGE SHELL ============ */
main {
    min-height: 60vh
}

.page {
    display: none
}

    .page.active {
        display: block;
        animation: fade .25s ease
    }

@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(4px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.section {
    padding: 56px 0
}

.crumb {
    font-size: 13px;
    color: var(--muted);
    padding: 16px 0 0
}

    .crumb a {
        cursor: pointer
    }

        .crumb a:hover {
            color: var(--primary)
        }

    .crumb .sep {
        margin: 0 8px;
        color: var(--line-strong)
    }

    .crumb b {
        color: var(--ink);
        font-weight: 600
    }

.sechead {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px
}

    .sechead h2 {
        font-size: 27px
    }

    .sechead .sub {
        color: var(--muted);
        font-size: 14px;
        margin-top: 5px
    }

/* ============ HOME HERO ============ */
.hero {
    position: relative;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    overflow: hidden
}

    .hero .wrap {
        position: relative;
        display: grid;
        grid-template-columns: 1.25fr .9fr;
        gap: 48px;
        align-items: center;
        padding: 60px 28px
    }

        .hero .wrap > div {
            min-width: 0
        }

    .hero h1 {
        font-size: 40px;
        line-height: 1.08;
        letter-spacing: -.02em;
        overflow-wrap: break-word
    }

        .hero h1 .ac {
            color: var(--primary)
        }

    .hero .stats {
        display: flex;
        gap: 30px;
        margin-top: 30px;
        padding-top: 24px;
        border-top: 1px solid var(--line)
    }

        .hero .stats .n {
            font-family: var(--serif);
            font-size: 26px;
            font-weight: 600;
            color: var(--primary)
        }

        .hero .stats .l {
            font-size: 12.5px;
            color: var(--muted);
            margin-top: 2px
        }

.bigsearch {
    display: flex;
    border: 1.5px solid var(--line-strong);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-soft);
    min-width: 0
}

    .bigsearch input {
        flex: 1;
        min-width: 0;
        border: none;
        padding: 0 18px;
        height: 54px;
        font-size: 15.5px;
        font-family: inherit;
        color: var(--ink);
        background: transparent
    }

        .bigsearch input:focus {
            outline: none
        }

    .bigsearch .scope {
        border: none;
        background: var(--surface-2);
        border-right: 1px solid var(--line);
        padding: 0 14px;
        font-family: inherit;
        font-size: 13.5px;
        color: var(--ink-soft);
        font-weight: 500;
        cursor: pointer
    }

    .bigsearch button {
        border: none;
        background: var(--primary);
        color: #fff;
        padding: 0 22px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px
    }

        .bigsearch button:hover {
            background: var(--primary-deep)
        }

/* collection tiles */
.tiles {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 18px
}

/* ============ BOOK CARDS ============ */
.cardgrid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 20px
}

.bcard {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
    cursor: pointer;
    transition: border-color .15s,box-shadow .15s;
    display: flex;
    flex-direction: column
}

    .bcard:hover {
        border-color: var(--line-strong);
        box-shadow: var(--shadow)
    }

.cover {
    aspect-ratio: 3/4;
    position: relative;
    display: grid;
    place-items: center;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
    background: var(--surface-2)
}

    .cover::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 7px;
        background: var(--primary);
        opacity: .85
    }

    .cover .doc {
        width: 52%;
        max-width: 116px;
        aspect-ratio: 3/4;
        background: #fff;
        border: 1px solid var(--line-strong);
        border-radius: 3px;
        box-shadow: 0 6px 16px -10px rgba(28,27,25,.5);
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        padding: 11px 10px;
        position: relative;
        overflow: hidden
    }

        .cover .doc::before {
            content: "";
            position: absolute;
            left: 10px;
            right: 10px;
            top: 12px;
            height: 1px;
            background: var(--line-strong);
            box-shadow: 0 7px 0 var(--line-strong),0 14px 0 var(--line-strong),0 21px 0 var(--line-strong)
        }

        .cover .doc .ttl {
            font-family: var(--dev);
            font-size: 10.5px;
            font-weight: 600;
            color: var(--ink-soft);
            line-height: 1.25;
            position: relative;
            z-index: 1
        }

    .cover.c-journals .doc {
        background: color-mix(in srgb,var(--accent-tint) 70%,#fff)
    }

    .cover.c-journals::before {
        background: var(--accent)
    }

    .cover.c-magazines .doc {
        background: var(--neutral-tint)
    }

    .cover.c-magazines::before {
        background: var(--neutral)
    }

    .cover.c-manuscripts .doc {
        background: color-mix(in srgb,var(--primary-tint) 50%,var(--accent-tint))
    }

    .cover.c-rare .doc {
        background: color-mix(in srgb,var(--primary-tint) 60%,#fff)
    }

.bcard .b {
    padding: 13px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1
}

    .bcard .b .cat {
        font-size: 11px;
        font-weight: 600;
        letter-spacing: .04em;
        color: var(--accent-deep);
        text-transform: uppercase
    }

    .bcard .b .name {
        font-family: var(--serif);
        font-size: 15.5px;
        font-weight: 600;
        line-height: 1.25;
        color: var(--ink)
    }

        .bcard .b .name.dev {
            font-family: var(--dev);
            font-weight: 500;
            font-size: 14.5px
        }

    .bcard .b .mline {
        font-size: 12.5px;
        color: var(--muted)
    }

    .bcard .b .foot {
        margin-top: auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-top: 10px;
        border-top: 1px solid var(--line)
    }

        .bcard .b .foot .yr {
            font-size: 12px;
            color: var(--faint)
        }

/* ============ RESOURCES (browse) ============ */
.browse {
    display: grid;
    grid-template-columns: 272px 1fr;
    gap: 34px;
    align-items: start;
    padding-top: 10px
}

.facets {
    position: sticky;
    top: 134px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden
}

    .facets .fhead {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 16px;
        border-bottom: 1px solid var(--line);
        background: var(--surface-2)
    }

        .facets .fhead b {
            font-size: 14px
        }

.fgroup {
    border-bottom: 1px solid var(--line)
}

    .fgroup > summary {
        list-style: none;
        cursor: pointer;
        padding: 14px 16px;
        font-size: 13px;
        font-weight: 600;
        color: var(--ink);
        display: flex;
        align-items: center;
        justify-content: space-between;
        letter-spacing: .02em
    }

        .fgroup > summary::-webkit-details-marker {
            display: none
        }

        .fgroup > summary .chev {
            transition: transform .2s;
            color: var(--faint)
        }

    .fgroup[open] > summary .chev {
        transform: rotate(180deg)
    }

.fbody {
    padding: 2px 16px 16px
}

.chk {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 13.5px;
    color: var(--ink-soft);
    cursor: pointer
}

    .chk input {
        appearance: none;
        width: 17px;
        height: 17px;
        border: 1.5px solid var(--line-strong);
        border-radius: 4px;
        display: grid;
        place-items: center;
        cursor: pointer;
        flex: 0 0 auto
    }

        .chk input:checked {
            background: var(--primary);
            border-color: var(--primary)
        }

            .chk input:checked::after {
                content: "✓";
                color: #fff;
                font-size: 11px;
                font-weight: 700
            }

    .chk .ct {
        margin-left: auto;
        font-size: 12px;
        color: var(--faint)
    }

    .chk:hover {
        color: var(--primary)
    }

.yearbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px
}

    .yearbox input {
        width: 72px;
        height: 36px;
        border: 1px solid var(--line-strong);
        border-radius: 6px;
        text-align: center;
        font-family: inherit;
        font-size: 13px
    }

        .yearbox input:focus {
            border-color: var(--primary);
            outline: none
        }

.range {
    appearance: none;
    width: 100%;
    height: 4px;
    background: var(--line-strong);
    border-radius: 3px;
    margin: 16px 0 4px
}

    .range::-webkit-slider-thumb {
        appearance: none;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: var(--primary);
        cursor: pointer;
        border: 2px solid #fff;
        box-shadow: 0 0 0 1px var(--primary)
    }

    .range::-moz-range-thumb {
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: var(--primary);
        cursor: pointer;
        border: 2px solid #fff
    }

.rtoolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 22px
}

    .rtoolbar .count {
        font-size: 14px;
        color: var(--ink-soft)
    }

        .rtoolbar .count b {
            color: var(--ink);
            font-family: var(--serif);
            font-size: 17px
        }

    .rtoolbar .spacer {
        flex: 1
    }

.sel {
    height: 38px;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    background: var(--surface);
    padding: 0 32px 0 12px;
    font-family: inherit;
    font-size: 13px;
    color: var(--ink-soft);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236b655c' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center
}

.viewtoggle {
    display: inline-flex;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    overflow: hidden
}

    .viewtoggle button {
        border: none;
        background: var(--surface);
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        cursor: pointer;
        color: var(--muted)
    }

        .viewtoggle button.on {
            background: var(--primary);
            color: #fff
        }

.activefilters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px
}

.chipf {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 500;
    background: var(--primary-tint);
    color: var(--primary);
    border: 1px solid var(--chip-line);
    border-radius: 100px;
    padding: 4px 7px 4px 11px
}

    .chipf b {
        cursor: pointer;
        font-size: 14px;
        line-height: 1
    }

/* list view rows */
.listview {
    display: none;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface)
}

.lrow {
    display: flex;
    gap: 18px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    align-items: center
}

    .lrow:last-child {
        border-bottom: none
    }

    .lrow:hover {
        background: var(--surface-2)
    }

    .lrow .lcov {
        width: 62px;
        flex: 0 0 62px
    }

        .lrow .lcov .cover {
            aspect-ratio: 3/4;
            border-radius: 5px
        }

            .lrow .lcov .cover .doc {
                max-width: 46px;
                padding: 6px 5px
            }

                .lrow .lcov .cover .doc .ttl {
                    font-size: 7px
                }

    .lrow .lc {
        flex: 1;
        min-width: 0
    }

        .lrow .lc .name {
            font-family: var(--serif);
            font-size: 16px;
            font-weight: 600
        }

            .lrow .lc .name.dev {
                font-family: var(--dev);
                font-weight: 500
            }

        .lrow .lc .mline {
            font-size: 13px;
            color: var(--muted);
            margin-top: 3px
        }

        .lrow .lc .tags {
            display: flex;
            gap: 8px;
            margin-top: 8px
        }

/* pagination */
.pager,
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 34px 0 0;
    padding: 0;
    list-style: none
}

    .pagination li {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex
    }

    .pager a, .pager button, .pager span,
    .pagination a, .pagination button, .pagination span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 38px;
        height: 38px;
        padding: 0 12px;
        box-sizing: border-box;
        border: 1px solid var(--line-strong);
        border-radius: 8px;
        background: var(--surface);
        color: var(--ink-soft);
        font-family: inherit;
        font-size: 13px;
        font-weight: 600;
        line-height: 1;
        text-decoration: none;
        cursor: pointer;
        transition: border-color .15s,color .15s,background .15s
    }

        .pager a:hover, .pager button:hover,
        .pagination a:hover, .pagination button:hover {
            border-color: var(--primary);
            color: var(--primary);
            background: var(--primary-tint)
        }

    .pager .on, .pager .active, .pager [aria-current="page"],
    .pagination .on, .pagination .active > *, .pagination .active, .pagination [aria-current="page"] {
        background: var(--primary);
        border-color: var(--primary);
        color: #fff
    }

        .pager .on:hover, .pager .active:hover, .pager [aria-current="page"]:hover,
        .pagination .active > *:hover, .pagination [aria-current="page"]:hover {
            background: var(--primary-deep);
            color: #fff
        }

    .pager .disabled, .pager [disabled], .pager button:disabled,
    .pagination .disabled > *, .pagination .disabled, .pagination [disabled] {
        opacity: .4;
        cursor: not-allowed;
        pointer-events: none
    }

    /* "..." gap */
    .pager .dots, .pager .ellipsis,
    .pagination .dots, .pagination .ellipsis {
        border-color: transparent;
        background: transparent;
        cursor: default;
        min-width: auto;
        padding: 0 4px
    }

@media (max-width:560px) {
    .pager a, .pager button, .pager span,
    .pagination a, .pagination button, .pagination span {
        min-width: 34px;
        height: 34px;
        padding: 0 9px
    }
}
/* ============ ITEM DETAIL ============ */
.itemgrid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 44px;
    align-items: start;
    padding-top: 12px
}

.itemcov .cover {
    aspect-ratio: 3/4;
    border-radius: var(--radius);
    box-shadow: var(--shadow)
}

.itemcov .acts {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 16px
}

    .itemcov .acts .btn {
        width: 100%;
        justify-content: center
    }

.itemhead h1 {
    font-size: 30px;
    line-height: 1.14
}

    .itemhead h1.dev {
        font-family: var(--dev);
        font-weight: 600
    }

.itemhead .by {
    color: var(--muted);
    font-size: 15px;
    margin-top: 8px
}

.itemtags {
    display: flex;
    gap: 9px;
    margin: 18px 0 26px;
    flex-wrap: wrap
}

.metatable {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden
}

    .metatable tr {
        border-bottom: 1px solid var(--line)
    }

        .metatable tr:last-child {
            border-bottom: none
        }

    .metatable th {
        text-align: left;
        width: 38%;
        padding: 12px 16px;
        font-size: 13px;
        font-weight: 600;
        color: var(--ink-soft);
        background: var(--neutral-tint);
        vertical-align: top
    }

    .metatable td {
        padding: 12px 16px;
        font-size: 14px;
        color: var(--ink-soft)
    }

        .metatable td.dev {
            font-family: var(--dev)
        }

/* ============ AUTH ============ */
.authwrap {
    max-width: 430px;
    margin: 0 auto;
    padding: 54px 0 72px
}

.authcard {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 34px 34px 30px
}

    .authcard h1 {
        font-size: 25px;
        text-align: center
    }

    .authcard .asub {
        text-align: center;
        color: var(--muted);
        font-size: 13.5px;
        margin: 7px 0 26px
    }

.field {
    margin-bottom: 17px
}

    .field label {
        display: block;
        font-size: 13px;
        font-weight: 600;
        color: var(--ink-soft);
        margin-bottom: 7px
    }

        .field label .req {
            color: var(--primary)
        }

.inp {
    position: relative
}

    .inp input {
        width: 100%;
        height: 46px;
        border: 1px solid var(--line-strong);
        border-radius: 8px;
        padding: 0 14px;
        font-size: 14.5px;
        font-family: inherit;
        background: var(--surface);
        color: var(--ink)
    }

        .inp input:focus {
            border-color: var(--primary);
            outline: none;
            box-shadow: 0 0 0 3px var(--primary-tint)
        }

    .inp .eye {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        cursor: pointer;
        color: var(--faint);
        background: none;
        border: none
    }

.forgot {
    text-align: right;
    margin: -6px 0 16px
}

.captcha {
    border: 1px solid var(--line);
    border-radius: 9px;
    overflow: hidden;
    background: var(--surface-2);
    margin: 4px 0 20px
}

    .captcha .ctop {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px;
        border-bottom: 1px solid var(--line)
    }

    .captcha .code {
        font-family: var(--serif);
        font-size: 26px;
        font-weight: 700;
        letter-spacing: 8px;
        color: var(--ink);
        background: repeating-linear-gradient(45deg,var(--surface-2),var(--surface-2) 3px,var(--line) 3px,var(--line) 6px);
        padding: 6px 16px;
        border-radius: 5px;
        user-select: none;
        text-decoration: line-through;
        text-decoration-color: color-mix(in srgb,var(--primary) 35%,transparent)
    }

    .captcha .refresh {
        margin-left: auto;
        background: none;
        border: none;
        color: var(--muted);
        cursor: pointer
    }

        .captcha .refresh:hover {
            color: var(--primary)
        }

    .captcha input {
        width: 100%;
        height: 42px;
        border: none;
        padding: 0 12px;
        font-family: inherit;
        font-size: 14px;
        background: transparent;
        color: var(--ink)
    }

        .captcha input:focus {
            outline: none
        }

.authcard .btn.primary {
    width: 100%;
    justify-content: center;
    height: 47px;
    margin-top: 4px
}

.authalt {
    text-align: center;
    font-size: 13.5px;
    color: var(--muted);
    margin-top: 20px
}

/* ============ PROFILE ============ */
.profhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: 6px 0 24px
}

.profcard {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 30px;
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 34px;
    align-items: start
}

.deflist {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px 40px
}

    .deflist .d .k {
        font-size: 12.5px;
        color: var(--muted);
        font-weight: 500
    }

    .deflist .d .v {
        font-size: 15.5px;
        color: var(--ink);
        font-weight: 500;
        margin-top: 3px
    }

        .deflist .d .v.g {
            color: var(--primary);
            font-weight: 600
        }

        .deflist .d .v.empty {
            color: var(--faint);
            font-weight: 400;
            font-style: italic;
            font-size: 14px
        }

/* ============ ADMIN ============ */
.adminshell {
    display: grid;
    grid-template-columns: 230px 1fr;
    min-height: 70vh
}

.arail {
    background: var(--primary);
    color: rgba(255,255,255,.86);
    padding: 20px 0;
    border-right: 1px solid var(--primary-deep)
}

    .arail .alabel {
        font-size: 11px;
        letter-spacing: .14em;
        text-transform: uppercase;
        color: rgba(255,255,255,.5);
        padding: 0 22px 12px;
        font-weight: 600
    }

    .arail a {
        display: flex;
        align-items: center;
        gap: 13px;
        padding: 11px 22px;
        font-size: 14px;
        font-weight: 500;
        color: rgba(255,255,255,.78);
        cursor: pointer;
        border-left: 3px solid transparent
    }

        .arail a:hover {
            background: rgba(255,255,255,.05);
            color: #fff
        }

        .arail a.on {
            background: color-mix(in srgb,var(--accent) 22%,transparent);
            color: #fff;
            border-left-color: var(--accent)
        }

        .arail a .icon {
            width: 19px;
            height: 19px;
            flex: 0 0 auto
        }

.acontent {
    padding: 26px 34px 50px;
    background: var(--paper);
    min-width: 0
}

.ahead {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 6px 0 22px;
    flex-wrap: wrap
}

    .ahead h1 {
        font-size: 25px
    }

    .ahead .asb {
        color: var(--muted);
        font-size: 13.5px;
        margin-top: 4px
    }

.statgrid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 18px;
    margin-bottom: 28px
}

.stat {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 20px
}

    .stat .sk {
        font-size: 12.5px;
        color: var(--muted);
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 8px
    }

        .stat .sk .icon {
            width: 16px;
            height: 16px;
            color: var(--primary)
        }

    .stat .sv {
        font-family: var(--serif);
        font-size: 32px;
        font-weight: 600;
        margin-top: 10px;
        color: var(--ink)
    }

    .stat .sd {
        font-size: 12px;
        color: var(--ok);
        margin-top: 4px;
        font-weight: 600
    }

        .stat .sd.flat {
            color: var(--faint)
        }

.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden
}

    .panel .phead {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-bottom: 1px solid var(--line)
    }

        .panel .phead b {
            font-size: 15px;
            font-family: var(--serif)
        }

.tbl {
    width: 100%;
    border-collapse: collapse
}

    .tbl th {
        text-align: left;
        padding: 13px 20px;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: .03em;
        color: #fff;
        text-transform: uppercase;
        background: var(--neutral);
        border-bottom: 1px solid var(--neutral)
    }

    .tbl td {
        padding: 14px 20px;
        font-size: 14px;
        color: var(--ink-soft);
        border-bottom: 1px solid var(--line)
    }

    .tbl tr:last-child td {
        border-bottom: none
    }

    .tbl tbody tr:hover {
        background: var(--surface-2)
    }

    .tbl td.strong {
        color: var(--ink);
        font-weight: 600
    }

.tag-role {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 100px;
    display: inline-block
}

    .tag-role.admin {
        background: var(--primary-tint);
        color: var(--primary)
    }

    .tag-role.reader {
        background: var(--surface-2);
        color: var(--muted);
        border: 1px solid var(--line-strong)
    }

.tag-status {
    font-size: 12px;
    font-weight: 600;
    color: var(--ok);
    display: inline-flex;
    align-items: center;
    gap: 6px
}

    .tag-status::before {
        content: "";
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--ok)
    }

.rowacts {
    display: flex;
    gap: 4px
}

    .rowacts button {
        width: 32px;
        height: 32px;
        border: 1px solid var(--line);
        border-radius: 6px;
        background: var(--surface);
        display: grid;
        place-items: center;
        cursor: pointer;
        color: var(--muted)
    }

        .rowacts button:hover {
            border-color: var(--primary);
            color: var(--primary)
        }

        .rowacts button.del:hover {
            border-color: #b42318;
            color: #b42318
        }

.asearchbar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px
}

    .asearchbar .sel {
        flex: 0 0 160px
    }

    .asearchbar .asinput {
        flex: 1;
        position: relative
    }

        .asearchbar .asinput input {
            width: 100%;
            height: 40px;
            border: 1px solid var(--line-strong);
            border-radius: 7px;
            padding: 0 14px;
            font-family: inherit;
            font-size: 14px
        }

            .asearchbar .asinput input:focus {
                border-color: var(--primary);
                outline: none
            }

/* stepper / submission */
.stepper {
    display: flex;
    user-select: none;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 8px 0 30px;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    flex: 1
}

    .step .sc {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: var(--surface);
        border: 2px solid var(--line-strong);
        display: grid;
        place-items: center;
        color: var(--faint);
        font-weight: 600;
        z-index: 1
    }

    .step .sl {
        font-size: 12.5px;
        color: var(--faint);
        font-weight: 600
    }

    .step.done .sc {
        background: var(--primary);
        border-color: var(--primary);
        color: #fff
    }

    .step.done .sl {
        color: var(--ink)
    }

    .step.current .sc {
        background: var(--primary);
        border-color: var(--primary);
        color: #fff
    }

    .step.current .sl {
        color: var(--primary);
        font-weight: 600
    }

    .step:not(:last-child)::after {
        content: "";
        position: absolute;
        top: 21px;
        left: calc(50% + 24px);
        right: calc(-50% + 24px);
        height: 2px;
        background: var(--line-strong)
    }

    .step.done:not(:last-child)::after {
        background: var(--primary)
    }

.formcard {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 28px 30px
}

.formgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 26px
}

    .formgrid .ff {
        display: flex;
        flex-direction: column;
        gap: 7px
    }

        .formgrid .ff.full {
            grid-column: 1 / -1
        }

        .formgrid .ff label {
            font-size: 13px;
            font-weight: 600;
            color: var(--ink-soft)
        }

            .formgrid .ff label .req {
                color: var(--primary)
            }

            .formgrid .ff label .hint {
                font-weight: 400;
                color: var(--faint);
                font-size: 12px;
                margin-left: 4px
            }

        .formgrid .ff input, .formgrid .ff select, .formgrid .ff textarea {
            height: 42px;
            border: 1px solid var(--line-strong);
            border-radius: 7px;
            padding: 0 12px;
            font-family: inherit;
            font-size: 14px;
            color: var(--ink);
            background: var(--surface)
        }

        .formgrid .ff textarea {
            height: auto;
            padding: 10px 12px;
            resize: vertical;
            min-height: 62px
        }

            .formgrid .ff input:focus, .formgrid .ff select:focus, .formgrid .ff textarea:focus {
                border-color: var(--primary);
                outline: none
            }

        .formgrid .ff .daterow {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 8px
        }

            .formgrid .ff .daterow select {
                width: 100%
            }

.formfoot {
    display: flex;
    justify-content: space-between;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--line)
}

/* ============ SIMPLE PAGES ============ */
.prose {
    max-width: 72ch
}

    .prose p {
        color: var(--ink-soft);
        margin: 0 0 16px;
        line-height: 1.72
    }

    .prose h2 {
        font-size: 24px;
        margin: 34px 0 14px
    }

.twocol {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start
}

.infocard {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 24px
}

    .infocard .row {
        display: flex;
        gap: 12px;
        padding: 9px 0;
        font-size: 14px;
        color: var(--ink-soft);
        border-bottom: 1px solid var(--line)
    }

        .infocard .row:last-child {
            border-bottom: none
        }

        .infocard .row .icon {
            color: var(--primary);
            flex: 0 0 auto;
            margin-top: 2px
        }

.gate {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
    padding: 70px 0
}

    .gate .gi {
        width: 64px;
        height: 64px;
        border-radius: 14px;
        background: var(--primary-tint);
        color: var(--primary);
        display: grid;
        place-items: center;
        margin: 0 auto 20px
    }

    .gate h2 {
        font-size: 24px
    }

    .gate p {
        color: var(--muted);
        margin: 10px 0 22px
    }

/* ============ FOOTER ============ */
footer.site {
    background: var(--footer);
    color: rgba(255,255,255,.8);
    margin-top: 30px;
    padding-bottom: env(safe-area-inset-bottom,0px)
}

    footer.site .top {
        padding: 44px 0 34px;
        border-bottom: 1px solid rgba(255,255,255,.14)
    }

    footer.site .fgrid {
        display: grid;
        grid-template-columns: 1.4fr 1fr 1fr 1fr;
        gap: 34px
    }

    footer.site .fbrand {
        display: flex;
        gap: 14px;
        align-items: flex-start
    }

        footer.site .fbrand img {
            height: 54px;
            filter: brightness(0) invert(1);
            opacity: .92
        }

        footer.site .fbrand .ft1 {
            font-family: var(--serif);
            font-size: 18px;
            color: #fff;
            font-weight: 600
        }

        footer.site .fbrand .ft2 {
            font-size: 13px;
            margin-top: 5px;
            color: rgba(255,255,255,.66);
            max-width: 30ch;
            line-height: 1.55
        }

    footer.site .fcol a {
        display: block;
        font-size: 13.5px;
        color: rgba(255,255,255,.8);
        padding: 5px 0;
        cursor: pointer
    }

        footer.site .fcol a:hover {
            color: #fff
        }

    footer.site .bottom {
        padding: 18px 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        flex-wrap: wrap;
        font-size: 12.5px;
        color: rgba(255,255,255,.6)
    }

        footer.site .bottom .r {
            display: flex;
            gap: 22px
        }

        footer.site .bottom a {
            cursor: pointer
        }

            footer.site .bottom a:hover {
                color: #fff
            }

/* ============ TOAST ============ */
#toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%) translateY(20px);
    background: var(--ink);
    color: #fff;
    padding: 12px 20px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s,transform .2s;
    z-index: 200;
    max-width: 90vw
}

    #toast.show {
        opacity: 1;
        transform: translateX(-50%) translateY(0)
    }

/* ============ RESPONSIVE ============ */
@media (max-width:1040px) {
    .hero .wrap {
        grid-template-columns: 1fr;
        gap: 34px
    }

    .tiles {
        grid-template-columns: repeat(2,1fr)
    }

    .cardgrid {
        grid-template-columns: repeat(3,1fr)
    }

    .statgrid {
        grid-template-columns: repeat(2,1fr)
    }

    .browse {
        grid-template-columns: 1fr
    }

    .facets {
        position: static
    }

    .itemgrid {
        grid-template-columns: 1fr;
        max-width: 640px
    }

    .twocol {
        grid-template-columns: 1fr
    }
}

@media (max-width:980px) {
    .hsearch {
        max-width: 300px
    }

    .topnav .navlink {
        display: none
    }

    .topnav .iconbtn:not(.burger) {
        display: none
    }

    .hsep {
        display: none
    }

    .burger {
        display: inline-grid
    }
}

@media (max-width:760px) {
    .wrap {
        padding: 0 18px
    }

    .hsearch {
        display: none
    }

    .topnav .navlink {
        display: none
    }

    .topnav .iconbtn:not(.burger) {
        display: none
    }

    .hsep {
        display: none
    }

    .burger {
        display: inline-grid
    }

    .brand {
        min-width: 0
    }

        .brand .wm {
            min-width: 0
        }

    footer.site .fgrid {
        grid-template-columns: 1fr 1fr;
        gap: 26px 20px
    }

    footer.site .fcol:first-child {
        grid-column: 1 / -1
    }

    footer.site .bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px
    }

    .cardgrid {
        grid-template-columns: repeat(2,1fr)
    }

    .deflist {
        grid-template-columns: 1fr
    }

    .profcard {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center
    }

    .deflist {
        text-align: left
    }

    .formgrid {
        grid-template-columns: 1fr
    }

    .adminshell {
        grid-template-columns: 1fr
    }

    .arail {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        padding: 12px;
        border-right: none;
        border-bottom: 1px solid #000
    }

        .arail .alabel {
            width: 100%;
            padding: 0 10px 8px
        }

        .arail a {
            border-left: none;
            border-radius: 7px;
            padding: 9px 12px
        }

            .arail a.on {
                border-left: none
            }

    .acontent {
        padding: 20px 18px 40px
    }

    .sechead h2 {
        font-size: 23px
    }

    .hero h1 {
        font-size: 30px
    }

        .hero h1 br {
            display: none
        }

    .mainbar .wrap {
        height: 66px;
        gap: 12px
    }

    .brand img {
        height: 42px
    }

    .brand .wm .t1 {
        font-size: 17px
    }

    .brand .wm .t2 {
        font-size: 10px
    }

    .tbl {
        display: block;
        overflow-x: auto;
        white-space: nowrap
    }

    .stepper {
        flex-wrap: nowrap;
        overflow-x: auto
    }

    .step .sl {
        font-size: 11px
    }
}

@media (max-width:420px) {
    .brand .wm .t2 {
        display: none
    }

    .brand .wm .t1 {
        font-size: 16px
    }

    .brand img {
        height: 38px
    }

    .cardgrid {
        grid-template-columns: 1fr
    }

    .hero h1 {
        font-size: 26px
    }
}

.mobnav {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(28,27,25,.5)
}

    .mobnav.open {
        display: block
    }

    .mobnav .sheet {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 78%;
        max-width: 320px;
        background: var(--surface);
        padding: 20px;
        padding-top: calc(20px + env(safe-area-inset-top,0px));
        overflow: auto
    }

        .mobnav .sheet a {
            display: block;
            padding: 13px 10px;
            font-size: 16px;
            font-weight: 600;
            border-bottom: 1px solid var(--line);
            cursor: pointer
        }

            .mobnav .sheet a:hover {
                color: var(--primary)
            }

/* ---- multi-page additions ---- */
.vh {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0
}

.skip {
    position: absolute;
    left: -999px;
    top: 0;
    z-index: 200;
    background: var(--primary);
    color: #fff;
    padding: 10px 16px;
    border-radius: 0 0 8px 0
}

    .skip:focus {
        left: 0
    }

a.navlink {
    text-decoration: none
}

.bcard .name {
    text-decoration: none
}

.bcard .coverlink {
    display: block
}

.iconbtn.on, [data-save].on {
    color: var(--primary)
}

    [data-save].on svg {
        fill: var(--primary)
    }

.btn.on {
    border-color: var(--primary);
    color: var(--primary)
}

.fhead .lnk {
    font-family: inherit
}

dl.deflist {
    margin: 0
}

.deflist dt {
    margin: 0
}

.deflist dd {
    margin: 0
}

ol.stepper {
    list-style: none;
    padding: 0
}

.crumb b {
    font-weight: 600
}
/* heading-tag remaps after semantic (single-H1) refactor */
.brand .wm {
    display: flex;
    flex-direction: column
}

    .brand .wm .t1, .brand .wm .t2 {
        display: block
    }

.infocard h2 {
    font-size: 18px;
    margin: 0 0 12px
}

.sechead h1 {
    font-size: 27px
}

p.eyebrow {
    margin: 0 0 2px
}

.prose h1 {
    font-size: 30px
}
/* footer section headings (were styled as h5) */
footer.site .fcol h2 {
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 14px;
    font-weight: 600
}
/* modals */
/* modals */
.modal, .modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgba(28,27,25,.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px
}

    .modal.open, .modal.show, .modal.is-open, .modal-overlay.open, .modal-overlay.show, .modal-overlay.is-open {
        display: flex
    }

    .modal[hidden], .modal-overlay[hidden] {
        display: none !important
    }

    .modal .box, .modal .modal-box, .modal-overlay .box {
        background: var(--surface);
        border-radius: 14px;
        box-shadow: var(--shadow);
        width: 100%;
        max-width: 470px;
        padding: 26px 26px 22px;
        max-height: 92vh;
        overflow: auto
    }

        .modal .box h2, .modal .modal-box h2 {
            font-size: 20px;
            margin: 0 0 4px
        }

        .modal .box .msub, .modal .modal-box .msub {
            color: var(--muted);
            font-size: 13.5px;
            margin: 0 0 18px
        }

    .modal .mfoot {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        margin-top: 22px
    }

    .modal .opt {
        display: flex;
        align-items: center;
        gap: 9px;
        font-size: 14px;
        color: var(--ink-soft);
        margin: 2px 0
    }

    .modal select {
        width: 100%;
        height: 46px;
        border: 1px solid var(--line-strong);
        border-radius: 8px;
        padding: 0 12px;
        font-family: inherit;
        font-size: 14.5px;
        background: var(--surface);
        color: var(--ink)
    }

        .modal select:focus {
            border-color: var(--primary);
            outline: none
        }
/* advanced search */
.advsearch {
    max-width: 780px;
    margin: 0 auto;
    width: 100%
}

.advcard {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    padding: 28px 30px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box
}

.advgrid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 16px 22px;
    width: 100%;
    min-width: 0
}

    .advgrid .ff {
        display: flex;
        flex-direction: column;
        gap: 7px;
        min-width: 0
    }

        .advgrid .ff.full {
            grid-column: 1/-1
        }

    .advgrid label {
        font-size: 13px;
        font-weight: 600;
        color: var(--ink-soft)
    }

    .advgrid input, .advgrid select {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        height: 44px;
        border: 1px solid var(--line-strong);
        border-radius: 8px;
        padding: 0 12px;
        font-family: inherit;
        font-size: 14px;
        background: var(--surface);
        color: var(--ink);
        text-overflow: ellipsis
    }

        .advgrid input:focus, .advgrid select:focus {
            border-color: var(--primary);
            outline: none;
            box-shadow: 0 0 0 3px var(--primary-tint)
        }

.yrpair {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
    gap: 8px;
    align-items: center;
    min-width: 0
}
/* row reset button */
.rowacts .rp {
    width: auto;
    padding: 0 11px;
    height: 32px;
    font-size: 12.5px;
    font-weight: 600;
    gap: 6px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: var(--surface);
    color: var(--ink-soft);
    cursor: pointer;
    display: inline-flex;
    align-items: center
}

    .rowacts .rp:hover {
        border-color: var(--primary);
        color: var(--primary)
    }

@media(max-width:620px) {
    .advgrid {
        grid-template-columns: 1fr
    }
}

/* ---- profile, add-item wizard ---- */
.profcard {
    grid-template-columns: 1fr
}

@media(max-width:760px) {
    .profcard {
        justify-items: stretch;
        text-align: left
    }

        .profcard .deflist {
            text-align: left
        }
}

.dropzone {
    border: 2px dashed var(--line-strong);
    border-radius: 12px;
    padding: 34px 20px;
    text-align: center;
    color: var(--muted);
    background: var(--surface-2)
}

    .dropzone svg {
        width: 34px;
        height: 34px;
        color: var(--primary);
        margin-bottom: 10px
    }

    .dropzone p {
        margin: 4px 0
    }

    .dropzone .dz-hint {
        font-size: 12.5px;
        color: var(--faint)
    }

.filelist {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px
}

    .filelist li {
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 10px 14px;
        font-size: 13.5px;
        background: var(--surface)
    }

.verifytable .metatable {
    width: 100%
}

/* ---- auth / role visibility (state set by the inline <head> script) ---- */
html[data-auth="out"] [data-auth-only] {
    display: none !important
}

html:not([data-auth="out"]) [data-guest-only] {
    display: none !important
}

html:not([data-role="admin"]) [data-admin-only] {
    display: none !important
}

.signin {
    margin-left: 4px;
    white-space: nowrap
}

.btn.primary.small.signin {
    padding: 8px 15px
}

/* ---- bilingual brand lockup ---- */
.brand .wm {
    line-height: 1.12
}

    .brand .wm .t0 {
        font-family: var(--dev);
        font-size: 19px;
        font-weight: 600;
        color: var(--ink);
        line-height: 1.25
    }

    .brand .wm .t1 {
        font-family: var(--serif);
        font-size: 21px;
        font-weight: 600;
        color: var(--ink);
        line-height: 1.1
    }

    .brand .wm .t2 {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-top: 4px;
        font-size: 10.5px;
        font-weight: 600;
        color: var(--primary);
        letter-spacing: 0;
        text-transform: none;
        white-space: nowrap
    }

        .brand .wm .t2 [lang="mr"] {
            font-family: var(--dev);
            font-size: 11.5px
        }

        .brand .wm .t2 .en {
            letter-spacing: .14em;
            text-transform: uppercase
        }

        .brand .wm .t2 i {
            font-style: normal;
            opacity: .5
        }

footer.site .fbrand .ft0 {
    font-family: var(--dev);
    font-size: 17px;
    color: #fff;
    font-weight: 600;
    line-height: 1.3
}

footer.site .fbrand .ft1 {
    line-height: 1.25
}

/* ---- photo slots: tinted placeholder until a real file exists in /assets/photos/ ---- */
.photo {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: var(--ratio,4/3);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='104' viewBox='0 0 84 104'%3E%3Cg fill='none' stroke='%23fff'%3E%3Cpath d='M8 104V50a34 34 0 0 1 68 0v54' stroke-opacity='.1' stroke-width='1.6'/%3E%3Cpath d='M22 104V54a20 20 0 0 1 40 0v50' stroke-opacity='.06'/%3E%3Cpath d='M42 18v12' stroke-opacity='.08'/%3E%3C/g%3E%3C/svg%3E") center bottom/84px 104px repeat-x, linear-gradient(150deg,var(--primary-deep) 0%,var(--primary) 62%,color-mix(in srgb,var(--primary) 72%,var(--accent)) 100%)
}

    .photo img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0;
        transition: opacity .45s ease
    }

    .photo.has-img img {
        opacity: 1
    }

    .photo.has-img .ph-label {
        display: none
    }

.ph-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: rgba(255,255,255,.82);
    text-align: center;
    padding: 16px;
    pointer-events: none
}

    .ph-label svg {
        width: 26px;
        height: 26px;
        stroke: currentColor;
        fill: none;
        stroke-width: 1.5;
        opacity: .85
    }

    .ph-label small {
        font-size: 10.5px;
        letter-spacing: .12em;
        text-transform: uppercase;
        opacity: .75
    }

.photo .cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 16px 13px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(transparent,rgba(0,0,0,.55));
    z-index: 1
}

    .photo .cap span {
        display: block;
        font-weight: 400;
        font-size: 12px;
        opacity: .8;
        margin-top: 1px
    }

/* ---- "Inside the Centre" gallery ---- */
.gallery {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    grid-template-rows: 210px 210px;
    gap: 14px
}

    .gallery .photo {
        aspect-ratio: auto;
        height: 100%
    }

        .gallery .photo:first-child {
            grid-row: 1 / span 2
        }

.photo-banner {
    --ratio: 21/8;
    margin-top: 20px
}

.contact-photo {
    --ratio: 4/3
}

.dirlink {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    font-size: 14px
}

/* ---- auth notices ---- */
.notice {
    border: 1px solid var(--chip-line);
    background: var(--primary-tint);
    color: var(--primary);
    border-radius: 8px;
    padding: 10px 13px;
    font-size: 13.5px;
    font-weight: 500;
    margin: -8px 0 18px;
    text-align: center
}

.captcha.err {
    border-color: #b42318;
    box-shadow: 0 0 0 3px rgba(180,35,24,.12)
}

/* ---- policies page ---- */
.policy-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 18px 0 6px
}

    .policy-nav a {
        border: 1px solid var(--line-strong);
        border-radius: 100px;
        padding: 6px 14px;
        font-size: 13px;
        font-weight: 600;
        color: var(--ink-soft);
        background: var(--surface)
    }

        .policy-nav a:hover {
            border-color: var(--primary);
            color: var(--primary)
        }

.draftnote {
    border-left: 3px solid var(--accent);
    background: var(--accent-tint);
    padding: 10px 14px;
    border-radius: 0 8px 8px 0;
    font-size: 13.5px;
    color: var(--ink-soft);
    margin: 16px 0 8px;
    max-width: 72ch
}

.prose ul {
    color: var(--ink-soft);
    line-height: 1.7;
    padding-left: 20px;
    margin: 0 0 16px
}

/* ---- mobile menu search ---- */
.mobsearch {
    margin: 4px 0 10px
}

    .mobsearch input {
        width: 100%;
        height: 44px;
        border: 1px solid var(--line-strong);
        border-radius: 8px;
        padding: 0 14px;
        font-family: inherit;
        font-size: 15px;
        background: var(--surface-2);
        color: var(--ink)
    }

        .mobsearch input:focus {
            outline: none;
            border-color: var(--primary);
            background: #fff
        }

/* ---- responsive: auth, brand, photo slots ---- */
@media (max-width:1180px) {
    .hsearch {
        max-width: 340px
    }
}

@media (max-width:1040px) {
    .gallery {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: none
    }

        .gallery .photo {
            aspect-ratio: 4/3;
            height: auto
        }

            .gallery .photo:first-child {
                grid-row: auto;
                grid-column: 1 / -1;
                aspect-ratio: 16/9
            }
}

@media (max-width:760px) {
    .brand .wm .t0 {
        font-size: 16px
    }

    .brand .wm .t1 {
        font-size: 17px
    }

    .brand .wm .t2 {
        font-size: 9.5px;
        margin-top: 2px
    }

        .brand .wm .t2 [lang="mr"] {
            font-size: 10.5px
        }

    .photo-banner {
        --ratio: 16/9
    }
}

@media (max-width:560px) {
    .bigsearch {
        flex-wrap: wrap
    }

        .bigsearch .scope {
            flex: 1 1 100%;
            height: 44px;
            border-right: none;
            border-bottom: 1px solid var(--line)
        }

        .bigsearch input {
            height: 50px
        }

        .bigsearch button {
            padding: 0 16px
        }

    .gallery {
        grid-template-columns: 1fr
    }

        .gallery .photo:first-child {
            aspect-ratio: 4/3
        }
}

@media (max-width:420px) {
    .brand .wm .t2 {
        display: flex
    }

        .brand .wm .t2 [lang="mr"] {
            display: none
        }

        .brand .wm .t2 i {
            display: none
        }
}

@media (max-width:420px) {
    .signin {
        display: none
    }
}

.gallery.g3 {
    grid-template-columns: repeat(3,1fr);
    grid-template-rows: none
}

    .gallery.g3 .photo, .gallery.g3 .photo:first-child {
        grid-row: auto;
        grid-column: auto;
        aspect-ratio: 4/3;
        height: auto
    }

@media (max-width:560px) {
    .gallery.g3 {
        grid-template-columns: 1fr
    }
}

/* photo gallery tiles */
.prose p.bi-note {
    font-size: 16px;
    color: var(--ink);
    margin: 6px 0 18px
}

    .prose p.bi-note .dev {
        font-weight: 600;
        color: var(--primary)
    }

footer.site .fbrand .ft2 .dev {
    white-space: nowrap
}

/* =====================================================================
   DESIGN LAYER: header, hero carousel, cards, gallery, footer.
   Rules below refine the base styles above.
   ===================================================================== */
:root {
    --dev-display: "Tiro Devanagari Marathi","IBM Plex Sans Devanagari",serif;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(20,18,15,.05),0 18px 40px -22px rgba(20,18,15,.28)
}

body {
    font-size: 15.5px
}

.wrap {
    max-width: 1240px
}

/* ---- header ---- */
header.site {
    background: color-mix(in srgb,var(--surface) 92%,transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow .25s
}

    header.site.scrolled {
        box-shadow: 0 10px 30px -18px rgba(20,18,15,.35)
    }

.mainbar .wrap {
    height: 82px;
    gap: 28px
}

.brand {
    gap: 14px
}

    .brand img {
        height: 56px
    }

    .brand .wm .t0 {
        font-family: var(--dev-display);
        font-weight: 400;
        font-size: 24px;
        line-height: 1.08;
        color: var(--primary)
    }

    .brand .wm .t1 {
        font-size: 21px;
        line-height: 1.1;
        letter-spacing: -.005em
    }

    .brand .wm .t2 {
        color: var(--muted);
        font-size: 10px;
        margin-top: 5px
    }

        .brand .wm .t2 [lang="mr"] {
            font-size: 11px
        }

.hsearch input {
    background: var(--surface-2);
    border-color: transparent;
    border-radius: 10px
}

    .hsearch input:hover {
        border-color: var(--line-strong)
    }

body.home .hsearch {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .25s,transform .25s,visibility .25s
}

body.home header.site.show-search .hsearch {
    opacity: 1;
    visibility: visible;
    transform: none
}

.topnav .navlink {
    font-weight: 500;
    color: var(--ink-soft)
}

    .topnav .navlink.active {
        font-weight: 600
    }

.btn {
    border-radius: 10px
}

    .btn.primary.small.signin {
        border-radius: 999px;
        padding: 9px 18px
    }

/* ---- section rhythm ---- */
.section {
    padding: 84px 0
}

.sechead {
    margin-bottom: 32px
}

    .sechead h2 {
        font-size: 34px;
        letter-spacing: -.015em
    }

    .sechead .eyebrow {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px
    }

        .sechead .eyebrow::before {
            content: "";
            width: 24px;
            height: 2px;
            border-radius: 2px;
            background: var(--accent)
        }

    .sechead .sub {
        font-size: 15px
    }

/* ---- hero carousel ---- */
.hx {
    position: relative;
    height: clamp(620px,86vh,840px);
    background: var(--primary-deep);
    color: #fff;
    overflow: hidden;
    isolation: isolate
}

.hx-track {
    position: absolute;
    inset: 0
}

.hx-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    transition: opacity 1.3s ease
}

    .hx-slide.is-active {
        opacity: 1
    }

    .hx-slide img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transform: scale(1.07);
        transition: transform 0s linear 1.4s
    }

    .hx-slide.is-active img {
        transform: scale(1);
        transition: transform 9s cubic-bezier(.22,.6,.3,1)
    }

.hx-shade {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg,color-mix(in srgb,var(--primary-deep) 90%,transparent) 0%,color-mix(in srgb,var(--primary-deep) 66%,transparent) 36%,color-mix(in srgb,var(--primary-deep) 12%,transparent) 68%,transparent 100%), linear-gradient(0deg,color-mix(in srgb,var(--primary-deep) 78%,transparent) 0%,transparent 34%), linear-gradient(180deg,rgba(0,0,0,.28) 0%,transparent 20%)
}

.hx-body {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 150px
}

.hx-copy {
    max-width: 640px
}

.hx-title {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    color: #fff
}

    .hx-title .dev {
        font-family: var(--dev-display);
        font-weight: 400;
        font-size: clamp(50px,6.2vw,82px);
        line-height: 1.12
    }

    .hx-title .en {
        font-family: var(--serif);
        font-weight: 600;
        font-size: clamp(38px,4.4vw,58px);
        line-height: 1.04;
        letter-spacing: -.02em
    }

    .hx-title::after {
        content: "";
        width: 72px;
        height: 3px;
        border-radius: 3px;
        background: var(--accent);
        margin-top: 22px
    }

.hx-lede {
    font-size: 17px;
    line-height: 1.62;
    color: rgba(255,255,255,.88);
    max-width: 52ch;
    margin: 18px 0 28px
}

.hx .bigsearch {
    border: none;
    border-radius: 14px;
    box-shadow: 0 24px 60px -24px rgba(0,0,0,.7)
}

    .hx .bigsearch input {
        height: 60px;
        font-size: 16px
    }

    .hx .bigsearch .scope {
        padding: 0 16px
    }

    .hx .bigsearch button {
        background: var(--accent);
        color: var(--primary-deep);
        padding: 0 26px;
        font-size: 15px
    }

        .hx .bigsearch button:hover {
            background: color-mix(in srgb,var(--accent) 82%,#fff)
        }

.hx-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 24px;
    padding-bottom: 78px
}

.hx-cap {
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 13.5px;
    color: rgba(255,255,255,.85);
    min-width: 240px
}

.hx-n {
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 600;
    color: #fff
}

.hx-ct {
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid rgba(255,255,255,.3)
}

.hx-dots {
    display: flex;
    gap: 8px;
    flex: 1;
    max-width: 340px;
    margin-left: auto
}

.hx-dot {
    flex: 1;
    height: 24px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    position: relative
}

    .hx-dot::before, .hx-dot i {
        content: "";
        position: absolute;
        left: 0;
        top: 50%;
        height: 3px;
        margin-top: -1.5px;
        border-radius: 3px
    }

    .hx-dot::before {
        right: 0;
        background: rgba(255,255,255,.3)
    }

    .hx-dot i {
        width: 0;
        background: #fff
    }

    .hx-dot:hover::before {
        background: rgba(255,255,255,.55)
    }

    .hx-dot.is-active i {
        animation: hxprog var(--hx-dur,7000ms) linear forwards
    }

.hx.is-paused .hx-dot.is-active i {
    animation-play-state: paused
}

.hx:not(.is-ready) .hx-dot.is-active i, .hx.no-motion .hx-dot.is-active i {
    animation: none;
    width: 100%
}

@keyframes hxprog {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

.hx-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.38);
    background: rgba(0,0,0,.18);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background .15s,border-color .15s
}

    .hx-btn:hover {
        background: rgba(255,255,255,.18);
        border-color: #fff
    }

    .hx-btn .icon {
        width: 18px;
        height: 18px;
        stroke-width: 2
    }

.hx .i-play {
    display: none
}

.hx.is-user-paused .i-play {
    display: inline-block
}

.hx.is-user-paused .i-pause {
    display: none
}

.hx:not(.is-ready) .hx-dots {
    visibility: hidden
}

.hx :focus-visible {
    outline-color: #fff
}

/* ---- book cards ---- */
.cardgrid {
    gap: 22px
}

.bcard {
    border-radius: 16px;
    transition: transform .22s ease,box-shadow .22s ease,border-color .22s
}

    .bcard:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow);
        border-color: var(--line-strong)
    }

.cover {
    background: linear-gradient(160deg,var(--surface-2),color-mix(in srgb,var(--primary-tint) 55%,var(--surface-2)))
}

    .cover .doc {
        border-radius: 4px;
        box-shadow: 0 14px 26px -14px rgba(20,18,15,.55)
    }

.bcard .b {
    padding: 15px 16px 13px
}

/* ---- gallery + photo captions ---- */
.gallery {
    gap: 16px
}

.photo {
    border-radius: 16px
}

    .photo img {
        transition: opacity .45s ease,transform .6s ease
    }

.gallery .photo.has-img:hover img {
    transform: scale(1.035)
}

.photo .cap {
    padding: 34px 18px 15px;
    font-size: 14.5px
}

/* ---- footer ---- */
footer.site {
    margin-top: 0
}

    footer.site .top {
        padding: 64px 0 44px
    }

    footer.site .fbrand img {
        height: 64px
    }

    footer.site .fbrand .ft0 {
        font-family: var(--dev-display);
        font-weight: 400;
        font-size: 30px;
        line-height: 1.1
    }

    footer.site .fbrand .ft1 {
        font-size: 22px;
        margin-top: 2px
    }

    footer.site .fbrand .ft2 {
        margin-top: 10px
    }

    footer.site .fcol a {
        transition: color .15s,padding-left .15s
    }

        footer.site .fcol a:hover {
            padding-left: 3px
        }

main > .wrap:last-child, main > .wrap:only-child {
    padding-bottom: 56px
}

/* ---- responsive: design layer ---- */
@media (max-width:1040px) {
    .hx-shade {
        background: linear-gradient(180deg,color-mix(in srgb,var(--primary-deep) 55%,transparent) 0%,color-mix(in srgb,var(--primary-deep) 82%,transparent) 55%,color-mix(in srgb,var(--primary-deep) 92%,transparent) 100%)
    }
}

@media (max-width:760px) {
    .section {
        padding: 60px 0
    }

    .sechead {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px
    }

        .sechead h2 {
            font-size: 28px
        }

    .hx {
        height: auto;
        min-height: 600px
    }

    .hx-body {
        align-items: flex-start;
        padding-top: 44px;
        padding-bottom: 150px
    }

    .hx-title .dev {
        font-size: 48px
    }

    .hx-title .en {
        font-size: 38px
    }

    .hx-title::after {
        margin-top: 16px
    }

    .hx-lede {
        font-size: 15.5px;
        margin: 14px 0 22px
    }

    .hx .bigsearch input {
        height: 52px;
        font-size: 15px
    }

    .hx-bar {
        padding-bottom: 70px;
        gap: 12px
    }

    .hx-cap {
        display: none
    }

    .hx-dots {
        margin-left: 0;
        max-width: none
    }

    .hx-btn {
        width: 40px;
        height: 40px
    }

    .brand .wm .t0 {
        font-size: 19px
    }

    .brand .wm .t1 {
        font-size: 17px
    }

    footer.site .fbrand .ft0 {
        font-size: 26px
    }
}

@media (max-width:420px) {
    .brand .wm .t0 {
        font-size: 18px
    }

    .brand .wm .t1 {
        font-size: 16px
    }

    .hx-title .dev {
        font-size: 42px
    }

    .hx-title .en {
        font-size: 33px
    }
}

@media (prefers-reduced-motion:reduce) {
    .hx-slide img, .hx-slide.is-active img {
        transform: none !important
    }

    .bcard {
        transition: none
    }
}

.hx-copy {
    max-width: 680px
}

/* ---- inner pages ---- */
body:not(.home) main {
    background: linear-gradient(180deg,color-mix(in srgb,var(--primary-tint) 50%,var(--paper)) 0,var(--paper) 340px)
}

.sechead h1 {
    font-size: 38px;
    letter-spacing: -.015em
}

.prose h1 {
    font-size: 40px;
    letter-spacing: -.015em
}

.itemhead h1 {
    font-size: 34px
}

.crumb {
    padding-top: 20px
}

.infocard, .facets, .panel, .formcard, .advcard, .profcard {
    border-radius: 16px
}

.metatable {
    border-radius: 14px
}

.photo-banner {
    border-radius: 20px;
    box-shadow: var(--shadow)
}
/* sign-in / register / reset: card over a tinted library photo */
body:not(.home) main:has(.authwrap) {
    position: relative;
    isolation: isolate;
    background: linear-gradient(160deg,color-mix(in srgb,var(--primary-deep) 82%,transparent),color-mix(in srgb,var(--primary-deep) 92%,transparent)), url("/assets/photos/hero-reading-hall-1280.jpg") center/cover no-repeat
}

main:has(.authwrap) .authwrap {
    padding: 64px 0 84px
}

main:has(.authwrap) .authcard {
    border: none;
    box-shadow: 0 40px 80px -30px rgba(0,0,0,.6);
    border-radius: 20px
}

    main:has(.authwrap) .authcard::before {
        content: "ज्ञानसंपदा · Dnyansampada";
        display: block;
        text-align: center;
        font-family: var(--dev-display),var(--serif);
        font-size: 15px;
        color: var(--accent-deep);
        margin: -6px 0 12px;
        letter-spacing: .02em
    }

/* =====================================================================
   COLLECTIONS STRUCTURE, HOME PAGE, CATALOGUE TREE, ADMIN
   ===================================================================== */
html {
    scroll-padding-top: calc(100px + env(safe-area-inset-top,0px))
}

.facets {
    top: 104px
}

/* ---- clean hero ---- */
.hx {
    height: clamp(560px,78vh,760px)
}

.hx-body {
    padding-bottom: 96px
}

.hx-title::after {
    display: none
}

.hx-lede {
    margin: 16px 0 26px;
    font-size: 18px
}

.hx-adv {
    display: inline-block;
    margin-top: 14px;
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(255,255,255,.85);
    text-decoration: underline;
    text-underline-offset: 4px
}

    .hx-adv:hover {
        color: #fff
    }

.hx-bar {
    padding-bottom: 36px
}

.hx-cap {
    min-width: 0;
    font-size: 13px;
    color: rgba(255,255,255,.78)
}

.hx-ct {
    margin-left: 0;
    padding-left: 0;
    border-left: none
}

.hx-dots {
    max-width: 220px
}

/* ---- collections grid (home + /collections/) ---- */
.cgrid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 16px
}

.ctile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    min-height: 168px;
    padding: 22px 22px 18px;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s,box-shadow .2s,transform .2s
}

    .ctile:hover {
        border-color: var(--line-strong);
        box-shadow: var(--shadow);
        transform: translateY(-2px)
    }

.ct-ic {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: var(--primary-tint);
    color: var(--primary);
    flex: 0 0 auto;
    transition: background .2s,color .2s
}

    .ct-ic .icon {
        width: 23px;
        height: 23px
    }

.ctile:hover .ct-ic, .ctile.is-open .ct-ic {
    background: var(--primary);
    color: #fff
}

.ct-name {
    font-family: var(--serif);
    font-size: 19.5px;
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: -.005em
}

.ct-desc {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--muted);
    margin-top: -8px
}

.ct-meta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary)
}

    .ct-meta .icon {
        width: 17px;
        height: 17px;
        transition: transform .2s
    }

.ct-go {
    color: var(--faint)
}

.ctile:hover .ct-go {
    color: var(--primary)
}

    .ctile:hover .ct-go .icon {
        transform: translateX(3px)
    }

.ctile.is-open {
    border-color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--primary)
}

    .ctile.is-open .ct-meta .icon {
        transform: rotate(180deg)
    }

.ctile.all {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff
}

    .ctile.all .ct-ic {
        background: rgba(255,255,255,.14);
        color: #fff
    }

    .ctile.all .ct-desc {
        color: rgba(255,255,255,.75)
    }

    .ctile.all .ct-go, .ctile.all:hover .ct-go {
        color: var(--accent)
    }

    .ctile.all:hover .ct-ic {
        background: rgba(255,255,255,.22)
    }

.cpanel {
    grid-column: 1 / -1;
    position: relative;
    margin-top: 2px;
    padding: 22px 24px 24px;
    border: 1px solid var(--chip-line);
    border-radius: 18px;
    background: color-mix(in srgb,var(--primary-tint) 40%,var(--surface));
    animation: cpin .22s ease
}

    .cpanel::before {
        content: "";
        position: absolute;
        top: -8px;
        left: calc(var(--notch,40px) - 8px);
        width: 14px;
        height: 14px;
        transform: rotate(45deg);
        background: inherit;
        border-left: 1px solid var(--chip-line);
        border-top: 1px solid var(--chip-line)
    }

@keyframes cpin {
    from {
        opacity: 0;
        transform: translateY(-6px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.cp-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(250px,1fr));
    gap: 10px
}

    .cp-list a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 16px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: var(--surface);
        font-size: 14.5px;
        font-weight: 600;
        color: var(--ink-soft);
        transition: border-color .15s,color .15s,box-shadow .15s
    }

        .cp-list a .icon {
            width: 19px;
            height: 19px;
            flex: 0 0 auto;
            color: var(--accent-deep)
        }

            .cp-list a .icon:last-child {
                margin-left: auto;
                color: var(--faint);
                width: 16px;
                height: 16px;
                transition: transform .15s,color .15s
            }

        .cp-list a:hover {
            border-color: var(--primary);
            color: var(--primary);
            box-shadow: var(--shadow-soft)
        }

            .cp-list a:hover .icon:last-child {
                color: var(--primary);
                transform: translateX(3px)
            }

.recent {
    padding-top: 0
}

body.home .sechead {
    margin-bottom: 24px
}

/* ---- catalogue facet tree ---- */
.ftree, .fkids {
    list-style: none;
    margin: 0;
    padding: 0
}

    .ftree > li {
        border-bottom: 1px dashed var(--line)
    }

        .ftree > li:last-child {
            border-bottom: none
        }

.frow {
    display: flex;
    align-items: center;
    gap: 4px
}

    .frow .chk {
        flex: 1;
        min-width: 0
    }

.ftog {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: none;
    background: none;
    color: var(--muted);
    display: grid;
    place-items: center;
    cursor: pointer
}

    .ftog:hover {
        background: var(--surface-2);
        color: var(--primary)
    }

    .ftog .icon {
        width: 16px;
        height: 16px;
        transition: transform .2s
    }

.fparent.is-open .ftog .icon {
    transform: rotate(180deg)
}

.fkids {
    margin: 0 0 8px 12px;
    padding-left: 14px;
    border-left: 2px solid var(--line)
}

    .fkids .chk {
        font-size: 13px;
        padding: 5px 0
    }

.chk .ct.zero {
    opacity: .55
}

.chk span:nth-child(2) {
    min-width: 0
}

/* ---- admin sub-collection rows ---- */
.tbl tr.subrow td {
    background: color-mix(in srgb,var(--surface-2) 60%,transparent)
}

    .tbl tr.subrow td.strong {
        font-weight: 500;
        padding-left: 34px
    }

.subarrow {
    color: var(--faint);
    margin-right: 8px
}

.modal .field select {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 0 12px;
    font-family: inherit;
    font-size: 14.5px;
    background: var(--surface);
    color: var(--ink)
}

@media (max-width:1040px) {
    .cgrid {
        grid-template-columns: repeat(2,1fr)
    }
}

@media (max-width:760px) {
    .hx {
        min-height: 540px
    }

    .hx-body {
        padding-bottom: 96px
    }

    .hx-bar {
        padding-bottom: 30px
    }

    .hx-cap {
        display: block
    }

    .hx-lede {
        font-size: 16px
    }

    .ctile {
        min-height: 0;
        padding: 18px 16px 16px;
        gap: 12px;
        border-radius: 16px
    }

    .ct-name {
        font-size: 17px
    }

    .ct-ic {
        width: 42px;
        height: 42px
    }

    .cpanel {
        padding: 18px 16px 18px
    }
}

@media (max-width:420px) {
    .cgrid {
        gap: 10px
    }

    .ct-name {
        font-size: 16px
    }
}

.hx .bigsearch {
    max-width: 640px
}

    .hx .bigsearch .scope {
        flex: 0 0 auto;
        width: 172px;
        text-overflow: ellipsis
    }

body.home .recent .bcard .cat {
    display: none
}

@media (max-width:560px) {
    .hx .bigsearch .scope {
        width: 100%
    }
}

.cp-list li {
    display: flex
}

.cp-list a {
    flex: 1
}

.cp-list .cp-all a {
    background: transparent;
    border-style: dashed;
    border-color: var(--chip-line);
    color: var(--primary)
}

    .cp-list .cp-all a .icon:first-child {
        color: var(--primary)
    }

    .cp-list .cp-all a:hover {
        background: var(--surface);
        border-style: solid
    }

/* ---- home: photo album + statistics (before the footer) ---- */
.album {
    background: color-mix(in srgb,var(--primary-tint) 38%,var(--paper))
}

    .album .gallery {
        grid-template-columns: 1.6fr 1fr 1fr;
        grid-template-rows: 230px 230px
    }

        .album .gallery .photo {
            aspect-ratio: auto;
            height: 100%
        }

            .album .gallery .photo:first-child {
                grid-row: 1 / span 2
            }

.ph-open {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: zoom-in
}

    .ph-open:focus-visible {
        outline: 3px solid var(--accent);
        outline-offset: -3px;
        border-radius: 16px
    }

.photo:not(.has-img) .ph-open {
    display: none
}

.stats {
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 64px 0
}

.st-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    margin: 0
}

    .st-grid > div {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 6px 20px;
        border-left: 1px solid var(--line)
    }

        .st-grid > div:first-child {
            border-left: none
        }

    .st-grid dd {
        order: -1;
        margin: 0;
        font-family: var(--serif);
        font-weight: 600;
        font-size: 52px;
        line-height: 1.05;
        color: var(--primary);
        letter-spacing: -.02em;
        font-variant-numeric: tabular-nums
    }

    .st-grid dt {
        margin-top: 8px;
        font-size: 12.5px;
        font-weight: 600;
        letter-spacing: .12em;
        text-transform: uppercase;
        color: var(--muted)
    }

    .st-grid dd::after {
        content: "";
        display: block;
        width: 28px;
        height: 2px;
        border-radius: 2px;
        background: var(--accent);
        margin: 14px auto 0
    }

.st-note {
    margin-top: 4px;
    font-size: 13px;
    color: var(--faint)
}

/* lightbox */
.lb {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 56px 72px;
    background: color-mix(in srgb,var(--primary-deep) 92%,#000)
}

    .lb.open {
        display: flex;
        animation: lbin .2s ease
    }

@keyframes lbin {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.lb figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    max-width: 100%;
    max-height: 100%
}

.lb img {
    max-width: min(1400px,100%);
    max-height: calc(100vh - 150px);
    border-radius: 10px;
    box-shadow: 0 30px 80px -30px rgba(0,0,0,.8);
    object-fit: contain
}

.lb figcaption {
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    text-align: center
}

    .lb figcaption span {
        display: block;
        margin-top: 2px;
        font-size: 12.5px;
        color: rgba(255,255,255,.6);
        font-variant-numeric: tabular-nums
    }

.lb-btn {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.35);
    background: rgba(255,255,255,.08);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background .15s
}

    .lb-btn:hover {
        background: rgba(255,255,255,.2)
    }

    .lb-btn .icon {
        width: 20px;
        height: 20px;
        stroke-width: 2
    }

.lb-close {
    top: 18px;
    right: 18px
}

.lb-prev {
    left: 18px;
    top: 50%;
    margin-top: -24px
}

.lb-next {
    right: 18px;
    top: 50%;
    margin-top: -24px
}

.lb :focus-visible {
    outline-color: #fff
}

body.lb-lock {
    overflow: hidden
}

@media (max-width:1040px) {
    .album .gallery {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: none
    }

        .album .gallery .photo {
            aspect-ratio: 4/3;
            height: auto
        }

            .album .gallery .photo:first-child {
                grid-row: auto;
                grid-column: 1 / -1;
                aspect-ratio: 16/9
            }

    .st-grid {
        grid-template-columns: repeat(2,1fr);
        row-gap: 36px
    }

        .st-grid > div:nth-child(3) {
            border-left: none
        }
}

@media (max-width:760px) {
    .stats {
        padding: 48px 0
    }

    .st-grid dd {
        font-size: 40px
    }

    .st-grid dt {
        font-size: 11.5px
    }

    .lb {
        padding: 64px 12px 80px
    }

    .lb-prev, .lb-next {
        top: auto;
        bottom: 16px;
        margin-top: 0
    }

    .lb-prev {
        left: calc(50% - 60px)
    }

    .lb-next {
        right: calc(50% - 60px)
    }
}

@media (max-width:560px) {
    .album .gallery {
        gap: 10px
    }

        .album .gallery .photo .cap {
            font-size: 12.5px;
            padding: 24px 10px 9px
        }
}
/* ---- New bilingual header account menu ---- */

header.site .acct {
    position: relative;
}

    header.site .acct .avatar {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        background: var(--primary);
        color: #fff;
        display: grid;
        place-items: center;
        font-weight: 600;
        font-size: 13px;
        cursor: pointer;
        border: none;
    }

        header.site .acct .avatar:hover {
            background: var(--primary-deep);
        }

    header.site .acct .menu {
        position: absolute;
        right: 0;
        top: 46px;
        left: auto;
        bottom: auto;
        width: auto;
        min-width: 230px;
        height: auto !important;
        max-height: none !important;
        overflow: visible;
        padding: 6px;
        margin: 0;
        background: #fff !important;
        border: 1px solid var(--line);
        border-radius: 12px;
        box-shadow: var(--shadow);
        opacity: 1 !important;
        visibility: visible !important;
        transform: none;
        display: none;
        z-index: 70;
    }

        header.site .acct .menu.open {
            display: block;
        }

        header.site .acct .menu .who {
            padding: 10px 12px 8px;
            border-bottom: 1px solid var(--line);
            margin-bottom: 4px;
            background: transparent;
        }

            header.site .acct .menu .who b {
                display: block;
                font-size: 14px;
                color: var(--ink);
                overflow-wrap: anywhere;
            }

            header.site .acct .menu .who span {
                font-size: 12px;
                color: var(--muted);
            }

        header.site .acct .menu a {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 9px 12px;
            border-radius: 7px;
            font-size: 14px;
            font-weight: 500;
            color: var(--ink-soft);
            background: transparent;
            cursor: pointer;
        }

            header.site .acct .menu a:hover {
                background: var(--surface-2);
                color: var(--primary);
            }

            header.site .acct .menu a .icon {
                width: 17px;
                height: 17px;
            }

        header.site .acct .menu .div {
            height: 1px;
            background: var(--line);
            margin: 4px 0;
        }

@media (max-width: 420px) {
    .signin {
        display: none;
    }
}



/* ============ ADMIN RESOURCES / USERS: modals, picker, notices ============ */
.rmodal {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    background: rgba(28,27,25,.55);
    align-items: center !important;
    justify-content: center !important;
    padding: 16px;
    overflow-y: auto
}

    .rmodal.open {
        display: flex !important
    }

.rbox {
    background: var(--surface);
    border-radius: 14px;
    width: 100%;
    max-width: 520px;
    margin: auto !important;
    padding: 28px;
    box-shadow: var(--shadow);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    position: relative
}

    .rbox h2 {
        font-size: 22px
    }

    .rbox .msub {
        color: var(--muted);
        font-size: 14px;
        margin: 5px 0 20px
    }

.rfoot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px
}

.rbox .hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--faint)
}

.rbox .inp select, .rbox .inp .sel {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 0 32px 0 14px;
    font: inherit;
    font-size: 14.5px;
    color: var(--ink);
    background-color: var(--surface)
}

    .rbox .inp select:focus {
        border-color: var(--primary);
        outline: none;
        box-shadow: 0 0 0 3px var(--primary-tint)
    }

.inp textarea {
    width: 100%;
    min-height: 84px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 10px 14px;
    font: inherit;
    font-size: 14.5px;
    background: var(--surface);
    color: var(--ink);
    resize: vertical
}

    .inp textarea:focus {
        border-color: var(--primary);
        outline: none;
        box-shadow: 0 0 0 3px var(--primary-tint)
    }

.inp input:disabled {
    background: var(--surface-2);
    color: var(--muted);
    cursor: not-allowed
}

.btn.danger {
    background: #8c1d18;
    color: #fff
}

    .btn.danger:hover {
        background: #6f1713
    }

.btn:disabled {
    opacity: .55;
    cursor: not-allowed
}

.rowacts button:disabled {
    opacity: .35;
    cursor: not-allowed
}

    .rowacts button:disabled:hover {
        border-color: var(--line);
        color: var(--muted)
    }

.notice {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.5;
    text-align: left
}

    .notice.err {
        background: #fbeceb;
        color: #8c1d18;
        border: 1px solid #efc4c1
    }

    .notice.warn {
        background: var(--accent-tint);
        color: #6a4208;
        border: 1px solid #ecd2a4
    }

.fmsg {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-top: 6px
}

    .fmsg[hidden] {
        display: none
    }

    .fmsg.err {
        background: #fbeceb;
        color: #8c1d18;
        border: 1px solid #efc4c1
    }

    .fmsg.ok {
        background: var(--ok-tint);
        color: var(--ok);
        border: 1px solid #c5dcc8
    }

.tbl td.desc {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.tbl td.strong a {
    color: inherit
}

/* row buttons + radio options */
.rp {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-soft);
    cursor: pointer
}

    .rp:hover {
        border-color: var(--primary);
        color: var(--primary)
    }

.opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--ink-soft);
    cursor: pointer
}

    .opt input {
        accent-color: var(--primary)
    }

.asearchbar select.sel {
    flex: 0 0 160px
}

/* searchable community picker */
.cb {
    position: relative
}

.cb-input {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 0 38px 0 14px;
    font: inherit;
    font-size: 14.5px;
    color: var(--ink);
    cursor: text;
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236b655c' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 14px center
}

    .cb-input:focus {
        border-color: var(--primary);
        outline: none;
        box-shadow: 0 0 0 3px var(--primary-tint)
    }

    .cb-input:disabled {
        background-color: var(--surface-2);
        color: var(--muted);
        cursor: not-allowed
    }

.cb-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 30;
    margin: 0;
    padding: 4px;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-height: 174px;
    overflow-y: auto
}

    .cb-list[hidden] {
        display: none
    }

    .cb-list li {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        height: 40px;
        padding: 0 12px;
        border-radius: 6px;
        font-size: 14px;
        color: var(--ink-soft);
        cursor: pointer
    }

        .cb-list li span {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap
        }

        .cb-list li em {
            font-style: normal;
            font-size: 11.5px;
            color: var(--faint);
            flex: 0 0 auto;
            max-width: 45%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap
        }

        .cb-list li:hover, .cb-list li.act {
            background: var(--surface-2);
            color: var(--primary)
        }

        .cb-list li.sel {
            background: var(--primary-tint);
            color: var(--primary);
            font-weight: 600
        }

        .cb-list li.cb-empty {
            cursor: default;
            color: var(--faint);
            justify-content: center
        }

.rmodal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--muted);
    padding: 6px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    transition: background .15s,color .15s
}

    .rmodal-close:hover {
        background: var(--surface-2);
        color: var(--primary)
    }

/* ============ PROFILE PAGE (pf-*) ============ */
.pf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px 40px;
    margin: 0
}

    .pf-grid .pf-item dt {
        font-size: 12.5px;
        color: var(--muted);
        font-weight: 500;
        margin: 0
    }

    .pf-grid .pf-item dd {
        font-size: 15.5px;
        color: var(--ink);
        font-weight: 500;
        margin: 3px 0 0
    }

        .pf-grid .pf-item dd.pf-empty {
            color: var(--faint);
            font-weight: 400
        }

@media(max-width:760px) {
    .pf-grid {
        grid-template-columns: 1fr
    }
}

.pf-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgba(28,27,25,.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px
}

    .pf-modal.pf-open {
        display: flex
    }

.pf-box {
    background: var(--surface);
    border-radius: 14px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 470px;
    padding: 26px 26px 22px;
    max-height: 92vh;
    overflow: auto
}

    .pf-box h2 {
        font-size: 20px;
        margin: 0 0 4px
    }

.pf-sub {
    color: var(--muted);
    font-size: 13.5px;
    margin: 0 0 18px
}

.pf-msg {
    display: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-bottom: 14px;
    background: var(--surface-2)
}

.pf-field {
    margin-bottom: 17px
}

    .pf-field label {
        display: block;
        font-size: 13px;
        font-weight: 600;
        color: var(--ink-soft);
        margin-bottom: 7px
    }

#modal-password .pf-field label::after {
    content: " *";
    color: var(--primary)
}

.pf-inp {
    position: relative
}

    .pf-inp input {
        width: 100%;
        height: 46px;
        border: 1px solid var(--line-strong);
        border-radius: 8px;
        padding: 0 14px;
        font-size: 14.5px;
        font-family: inherit;
        background: var(--surface);
        color: var(--ink)
    }

        .pf-inp input:focus {
            border-color: var(--primary);
            outline: none;
            box-shadow: 0 0 0 3px var(--primary-tint)
        }

.pf-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--faint);
    display: grid;
    place-items: center
}

    .pf-eye:hover {
        color: var(--primary)
    }

    .pf-eye svg {
        width: 18px;
        height: 18px;
        stroke: currentColor;
        fill: none;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round
    }

.pf-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px
}

.pf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s,border-color .15s,color .15s
}

    .pf-btn:disabled {
        opacity: .55;
        cursor: not-allowed
    }

.pf-btn-ghost {
    background: var(--surface);
    border-color: var(--line-strong);
    color: var(--ink-soft)
}

    .pf-btn-ghost:hover {
        border-color: var(--primary);
        color: var(--primary)
    }

.pf-btn-primary {
    background: var(--primary);
    color: #fff
}

    .pf-btn-primary:hover {
        background: var(--primary-deep)
    }

/* ============ READER ============ */
.rdbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: 14px 0 16px
}

.rdtitle h1 {
    font-size: 24px;
    line-height: 1.2
}

.rdtitle .asb {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
    overflow-wrap: anywhere
}

.rdacts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap
}

.rdframe {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    height: calc(100vh - 290px);
    min-height: 520px
}

    .rdframe iframe {
        display: block;
        width: 100%;
        height: 100%;
        border: 0
    }

@media(max-width:760px) {
    .rdframe {
        height: calc(100vh - 240px);
        min-height: 420px
    }

    .rdtitle h1 {
        font-size: 20px
    }
}

.btn.bm.on {
    border-color: var(--primary);
    color: var(--primary)
}

    .btn.bm.on svg {
        fill: var(--primary)
    }

/* ghost buttons on item page: keep text colour on hover/focus */
.itemcov .acts .btn.ghost, .itemcov .acts .btn.ghost:hover, .itemcov .acts .btn.ghost:focus, .itemcov .acts .btn.ghost:active, .itemcov .acts .btn.ghost.bm.on, .itemcov .acts .btn.ghost.bm.on:hover {
    background: transparent !important;
    color: var(--ink-soft) !important
}

    .itemcov .acts .btn.ghost:hover, .itemcov .acts .btn.ghost:focus, .itemcov .acts .btn.ghost.bm.on, .itemcov .acts .btn.ghost.bm.on:hover {
        color: var(--primary) !important;
        border-color: var(--primary) !important
    }

        .itemcov .acts .btn.ghost.bm.on svg {
            fill: var(--primary)
        }


/* =========================================
   LIGHTBOX FIX (Force Full Screen)
   ========================================= */
.lb {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important; /* Ensure it's above the sidebar and header */
    background: color-mix(in srgb, var(--primary-deep) 95%, #000) !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 40px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

    .lb.open {
        display: flex !important;
    }

    .lb figure {
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        max-width: 100%;
        max-height: 100%;
    }

    .lb img {
        max-width: 100%;
        max-height: calc(100vh - 120px);
        object-fit: contain;
        border-radius: 8px;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    }

    .lb figcaption {
        color: #fff;
        font-size: 16px;
        font-weight: 500;
        text-align: center;
        margin-top: 16px;
    }

.lb-btn {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000000;
    transition: background 0.2s;
}

    .lb-btn:hover {
        background: rgba(255, 255, 255, 0.2);
    }

.lb-close {
    top: 24px;
    right: 24px;
}

.lb-prev {
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.lb-next {
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

body.lb-lock {
    overflow: hidden !important;
}

/* Mobile responsive adjustments */
@media (max-width: 760px) {
    .lb {
        padding: 20px !important;
    }

    .lb-prev, .lb-next {
        top: auto;
        bottom: 20px;
        transform: none;
    }

    .lb-prev {
        left: calc(50% - 60px);
    }

    .lb-next {
        right: calc(50% - 60px);
    }

    .lb img {
        max-height: calc(100vh - 150px);
    }
}

/* ============ BOOKMARK: brown when saved ============ */
:root {
    --bookmark: #2f2a6e;
    --bookmark-tint: #2f2a6e;
}

.bm.on,
.iconbtn.bm.on,
.btn.bm.on,
.itemcov .acts .btn.ghost.bm.on,
.bm.on:hover, .bm.on:focus, .bm.on:active,
.itemcov .acts .btn.ghost.bm.on:hover,
.itemcov .acts .btn.ghost.bm.on:focus {
    color: var(--bookmark) !important;
    border-color: var(--bookmark) !important;
}

    .bm.on:hover,
    .itemcov .acts .btn.ghost.bm.on:hover {
        background: var(--bookmark-tint) !important;
    }

    .bm.on svg,
    .btn.bm.on svg,
    .itemcov .acts .btn.ghost.bm.on svg {
        fill: var(--bookmark) !important;
        stroke: var(--bookmark) !important;
    }

.bm:focus-visible {
    outline-color: var(--bookmark);
}
/* ============ USER ADDED CUSTOM FIXES ============ */
.dropzone.over {
    border-color: var(--primary);
    background: var(--primary-tint)
}

.filelist li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px
}
/* ===== Header always fixed ===== */
header.site {
    position: fixed !important;
    top: env(safe-area-inset-top, 0px) !important;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 50;
}

body {
    padding-top: 83px;
}
/* header height: 82px bar + 1px border */

@media (max-width: 760px) {
    body {
        padding-top: 67px;
    }
    /* mobile bar is 66px + 1px border */
}