/* V70 — the approved burgundy, antique gold and ivory design.
   Presentation only: the catalogue, search and PDF reader are unchanged. */
:root {
  --burgundy: #612b35;
  --burgundy-deep: #461f2b;
  --antique-gold: #bd9450;
  --gold: #96702e;
  --gold-light: #e5c582;
  --gold-dark: #765329;
  --bg: #f8f2e6;
  --bg2: #fffdf7;
  --bg3: #efe5d3;
  --bg4: #e7dbc6;
  --border: #ddcdb2;
  --text: #352a24;
  --text-dim: #625348;
  --text-faint: #6f5d4d;
  --green: #365d54;
  --sage: #e1e9df;
  --shadow: 0 5px 22px #461f2b0c;
}

body { background-color: var(--bg); color: var(--text); }
::selection { background: #e5c582; color: #352a24; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline-color: #986121;
  outline-offset: 4px;
}

/* A warm, solid foundation also remains readable if an image cannot load. */
.header, .info-header, #toolbar {
  background-color: #55262f;
  background-image: linear-gradient(110deg, #612b35, #461f2b);
  color: #fff5e4;
  border-bottom: 1px solid #b99150;
  box-shadow: 0 3px 16px #461f2b14;
}
.header .logo-text h1, .info-header .logo-text strong { color: #fff7e8; }
.header .logo-text p, .info-header .logo-text small { color: #f0ddc5; }
.header .logo-icon img, .info-header .logo-icon img {
  filter: brightness(1.5) saturate(.8);
}
.header-stats { color: #f0ddc5; }
.header-stats strong { color: #e5c582; }
.header .logo:focus-visible, .info-header a:focus-visible,
.sidebar button:focus-visible, .mobile-drawer-inner button:focus-visible,
#toolbar button:focus-visible, #toolbar input:focus-visible {
  outline-color: #f5d88c;
}
.search-wrap input { background: #fffaf0; border-color: #ddc594; }
.search-wrap input:focus { border-color: #d3ac65; box-shadow: 0 0 0 3px #e5c58240; }
.info-header .back-home { color: #f4dfb0; text-underline-offset: 4px; }
.info-header .back-home:hover { color: #fff7e8; text-decoration: underline; }

.sidebar, .mobile-drawer-inner {
  background-color: #562730;
  background-image: linear-gradient(155deg, #612b35, #461f2b);
  color: #fff2df;
  scrollbar-color: #b28e5c #51242d;
  border-color: #9b74443d;
}
.sidebar-section { border-bottom-color: #bd945044; }
.sidebar-group-title { color: #efd8b6; letter-spacing: 1.4px; }
.cat-btn, .cat-btn-all { color: #fff1dc; min-height: 44px; }
.cat-btn:hover, .cat-btn-all:hover { background: #713c43; color: #fff9ed; }
.cat-btn.active, .cat-btn-all.active {
  background: #886331;
  color: #fff8e9;
  border-left-color: #f1d083;
  box-shadow: inset 0 0 0 1px #cca35f;
}
.cat-count { background: #703b43; color: #fff3dd; border: 1px solid #d1a57624; }
.cat-btn.active .cat-count, .cat-btn-all.active .cat-count {
  background: #73512c;
  color: #fff9ed;
  border-color: #e7c6864d;
}
.mobile-cat-btn {
  background: #886331;
  color: #fff8e9;
  border: 1px solid #d5b271;
  box-shadow: inset 0 0 0 2px #ffffff08;
  min-height: 44px;
}
.mobile-cat-btn:focus-visible { outline-color: #f5d88c; }
.mobile-drawer { background: #28181ddd; }
.drawer-close {
  background: #713b43;
  color: #fff8e9;
  border-bottom-color: #bb965c;
  border-radius: 7px;
  margin-bottom: 12px;
}

.main { gap: 20px; }
.main-header {
  min-height: 238px;
  padding: 28px 30px;
  border-color: #e2cba2;
  background-color: #faf4e8;
  background-image:
    linear-gradient(90deg, #faf4e8 0%, #faf4e8 40%, #faf4e8a6 52%, #faf4e800 72%),
    url('mandala-lotus-v70.png');
  background-size: 100% 100%, auto 100%;
  background-position: center, right center;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 5px #ffffff26;
}
.main-header > div {
  max-width: 70%;
  border-left: 3px solid #ab7e36;
  padding: 3px 24px 3px 21px;
  background: linear-gradient(90deg, #faf4e8ed, #faf4e8e6 70%, #faf4e800);
}
.main-title { color: #352a24; }
.main-hint { color: #625348; }
.catalog-shortcuts a, .catalog-nav a {
  color: #612b35;
  font-weight: 600;
  text-decoration-color: #ae813f;
  text-underline-offset: 6px;
}
.catalog-shortcuts a:hover, .catalog-nav a:hover { color: #8b3e45; }
.book-card {
  border-color: #e0cfb2;
  box-shadow: 0 2px 5px #63432b05;
}
.book-card:hover {
  border-color: #b98d4a;
  box-shadow: 0 8px 24px #612b3512;
}
.book-card:focus-visible { outline-color: #886331; }
.book-cover, .book-card:nth-child(even) .book-cover {
  background-color: #f2e6ce;
  background-image: url('clouds-v70.svg'), radial-gradient(ellipse at 42% 15%, #fffdf4, #f0e3c8);
  background-size: 100% 100%, 100% 100%;
  background-repeat: no-repeat;
}
.book-cover::before {
  inset: 8px;
  border-color: #b08b4420;
  border-radius: 50%;
}
.book-name { font-family: LibrarySerif, Georgia, serif; font-weight: 700; }
.book-tag { color: #2d5145; background: #e1e9df; }
.book-card:nth-child(even) .book-tag { color: #69481e; background: #f0e0c0; }
.page-btn.active, .catalog-pages a[aria-current=page] {
  background: #612b35;
  border-color: #612b35;
  color: #fff8e9;
}
.page-btn:not(:disabled):hover, .catalog-pages a:hover { border-color: #a47b40; }
.ad-skip, .action-link { background: #612b35; color: #fff8e9; }
.action-link:hover, .ad-skip:not(:disabled):hover { background: #461f2b; }
.ad-timer { color: #612b35; }
.ad-slot { background: #f0e6d5; border-color: #d5c4a5; }
.toast { border-color: #bda579; }

.site-footer {
  background: #f3eadb;
  border-top: 1px solid #d8bc8a;
}
.footer-brand { color: #612b35; }
.site-footer .footer-tribute { color: #612b35; font-weight: 600; }
.site-footer-links a { color: #625348; }
.site-footer-links a:hover, .site-footer-links a[aria-current=page] { color: #612b35; }

.info-hero {
  background-color: #faf4e8;
  background-image:
    linear-gradient(90deg, #faf4e8 0%, #faf4e8f5 39%, #faf4e8c2 60%, #faf4e800 82%),
    url('mandala-lotus-v70.png');
  background-position: center, right center;
  background-size: 100% 100%, auto 100%;
  background-repeat: no-repeat;
  border-color: #dec69e;
  min-height: 228px;
}
.info-hero h1 { color: #352a24; }
.info-hero p { color: #625348; }
.eyebrow { color: #612b35; }
.tribute {
  border-top-color: #b68a43;
  background: linear-gradient(135deg, #fffdf7, #f7ecd9);
}
.tribute .tribute-label, .tribute h2 { color: #612b35; }
.tribute .dedication { color: #365d54; border-color: #dccaac; }
.privacy-table th { color: #612b35; background: #f1e6d2; }
.catalog-hero {
  background: linear-gradient(100deg, #fffdf7 40%, #f1e4cc);
  border-color: #ddc69f;
  border-left: 3px solid #b48845;
}
.catalog-hero h1, .catalog-directory h2, .number-group h2 { color: #612b35; }
.catalog-book:target { outline-color: #96702e; }
.number-group a:hover { border-color: #b0884c; background: #fcf6e9; }

/* Controls change colour; PDF pages and their selectable text layer do not. */
#bk-title { color: #fff7e8; }
#source-name, #reader-help, #pg-tot { color: #f0ddc5; }
#zoom-lbl { color: #f4dca6; }
#toolbar .btn { background: #fff7e8; border-color: #e1c99d; color: #52252d; }
#toolbar .btn:hover { background: #f0dfbf; }
#toolbar .btn-download { background: #e5c582; color: #3d261b; border-color: #efd494; }
#toolbar .btn-download:hover { background: #f0d99f; }
#pg-cur { background: #fffaf0; border-color: #dec491; color: #352a24; }
#pdf-wrap { background: #e9dfcf; }
.textLayer ::selection { background: rgba(189,148,80,.4); color: transparent; }
#ov-load { background: #f8f2e6fa; }
#ov-msg { color: #612b35; }
.spin { border-top-color: #612b35; }
.audit-v70 button { background: #612b35; color: #fff8e9; min-height: 44px; }
.audit-v70 h1 { color: #612b35; }
.audit-v70 a { color: #612b35; }
.audit-v70 pre { background: #fffdf7; border-color: #ddcdb2; }

@media (min-width:1850px) {
  .main-header { min-height: 270px; }
}
@media (max-width:1250px) and (min-width:769px) {
  .main-header { min-height: 215px; padding: 24px; }
  .main-header > div { max-width: 76%; padding-left: 17px; }
}
@media (max-width:768px) {
  .header { padding-bottom: 17px; }
  .main { padding-top: 12px; gap: 16px; }
  .main-header {
    min-height: 180px;
    padding: 19px 16px;
    background-image:
      linear-gradient(90deg, #faf4e8 0%, #faf4e8f2 51%, #faf4e8d9 68%, #faf4e800 92%),
      url('mandala-lotus-v70.png');
    background-position: center, calc(100% + 72px) center;
  }
  .main-header > div {
    max-width: 100%;
    border-left-width: 2px;
    padding-left: 12px;
    padding-right: 5px;
    background: none;
  }
  .main-title { font-size: 24px; line-height: 1.45; }
  .main-hint { max-width: 235px; }
  .book-name { font-size: 15px; line-height: 1.65; }
  .book-cover { height: 105px; }
  .catalog-shortcuts { column-gap: 18px; }
  .info-hero {
    min-height: 205px;
    background-image:
      linear-gradient(90deg, #faf4e8fa, #faf4e8e6 70%, #faf4e8a6),
      url('mandala-lotus-v70.png');
  }
  .info-hero p { background: transparent; max-width: 100%; font-size: 14px; }
  .info-hero .eyebrow { font-size: 11px; line-height: 1.8; }
  .site-footer .footer-tribute { line-height: 1.9; }
  #toolbar .btn { min-height: 44px; }
}
@media (max-width:359px) {
  .main-header { padding: 17px 12px; }
  .main-title { font-size: 22px; }
  .book-name { font-size: 14px; }
  .catalog-shortcuts { gap: 8px 14px; font-size: 13px; }
}
@media (forced-colors:active) {
  .header, .info-header, #toolbar, .sidebar, .mobile-drawer-inner,
  .main-header, .info-hero, .book-cover { background-image: none; }
  .header .logo-icon img, .info-header .logo-icon img { filter: none; }
}
