:root {
    --ink: #18212f;
    --muted: #5d6b7a;
    --surface: #ffffff;
    --canvas: #f5f7fa;
    --line: #dbe2ea;
    --brand: #0c5d67;
    --brand-dark: #08434b;
    --accent: #d99532;
    --focus: #1b75a6;
    --shadow: 0 10px 28px rgba(24, 33, 47, 0.08);
    --shell: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-y: scroll; }
body { margin: 0; min-width: 320px; min-height: 100vh; overflow-x: hidden; overflow-y: auto; background: var(--canvas); color: var(--ink); font-family:  ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.site-shell { width: min(calc(100% - 40px), var(--shell)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 9px 13px; background: var(--ink); color: #fff; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.97); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; border-radius: 7px; background: var(--brand); color: #fff; font-family: Georgia, serif; font-weight: 700; letter-spacing: 0; }
.brand-logo { display: block; flex: 0 0 42px; width: 42px; height: 42px; object-fit: contain; }
.brand-copy { display: grid; min-width: 0; }
.brand-name { font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; font-weight: 700; line-height: 1.2; }
.brand-tagline { color: var(--muted); font-size: 0.74rem; }
.language-switcher { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 2px; padding: 3px; border: 1px solid #b8c8cd; border-radius: 999px; background: #f4f8f8; color: var(--muted); font-size: 0.75rem; box-shadow: 0 2px 8px rgba(24, 33, 47, 0.06); }
.language-switcher a { padding: 5px 9px; border-radius: 999px; color: var(--brand-dark); font-weight: 700; }
.language-switcher a:hover { background: #dceceb; }
.language-switcher::before { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--brand); color: #fff; content: '↔'; font-size: 0.85rem; font-weight: 700; }
html[lang="en"] .language-switcher a:first-of-type,
html[lang="bn"] .language-switcher a:last-of-type { background: var(--brand); color: #fff; box-shadow: 0 2px 5px rgba(12, 93, 103, 0.25); }
html[lang="en"] .language-switcher a:first-of-type::before,
html[lang="bn"] .language-switcher a:last-of-type::before { content: '✓ '; font-size: 0.7em; }

.primary-navigation ul { display: flex; align-items: center; gap: 3px; padding: 0; margin: 0; list-style: none; }
.primary-navigation a { display: block; padding: 9px 11px; border-bottom: 2px solid transparent; color: #465464; font-size: 0.91rem; font-weight: 650; }
.primary-navigation a:hover, .primary-navigation a.is-active { color: var(--brand); border-bottom-color: var(--accent); }
.nav-toggle { display: none; width: 42px; height: 42px; padding: 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); cursor: pointer; }
.nav-toggle-line { display: block; width: 20px; height: 2px; margin: 4px auto; background: var(--ink); transition: transform 180ms ease, opacity 180ms ease; }

.site-main { min-height: calc(100vh - 76px); }
.section-space { padding: 76px 0; }
.eyebrow { margin: 0 0 9px; color: var(--brand); font-size: 0.76rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
.hero-section { padding: 78px 0 84px; background: #e9f2f1; border-bottom: 1px solid #d6e2e1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.72fr); align-items: center; gap: clamp(36px, 7vw, 108px); }
.hero-copy h1, .section-heading h2, .library-info-grid h2, .cta-inner h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 700; line-height: 1.12; }
.hero-copy h1 { max-width: 660px; font-size: clamp(2.35rem, 5vw, 4.45rem); }
.hero-lead { max-width: 610px; margin: 19px 0 28px; color: #415865; font-size: 1.1rem; }
.catalog-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; max-width: 650px; padding: 5px; border: 1px solid #b8cece; border-radius: 7px; background: #fff; box-shadow: var(--shadow); }
.catalog-search input { min-width: 0; padding: 13px 15px; border: 0; background: transparent; color: var(--ink); font: inherit; }
.catalog-search input:focus { outline: 0; }
.catalog-search button, .cta-button { padding: 12px 18px; border: 0; border-radius: 5px; background: var(--brand); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.catalog-search button:hover, .cta-button:hover { background: var(--brand-dark); color: #fff; }
.text-link { display: inline-block; margin-top: 17px; color: var(--brand); font-size: 0.91rem; font-weight: 700; }
.hero-library-card { align-self: stretch; padding: 30px; border: 1px solid rgba(8, 67, 75, 0.18); border-radius: 7px; background: #fff; box-shadow: var(--shadow); }
.hero-card-label { display: block; color: var(--muted); font-size: 0.84rem; }
.hero-library-card strong { display: block; margin-top: 8px; color: var(--brand-dark); font-family: Georgia, "Times New Roman", serif; font-size: 2rem; }
.hero-library-card p { color: #475c65; }
.hero-library-card > span:last-child { color: var(--muted); font-size: 0.84rem; }
.library-slider { position: relative; overflow: hidden; align-self: stretch; min-height: 360px; border-radius: 9px; background: #172936; box-shadow: var(--shadow); }
.slider-track, .slider-slide { height: 100%; }
.slider-slide { position: absolute; inset: 0; display: grid; margin: 0; opacity: 0; transition: opacity 350ms ease; }
.slider-slide.is-active { opacity: 1; }
.slider-slide img { width: 100%; height: 100%; min-height: 360px; object-fit: cover; }
.slider-slide::after { position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(12, 31, 40, 0.9)); content: ''; }
.slider-slide figcaption { position: absolute; z-index: 1; right: 24px; bottom: 52px; left: 24px; color: #fff; }
.slider-slide figcaption strong, .slider-slide figcaption span { display: block; }
.slider-slide figcaption strong { font-family: Georgia, serif; font-size: 1.55rem; }
.slider-slide figcaption span { margin-top: 5px; color: #dce9e9; font-size: 0.86rem; line-height: 1.45; }
.slider-controls { position: absolute; z-index: 2; right: 18px; bottom: 16px; left: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.slider-arrow, .slider-dot { border: 1px solid rgba(255,255,255,0.55); background: rgba(23,41,54,0.68); color: #fff; cursor: pointer; }
.slider-arrow { width: 31px; height: 31px; border-radius: 50%; font-size: 1rem; }
.slider-dots { display: flex; gap: 7px; }
.slider-dot { width: 8px; height: 8px; padding: 0; border-radius: 50%; }
.slider-dot.is-active { background: var(--accent); border-color: var(--accent); }
.hero-card-rule { width: 42px; height: 3px; margin: 21px 0; background: var(--accent); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading h2, .library-info-grid h2, .cta-inner h2 { font-size: clamp(1.8rem, 3vw, 2.55rem); }
.outline-link { display: inline-block; padding: 9px 13px; border: 1px solid #b8c8cd; border-radius: 5px; color: var(--brand-dark); font-size: 0.88rem; font-weight: 700; white-space: nowrap; }
.outline-link:hover { border-color: var(--brand); background: #eef7f6; }
.book-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.book-card { display: grid; grid-template-columns: 196px minmax(0, 1fr); min-height: 203px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: 0 4px 13px rgba(24, 33, 47, 0.05); }
.book-cover-fallback { display: grid; min-height: 100%; place-items: center; background: #264e5a; color: #fff; }
.book-card:nth-child(3n + 2) .book-cover-fallback { background: #7b6132; }
.book-card:nth-child(3n) .book-cover-fallback { background: #66526c; }
.book-cover-fallback span { font-family: Georgia, serif; font-size: 2.4rem; font-weight: 700; }
.book-cover { width: 196px; height: 203px; max-height: 203px; object-fit: cover; }
.book-card-body { display: flex; flex-direction: column; min-width: 0; padding: 18px; }
.book-category { margin: 0 0 7px; color: var(--brand); font-size: 0.73rem; font-weight: 750; text-transform: uppercase; }
.book-card h3 { display: -webkit-box; margin: 0; overflow: hidden; font-family: Georgia, "Times New Roman", serif; font-size: 1.06rem; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.book-author, .book-meta { margin: 8px 0 0; color: var(--muted); font-size: 0.86rem; }
.book-meta { font-size: 0.76rem; }
.availability { margin: auto 0 0; padding-top: 14px; font-size: 0.79rem; font-weight: 700; }
.is-available { color: #277041; }.is-unavailable { color: #9a4a32; }
.empty-state { padding: 42px; border: 1px dashed #b6c5ca; border-radius: 7px; background: #fff; text-align: center; }.empty-state h3 { margin-top: 0; }
.categories-section { background: #fff; }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.category-card { display: grid; min-height: 153px; align-content: start; padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: #f9fbfb; transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease; }
.category-card:hover { border-color: #8bb2b0; color: var(--ink); box-shadow: 0 7px 18px rgba(24, 33, 47, 0.07); transform: translateY(-2px); }
.category-code { color: var(--brand); font-size: 0.76rem; font-weight: 700; }.category-name { margin-top: 9px; font-family: Georgia, serif; font-size: 1.08rem; font-weight: 700; }.category-count { margin-top: auto; padding-top: 18px; color: var(--muted); font-size: 0.8rem; }
.category-card { position: relative; overflow: hidden; color: #fff; background-position: center; background-size: cover; border-color: #38535d; }
.category-card::before { position: absolute; inset: 0; background: linear-gradient(145deg, rgba(9, 47, 57, 0.88), rgba(12, 31, 40, 0.55)); content: ''; }
.category-card:nth-child(3n + 1) { background-image: url('../images/covers/literature.jpg'); }
.category-card:nth-child(3n + 2) { background-image: url('../images/covers/history.jpg'); }
.category-card:nth-child(3n) { background-image: url('../images/covers/science.jpg'); }
.category-card > * { position: relative; z-index: 1; }
.category-code, .category-count { color: #d9efec; }
.category-name { color: #fff; }
.category-card:hover { border-color: var(--accent); color: #fff; transform: translateY(-3px); }
.library-info-section { background: #f0f4f4; }.library-info-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); gap: clamp(32px, 8vw, 135px); }.library-info-copy > p { margin-top: 0; color: #42535c; font-size: 1.03rem; }.library-info-copy dl { margin: 25px 0 0; }.library-info-copy dl div { display: grid; grid-template-columns: 130px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid #d3dfe0; }.library-info-copy dt { color: var(--brand-dark); font-weight: 700; }.library-info-copy dd { margin: 0; color: var(--muted); }
.cta-section { padding: 48px 0; background: var(--brand-dark); color: #fff; }.cta-section .eyebrow { color: #c7e5df; }.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; }.cta-button { flex: 0 0 auto; background: var(--accent); color: #20343c; }.cta-button:hover { background: #e7aa53; color: #20343c; }
.catalog-page-heading { padding: 58px 0; background: #e9f2f1; border-bottom: 1px solid #d6e2e1; }.catalog-page-heading h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(2.3rem, 5vw, 3.8rem); line-height: 1.1; }.catalog-page-heading p:last-child { max-width: 600px; margin: 15px 0 0; color: var(--muted); }
.books-page-heading { position: relative; overflow: hidden; color: #fff; background: linear-gradient(90deg, rgba(9, 47, 57, 0.9), rgba(9, 47, 57, 0.48)), url('../images/covers/literature.jpg') center 48% / cover; }
.books-page-heading .eyebrow, .books-page-heading p:last-child { color: #e5f3f1; }
.directory-page-heading, .contact-page-heading { position: relative; isolation: isolate; overflow: hidden; color: #fff; background-position: center; background-size: cover; }
.directory-page-heading::before, .contact-page-heading::before { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9, 47, 57, 0.9), rgba(9, 47, 57, 0.45)); content: ''; }
.directory-page-heading > *, .contact-page-heading > * { position: relative; z-index: 1; }
.directory-page-heading .eyebrow, .directory-page-heading p:last-child, .contact-page-heading .eyebrow, .contact-page-heading p:last-child { color: #e5f3f1; }
.directory-authors { background-image: url('../images/covers/literature.jpg'); }
.directory-publishers { background-image: url('../images/covers/history.jpg'); }
.directory-categories { background-image: url('../images/covers/science.jpg'); }
.contact-page-heading { background-image: url('../images/covers/history.jpg'); }
.about-page-heading { position: relative; isolation: isolate; overflow: hidden; color: #fff; background: linear-gradient(90deg, rgba(9, 47, 57, 0.9), rgba(9, 47, 57, 0.42)), url('../images/covers/science.jpg') center 46% / cover; }
.about-page-heading > * { position: relative; z-index: 1; }
.about-page-heading .eyebrow, .about-page-heading p:last-child { color: #e5f3f1; }
.reading-instruction-section { padding: 54px 0; border-top: 1px solid #d2e1df; border-bottom: 1px solid #d2e1df; background: #e9f2f1; }.reading-instruction-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); gap: clamp(34px, 8vw, 120px); }.reading-instruction-grid h2 { margin: 0; color: var(--brand-dark); font-family: Georgia, serif; font-size: clamp(1.9rem, 3.5vw, 3rem); line-height: 1.18; }.reading-message { margin: 0; color: #294650; font-size: 1.05rem; line-height: 1.7; }.reading-details { margin: 25px 0 0; }.reading-details div { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 15px; padding: 12px 0; border-top: 1px solid #c9dad8; }.reading-details dt { color: var(--brand-dark); font-size: 0.83rem; font-weight: 700; }.reading-details dd { margin: 0; color: #4a5c65; }.reading-details a { color: var(--brand); font-weight: 650; }.related-books-section { background: #fff; }.related-book-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }.related-book-card { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; min-height: 110px; padding: 13px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfc; }.related-book-card:hover { border-color: #8bb2b0; box-shadow: 0 6px 16px rgba(24, 33, 47, 0.06); color: var(--ink); }.related-cover { display: grid; place-items: center; border-radius: 4px; background: #264e5a; color: #fff; font-family: Georgia, serif; font-size: 1.45rem; font-weight: 700; }.related-book-card strong, .related-book-card small { display: block; }.related-book-card strong { display: -webkit-box; overflow: hidden; font-family: Georgia, serif; font-size: 0.96rem; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }.related-book-card small { margin-top: 6px; overflow: hidden; color: var(--muted); font-size: 0.76rem; text-overflow: ellipsis; white-space: nowrap; }.related-book-card .book-category { margin-bottom: 5px; font-size: 0.64rem; }
.info-page { background: #fff; }.info-page-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr); gap: clamp(34px, 8vw, 120px); }.info-page-grid h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(1.9rem, 3.5vw, 3rem); line-height: 1.18; }.info-page-grid > div:last-child > p { margin-top: 0; color: #42535c; font-size: 1.03rem; }.info-details { margin: 0; }.info-details div { display: grid; grid-template-columns: 135px minmax(0, 1fr); gap: 15px; padding: 13px 0; border-top: 1px solid var(--line); }.info-details dt { color: var(--brand-dark); font-size: 0.84rem; font-weight: 700; }.info-details dd { margin: 0; color: var(--muted); }.info-details a { color: var(--brand); font-weight: 650; }
.book-filter-form { margin-bottom: 30px; padding: 22px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 4px 13px rgba(24, 33, 47, 0.04); }.filter-primary-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 13px; align-items: end; }.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }.filter-control { display: grid; gap: 5px; min-width: 0; }.filter-control label { color: #445663; font-size: 0.78rem; font-weight: 700; }.filter-control input, .filter-control select { width: 100%; min-height: 41px; padding: 8px 10px; border: 1px solid #bfcbd1; border-radius: 5px; background: #fff; color: var(--ink); font: inherit; font-size: 0.88rem; }.filter-control input:focus, .filter-control select:focus { border-color: var(--brand); outline: 2px solid rgba(12, 93, 103, 0.18); }.filter-submit { min-height: 41px; padding: 8px 17px; border: 0; border-radius: 5px; background: var(--brand); color: #fff; font: inherit; font-size: 0.88rem; font-weight: 700; cursor: pointer; }.filter-submit:hover { background: var(--brand-dark); }.clear-filters-link { display: inline-block; margin-top: 17px; color: var(--brand); font-size: 0.84rem; font-weight: 700; }.clear-filters-link:hover { text-decoration: underline; }
.directory-search { display: grid; gap: 7px; max-width: 660px; margin-bottom: 28px; }.directory-search > label { color: #445663; font-size: 0.84rem; font-weight: 700; }.directory-search > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }.directory-search input { min-width: 0; min-height: 43px; padding: 9px 12px; border: 1px solid #bfcbd1; border-radius: 5px; font: inherit; }.directory-search button { min-height: 43px; padding: 8px 17px; border: 0; border-radius: 5px; background: var(--brand); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }.directory-search button:hover { background: var(--brand-dark); }.directory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }.directory-card { display: flex; min-height: 152px; flex-direction: column; padding: 19px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }.directory-card:hover { border-color: #8bb2b0; box-shadow: 0 7px 18px rgba(24, 33, 47, 0.07); color: var(--ink); }.directory-card-label { color: var(--brand); font-size: 0.7rem; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; }.directory-card strong { display: -webkit-box; margin-top: 9px; overflow: hidden; font-family: Georgia, serif; font-size: 1.13rem; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }.directory-card > span:last-child { margin-top: auto; padding-top: 18px; color: var(--muted); font-size: 0.82rem; }.directory-card i { color: var(--brand); font-style: normal; font-weight: 700; }.directory-empty-state { max-width: 650px; margin: 0 auto; }
.directory-card { position: relative; overflow: hidden; min-height: 190px; justify-content: flex-start; color: #fff; background-position: center; background-size: cover; box-shadow: 0 8px 20px rgba(24, 33, 47, 0.1); }
.directory-card::before { position: absolute; inset: 0; background: linear-gradient(145deg, rgba(11, 67, 77, 0.88), rgba(12, 31, 40, 0.62)); content: ''; }
.directory-card:nth-child(3n + 2) { background-image: url('../images/covers/history.jpg'); }
.directory-card:nth-child(3n) { background-image: url('../images/covers/science.jpg'); }
.directory-card:nth-child(3n + 1) { background-image: url('../images/covers/literature.jpg'); }
.directory-card > * { position: relative; z-index: 1; }
.directory-card:hover { color: #fff; border-color: var(--accent); box-shadow: 0 10px 24px rgba(24, 33, 47, 0.18); }
.directory-card-label, .directory-card > span:last-child, .directory-card i { color: #e7f4f2; }
.books-page { padding-top: 48px; }.results-toolbar { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 24px; color: var(--muted); font-size: 0.9rem; }.results-toolbar p { margin: 0; }.catalog-book-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }.catalog-book-card { display: grid; grid-template-columns: 136px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 4px 13px rgba(24, 33, 47, 0.05); }.catalog-cover-fallback { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; min-height: 100%; padding: 16px; background: #264e5a; color: #fff; text-align: center; }.catalog-book-card:nth-child(3n + 2) .catalog-cover-fallback { background: #7b6132; }.catalog-book-card:nth-child(3n) .catalog-cover-fallback { background: #66526c; }.catalog-cover-fallback span, .detail-cover-fallback span { font-family: Georgia, serif; font-size: 2.8rem; font-weight: 700; }.catalog-cover-fallback small { font-size: 0.65rem; letter-spacing: 0.05em; text-transform: uppercase; }.catalog-book-body { display: flex; min-width: 0; flex-direction: column; padding: 20px; }.catalog-book-body h2 { display: -webkit-box; margin: 0; overflow: hidden; font-family: Georgia, serif; font-size: 1.18rem; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }.book-facts { display: grid; grid-template-columns: 1fr; gap: 5px; margin: 14px 0; }.book-facts div { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 9px; font-size: 0.79rem; }.book-facts dt { color: var(--muted); }.book-facts dd { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.card-actions { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-top: auto; }.card-actions .availability { margin: 0; padding: 0; }.details-link { padding: 7px 9px; border-bottom: 2px solid var(--accent); color: var(--brand-dark); font-size: 0.79rem; font-weight: 700; white-space: nowrap; }.details-link:hover { color: var(--brand); }.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 38px; }.pagination > a, .pagination > span, .pagination-pages a { display: grid; min-width: 37px; height: 37px; place-items: center; padding: 0 9px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--brand-dark); font-size: 0.83rem; font-weight: 700; }.pagination > span { color: #9aa7ae; background: #f2f4f5; }.pagination-pages { display: flex; gap: 5px; }.pagination-pages a.is-current { border-color: var(--brand); background: var(--brand); color: #fff; }.catalog-empty-state { max-width: 650px; margin: 0 auto; }.back-link { display: inline-block; margin-bottom: 22px; color: var(--brand); font-size: 0.9rem; font-weight: 700; }.book-detail-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(30px, 6vw, 78px); }.detail-cover-fallback { display: grid; min-height: 330px; place-items: center; border-radius: 7px; background: #264e5a; color: #fff; }.book-detail-layout h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.14; }.detail-author { margin: 12px 0 23px; color: var(--muted); font-size: 1.04rem; }.detail-description { max-width: 780px; color: #42535c; }.detail-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 30px; margin: 29px 0 18px; }.detail-facts div { padding: 12px 0; border-top: 1px solid var(--line); }.detail-facts dt { color: var(--muted); font-size: 0.78rem; }.detail-facts dd { margin: 3px 0 0; font-weight: 650; }
.site-footer { margin-top: 72px; padding-top: 44px; background: #172936; color: #dbe7eb; }
.catalog-book-card { grid-template-columns: 196px minmax(0, 1fr); min-height: 203px; }
.catalog-cover { width: 196px; height: 203px; max-height: 203px; object-fit: cover; }
.contact-map-wrap { margin-top: 34px; }
.contact-map { display: block; width: 100%; min-height: 380px; border: 0; border-radius: 7px; box-shadow: 0 4px 13px rgba(24, 33, 47, 0.08); }
.book-detail-layout { grid-template-columns: 196px minmax(0, 1fr); }
.detail-cover { width: 196px; height: 203px; max-height: 203px; border-radius: 7px; object-fit: cover; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 34px; padding-bottom: 36px; }
.site-footer h2 { margin: 0 0 10px; color: #fff; font-size: 0.95rem; }
.site-footer p, .site-footer address { margin: 0 0 9px; color: #c4d0d6; font-size: 0.9rem; font-style: normal; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.brand-footer { margin-bottom: 12px; color: #fff; }
.brand-footer:hover { color: #fff; }
.brand-footer .brand-mark { background: var(--accent); color: #172936; }
.footer-bottom { padding: 16px 0; border-top: 1px solid rgba(219, 231, 235, 0.2); }
.footer-bottom p { margin: 0; color: #b7c6cc; font-size: 0.8rem; }

/* Footer layout override: keeps the three content columns aligned even when
   older cached CSS contains a malformed declaration. */
.site-footer > .footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); align-items: start; gap: 40px; padding-bottom: 36px; }
.site-footer > .footer-grid > section { min-width: 0; }
.site-footer .brand-logo { width: 42px; height: 42px; }

/* Related books use the same category covers as the main catalog cards. */
.related-book-card .related-cover { display: block; width: 56px; height: 84px; border-radius: 4px; object-fit: cover; }

@media (max-width: 900px) {
    .header-inner { min-height: 68px; }
    .nav-toggle { display: block; }
    .primary-navigation { position: absolute; top: calc(100% + 1px); right: 0; left: 0; display: none; padding: 14px 20px 18px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
    .primary-navigation.is-open { display: block; }
    .primary-navigation ul { display: grid; gap: 2px; width: min(calc(100% - 40px), var(--shell)); margin-inline: auto; }
    .primary-navigation a { padding: 11px 0; }
    .nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) { opacity: 0; }
    .nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-about { grid-column: 1 / -1; max-width: 560px; }
    .hero-grid, .library-info-grid { grid-template-columns: 1fr; }
    .reading-instruction-grid { grid-template-columns: 1fr; }
    .info-page-grid { grid-template-columns: 1fr; }
    .related-book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-library-card { max-width: 560px; }
    .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .catalog-book-grid { grid-template-columns: 1fr; }
    .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .site-shell { width: min(calc(100% - 28px), var(--shell)); }
    .brand-name { font-size: 1.05rem; }
    .brand-mark { flex-basis: 38px; width: 38px; height: 38px; }
    .brand-logo { flex-basis: 38px; width: 38px; height: 38px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .footer-about { grid-column: auto; }
    .site-footer { margin-top: 48px; }
    .section-space { padding: 52px 0; }
    .hero-section { padding: 53px 0 58px; }
    .library-slider { min-height: 300px; }
    .slider-slide img { min-height: 300px; }
    .slider-slide figcaption { right: 18px; bottom: 48px; left: 18px; }
    .slider-slide figcaption strong { font-size: 1.3rem; }
    .catalog-search { grid-template-columns: 1fr; padding: 6px; }
    .catalog-search button { width: 100%; }
    .section-heading, .cta-inner { align-items: start; flex-direction: column; }
    .book-grid, .category-grid { grid-template-columns: 1fr; }
    .book-card { grid-template-columns: 82px minmax(0, 1fr); min-height: 184px; }
    .book-cover { width: 82px; height: 184px; max-height: 184px; }
    .library-info-copy dl div { grid-template-columns: 1fr; gap: 2px; }
    .cta-button { width: 100%; text-align: center; }
    .results-toolbar { align-items: start; flex-direction: column; gap: 4px; }
    .book-filter-form { padding: 16px; }.filter-primary-row, .filter-grid { grid-template-columns: 1fr; }.filter-submit { width: 100%; }
    .directory-search > div { grid-template-columns: 1fr; }.directory-search button { width: 100%; }.directory-grid { grid-template-columns: 1fr; }
    .catalog-book-card { grid-template-columns: 105px minmax(0, 1fr); min-height: 180px; }
    .catalog-cover { width: 105px; height: 180px; max-height: 180px; }
    .catalog-book-body { padding: 16px; }
    .catalog-cover-fallback span { font-size: 2.25rem; }
    .catalog-cover-fallback small { display: none; }
    .book-facts div { grid-template-columns: 88px minmax(0, 1fr); }
    .card-actions { align-items: start; flex-direction: column; }
    .book-detail-layout { grid-template-columns: 1fr; }
    .reading-details div { grid-template-columns: 1fr; gap: 3px; }
    .info-details div { grid-template-columns: 1fr; gap: 3px; }
    .related-book-grid { grid-template-columns: 1fr; }
    .detail-cover-fallback { min-height: 175px; }
    .detail-facts { grid-template-columns: 1fr; }
    .pagination { gap: 4px; }.pagination > a, .pagination > span { min-width: auto; }.pagination-pages { gap: 3px; }
}

@media (min-width: 601px) and (max-width: 760px) {
    .catalog-book-card { grid-template-columns: 120px minmax(0, 1fr); min-height: 200px; }
    .catalog-cover { width: 120px; height: 200px; max-height: 200px; }
}
