/* =====================================================================
   ISLAMICSTUDIES.INFO — LIBRARY PAGE STYLES
   ---------------------------------------------------------------------
    1. Fonts
    2. Colours & theme (light / dark)
    3. Base
    4. Header
    5. Category menu (desktop)
    6. Mobile menu
    7. Hero & rotating readings
    8. Home page: notice, headings, cards, reading paths
    9. Category page
   10. Book boxes & badges
   11. Search results
   12. Footer
   13. Responsive adjustments
   14. Plain library list (shown only when JavaScript is off)
   ===================================================================== */


/* ---------------------------------------------------------------------
   1. FONTS
   No external font services and no font files are downloaded.
   Georgia comes from the visitor's own device (pre-installed on Windows
   and Apple); devices without it use Times New Roman / default serif.
   --------------------------------------------------------------------- */
@font-face {
  font-family: 'SiteGeorgia';
  font-weight: normal;
  font-style: normal;
  font-display: swap;
  src: local('Georgia');
}

:root {
  --f-serif:  'SiteGeorgia', Georgia, 'Times New Roman', serif;
  --f-sans:   system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --f-arabic: 'Traditional Arabic', 'Amiri', 'Noto Naskh Arabic', 'Geeza Pro', 'Arabic Typesetting', 'Times New Roman', serif;
}


/* ---------------------------------------------------------------------
   2. COLOURS & THEME
   Change colours here only. Every other rule uses these names.
   --------------------------------------------------------------------- */
:root {
  /* page */
  --bg:          #faf8f3;   /* page background (cream)        */
  --surface:     #ffffff;   /* boxes                          */
  --surface2:    #f3efe5;   /* small buttons inside boxes     */
  --ink:         #1d2a24;   /* main text                      */
  --muted:       #66716b;   /* secondary text                 */
  --line:        #e4ded0;   /* thin borders                   */

  /* brand */
  --accent:      #0f5c4a;   /* green links & highlights       */
  --accent-soft: #e3efe9;
  --gold:        #a97c22;   /* gold trim                      */
  --gold-soft:   #e9d7a8;   /* light gold text on green       */
  --hdr:         #0b4a3b;   /* header / hero / footer green   */
  --hdr-2:       #083a2e;   /* darker end of that gradient    */
  --hdr-ink:     #ffffff;   /* text on the green bands        */

  /* badges */
  --pdf:  #a8432f;  --pdf-soft:  #f7e6e1;
  --scan: #5a4fa3;  --scan-soft: #ebe8f7;
  --ext:  #2c6a9a;  --ext-soft:  #e2eef7;
  --buy:  #8a6414;  --buy-soft:  #f6edd8;

  /* shape */
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20,30,25,.06), 0 4px 16px rgba(20,30,25,.06);

  /* eight-pointed-star background patterns (gold on cream, white on green) */
  --pattern:       url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23a97c22' stroke-opacity='.13' stroke-width='1'%3E%3Crect x='18' y='18' width='36' height='36'/%3E%3Crect x='18' y='18' width='36' height='36' transform='rotate(45 36 36)'/%3E%3Ccircle cx='36' cy='36' r='7'/%3E%3Cpath d='M0 0l18 18M72 0L54 18M0 72l18-18M72 72L54 54'/%3E%3C/g%3E%3C/svg%3E");
  --pattern-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.09' stroke-width='1'%3E%3Crect x='18' y='18' width='36' height='36'/%3E%3Crect x='18' y='18' width='36' height='36' transform='rotate(45 36 36)'/%3E%3Ccircle cx='36' cy='36' r='7'/%3E%3Cpath d='M0 0l18 18M72 0L54 18M0 72l18-18M72 72L54 54'/%3E%3C/g%3E%3C/svg%3E");
}

/* Dark colours — used when the device is in dark mode (unless the visitor
   chose light with the moon button), or when the visitor chose dark.
   The two blocks below must stay identical. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111916;  --surface: #18221e;  --surface2: #1e2a25;
    --ink: #e7ece9; --muted: #9ba8a1;    --line: #2a3631;
    --accent: #4fb394;  --accent-soft: #1f3a31;  --gold: #d6a94b;
    --hdr: #0f2a23;     --hdr-2: #0a1d18;
    --pdf: #e48b75;  --pdf-soft: #3a2420;
    --scan: #a99ff0; --scan-soft: #2a2740;
    --ext: #7ab6e3;  --ext-soft: #1d2e3c;
    --buy: #e0b55a;  --buy-soft: #3a2f17;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
    --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23d6a94b' stroke-opacity='.07' stroke-width='1'%3E%3Crect x='18' y='18' width='36' height='36'/%3E%3Crect x='18' y='18' width='36' height='36' transform='rotate(45 36 36)'/%3E%3Ccircle cx='36' cy='36' r='7'/%3E%3Cpath d='M0 0l18 18M72 0L54 18M0 72l18-18M72 72L54 54'/%3E%3C/g%3E%3C/svg%3E");
  }
}
:root[data-theme="dark"] {
    --bg: #111916;  --surface: #18221e;  --surface2: #1e2a25;
    --ink: #e7ece9; --muted: #9ba8a1;    --line: #2a3631;
    --accent: #4fb394;  --accent-soft: #1f3a31;  --gold: #d6a94b;
    --hdr: #0f2a23;     --hdr-2: #0a1d18;
    --pdf: #e48b75;  --pdf-soft: #3a2420;
    --scan: #a99ff0; --scan-soft: #2a2740;
    --ext: #7ab6e3;  --ext-soft: #1d2e3c;
    --buy: #e0b55a;  --buy-soft: #3a2f17;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
    --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23d6a94b' stroke-opacity='.07' stroke-width='1'%3E%3Crect x='18' y='18' width='36' height='36'/%3E%3Crect x='18' y='18' width='36' height='36' transform='rotate(45 36 36)'/%3E%3Ccircle cx='36' cy='36' r='7'/%3E%3Cpath d='M0 0l18 18M72 0L54 18M0 72l18-18M72 72L54 54'/%3E%3C/g%3E%3C/svg%3E");
}


/* ---------------------------------------------------------------------
   3. BASE
   --------------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 84px;   /* keeps jump-to-section below the sticky header */
}

body {
  margin: 0;
  color: var(--ink);
  font: 15px/1.55 var(--f-sans);
  background-color: var(--bg);
  background-image: var(--pattern);
  background-attachment: fixed;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

main {
  padding-bottom: 40px;
}


/* ---------------------------------------------------------------------
   4. HEADER
   --------------------------------------------------------------------- */
header.top {
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 14px rgba(0,0,0,.12);
}

/* green band */
.hdr-main {
  background-image: var(--pattern-light), linear-gradient(180deg, var(--hdr), var(--hdr-2));
  border-bottom: 3px solid var(--gold);
}

.bar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 64px;
}

/* logo + site name (header and footer) */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--hdr-ink);
  font-family: var(--f-serif);
  font-weight: 700;
  font-size: 19px;
  white-space: nowrap;
}
.brand:hover {
  text-decoration: none;
}
.brand .mark {
  display: block;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(233,215,168,.35), 0 2px 6px rgba(0,0,0,.25);
}
.brand small {
  display: block;
  color: var(--gold-soft);
  font: 500 11px var(--f-sans);
  letter-spacing: .02em;
}

/* search box */
.search {
  position: relative;
  flex: 1;
  max-width: 380px;
  margin-left: auto;
}
.search input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 38px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font: inherit;
}
.search input::placeholder {
  color: rgba(255,255,255,.7);
}
.search input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  background: rgba(255,255,255,.18);
}
.search svg {
  position: absolute;
  left: 13px;
  top: 12px;
  width: 16px;
  height: 16px;
  color: rgba(255,255,255,.75);
}

/* dark-mode and menu buttons */
.iconbtn {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  color: #fff;
  cursor: pointer;
}
.iconbtn:hover {
  background: rgba(255,255,255,.18);
}
.iconbtn svg {
  width: 18px;
  height: 18px;
}

#menuBtn {
  display: none;   /* shown on small screens, see section 6 */
}


/* ---------------------------------------------------------------------
   5. CATEGORY MENU (desktop)
   --------------------------------------------------------------------- */
.hdr-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

nav.cats > ul {
  display: flex;
  justify-content: space-between;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
nav.cats > ul > li {
  position: relative;
}
nav.cats > ul > li > a {
  display: block;
  padding: 11px 6px;
  border-bottom: 2px solid transparent;
  color: var(--ink);
  font-weight: 500;
  font-size: 13.5px;
  white-space: nowrap;
}
nav.cats > ul > li > a:hover,
nav.cats > ul > li > a.on {
  border-bottom-color: var(--gold);
  color: var(--accent);
  text-decoration: none;
}

/* drop-down list of sections */
.mega {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
}
nav.cats > ul > li:last-child .mega,
nav.cats > ul > li:nth-last-child(2) .mega {
  left: auto;      /* last two menus open to the left so they stay on screen */
  right: 0;
}
nav.cats > ul > li:hover .mega,
nav.cats > ul > li:focus-within .mega {
  display: block;
}
.mega a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
}
.mega a:hover {
  background: var(--accent-soft);
  text-decoration: none;
}
.mega a span {
  color: var(--muted);
  font-size: 12px;
}


/* ---------------------------------------------------------------------
   6. MOBILE MENU (screens up to 1140px wide)
   --------------------------------------------------------------------- */
.drawer {
  display: none;
}

@media (max-width: 1140px) {
  nav.cats      { display: none; }
  #menuBtn      { display: grid; }
  .brand small  { display: none; }

  .drawer.open {
    display: block;
    position: fixed;
    inset: 67px 0 0 0;
    z-index: 49;
    overflow: auto;
    padding: 8px 16px 40px;
    background: var(--bg);
  }
  .drawer details {
    border-bottom: 1px solid var(--line);
  }
  .drawer summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 2px;
    list-style: none;
    font-weight: 600;
    cursor: pointer;
  }
  .drawer summary::-webkit-details-marker {
    display: none;
  }
  .drawer summary::after {
    content: "+";
    margin-left: auto;
    color: var(--muted);
    font-size: 20px;
  }
  .drawer details[open] summary::after {
    content: "–";
  }
  .drawer .dl {
    display: block;
    padding: 9px 12px 9px 50px;
    color: var(--ink);
  }
}


/* ---------------------------------------------------------------------
   7. HERO & ROTATING READINGS
   --------------------------------------------------------------------- */
.hero {
  color: #fff;
  background-image: var(--pattern-light), linear-gradient(135deg, var(--hdr) 0%, var(--hdr-2) 100%);
  border-bottom: 3px solid var(--gold);
  border-radius: 0 0 26px 26px;
}
.hero .wrap {
  padding-top: 34px;
  padding-bottom: 30px;
}
.hero h1 {
  margin: 0 0 4px;
  color: #fff;
  font-family: var(--f-serif);
  font-size: clamp(24px, 4vw, 34px);
}
.hero .hijri {
  margin: 0 0 6px;
  color: var(--gold-soft);
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hero p.sub {
  margin: 0 0 22px;
  opacity: .85;
}

/* All readings sit in the same grid cell, so the box always keeps the
   height of the longest one and the page never jumps. */
.verse {
  display: grid;
  padding: 18px 20px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(233,215,168,.35);
  border-radius: var(--radius);
  backdrop-filter: blur(2px);
}
.verse figure {
  grid-area: 1 / 1;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .6s ease, visibility .6s;
}
.verse figure.on {
  opacity: 1;
  visibility: visible;
}
.verse blockquote {
  margin: 0;
  color: #fff;
  font-family: var(--f-serif);
  font-size: 16.5px;
  line-height: 1.6;
}
.verse figcaption {
  margin-top: 10px;
  color: var(--gold-soft);
  font-size: 13px;
}
.verse figcaption a {
  color: inherit;
  text-decoration: underline;
}

/* slider dots */
.dots {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}
.dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  cursor: pointer;
}
.dots button.on {
  background: var(--gold);
}


/* ---------------------------------------------------------------------
   8. HOME PAGE
   --------------------------------------------------------------------- */

/* "Dear Readers" note */
.notice {
  margin: 22px 0 0;
  padding: 12px 16px;
  color: var(--ink);
  font-size: 14px;
  background-color: var(--buy-soft);
  background-image: var(--pattern);
  border: 1px solid color-mix(in srgb, var(--buy) 25%, transparent);
  border-radius: var(--radius);
}

/* section headings: "✦ Browse the Library" */
.section-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 34px 0 14px;
}
.section-h h2 {
  margin: 0;
  font-family: var(--f-serif);
  font-size: 22px;
}
.section-h h2::before {
  content: "✦";
  margin-right: 10px;
  color: var(--gold);
  font-size: .7em;
  vertical-align: .15em;
}
.section-h p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* category cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(20,30,25,.06), 0 12px 28px rgba(20,30,25,.12);
}
.card-h {
  display: flex;
  align-items: center;
  gap: 12px;
}
.card h3 {
  margin: 0;
  font-family: var(--f-serif);
  font-size: 18px;
}
.card h3 a {
  color: var(--ink);
}
.card .meta {
  color: var(--muted);
  font-size: 12px;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.card ul {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}
.card ul li::before {
  content: "›";
  margin-right: 7px;
  color: var(--gold);
}
.card .more {
  margin-top: auto;
  font-weight: 600;
  font-size: 14px;
}

/* round Arabic-letter medallion (cards, category title, mobile menu) */
.med {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--surface), var(--accent-soft));
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--line);
  color: var(--accent);
  font-family: var(--f-arabic);
  font-size: 24px;
  line-height: 1;
}

/* reading paths */
.paths {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}
.path {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.path h3 {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 16px;
}
.path p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}
.path ol {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
}
.path ol li::marker {
  color: var(--gold);
  font-weight: 600;
}


/* ---------------------------------------------------------------------
   9. CATEGORY PAGE
   --------------------------------------------------------------------- */
.crumbs {
  margin: 22px 0 8px;
  color: var(--muted);
  font-size: 13px;
}
.crumbs a {
  color: var(--muted);
}

/* title box */
.cat-h {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background-color: var(--surface);
  background-image: var(--pattern);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.cat-h .med {
  width: 58px;
  height: 58px;
  font-size: 32px;
}
.cat-h h1 {
  margin: 0;
  font-family: var(--f-serif);
  font-size: clamp(24px, 3.5vw, 32px);
}
.cat-h p {
  margin: 2px 0 0;
  color: var(--muted);
}

/* jump-to-section chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 6px;
}
.chips a {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  color: var(--ink);
  font-size: 13px;
}
.chips a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* section heading with short gold underline */
.group {
  margin-top: 28px;
}
.group h2 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(var(--gold), var(--gold)) left bottom / 64px 2px no-repeat;
  font-family: var(--f-serif);
  font-size: 19px;
}
.group h2 span {
  color: var(--muted);
  font: 500 12px var(--f-sans);
}

/* previous / next category */
.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 36px;
}
.pager a {
  flex: 1;
  max-width: 48%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
}
.pager a:hover {
  border-color: var(--accent);
  text-decoration: none;
}
.pager a.next {
  margin-left: auto;
  text-align: right;
}
.pager small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}


/* ---------------------------------------------------------------------
   10. BOOK BOXES & BADGES
   --------------------------------------------------------------------- */
.items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 8px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.item {
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: 10px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.item:hover {
  border-color: var(--line);
  border-left-color: var(--gold);
  box-shadow: var(--shadow);
  transform: translateX(2px);
}
.item .t {
  color: var(--ink);
  font-weight: 600;
}
.item .t:hover {
  color: var(--accent);
}
.item .o {                 /* Urdu / Arabic title */
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
}

/* PDF / Scanned / External / Buy */
.badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-left: 6px;
  vertical-align: 2px;
}
.b {
  padding: 3px 6px;
  border-radius: 5px;
  font: 600 10.5px/1 var(--f-sans);
  letter-spacing: .02em;
  white-space: nowrap;
}
.b.pdf   { background: var(--pdf-soft);  color: var(--pdf);  }
.b.scan  { background: var(--scan-soft); color: var(--scan); }
.b.ext   { background: var(--ext-soft);  color: var(--ext);  }
a.b.buy  { background: var(--buy-soft);  color: var(--buy);  }
a.b.buy:hover {
  filter: brightness(.95);
  text-decoration: none;
}

/* extra-part buttons: Vol. 2, Scanned pages, Syllabus … */
.subs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}
.subs a {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface2);
  color: var(--ink);
  font-size: 12.5px;
}
.subs a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}


/* ---------------------------------------------------------------------
   11. SEARCH RESULTS
   --------------------------------------------------------------------- */
.results-in {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12.5px;
}
.empty {
  padding: 40px 0;
  color: var(--muted);
  text-align: center;
}


/* ---------------------------------------------------------------------
   12. FOOTER
   --------------------------------------------------------------------- */
.site-foot {
  margin-top: 30px;
  color: rgba(255,255,255,.82);
  font-size: 14px;
  background-image: var(--pattern-light), linear-gradient(180deg, var(--hdr), var(--hdr-2));
  border-top: 3px solid var(--gold);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  align-items: start;
  gap: 16px;
  padding-top: 36px;
  padding-bottom: 28px;
}

.foot-about .brand {
  margin-bottom: 12px;
}
.foot-about p {
  max-width: 320px;
  margin: 0;
  line-height: 1.6;
}

.site-foot h4 {
  margin: 4px 0 12px;
  color: var(--gold-soft);
  font: 600 13px var(--f-sans);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.site-foot p {
  margin: 0 0 12px;
}
.site-foot ul {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-foot a {
  color: #fff;
  opacity: .88;
}
.site-foot a:hover {
  color: var(--gold-soft);
  opacity: 1;
  text-decoration: none;
}

/* contact e-mail image on a white pill */
.mailpill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fff;
}
.mailpill img {
  display: block;
  max-height: 22px;
}

/* bottom strip: © and publishers note */
.foot-bottom {
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.65);
  font-size: 12.5px;
}
.foot-bottom .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
}


/* ---------------------------------------------------------------------
   13. RESPONSIVE ADJUSTMENTS
   --------------------------------------------------------------------- */
@media (max-width: 860px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .brand > span:last-child { display: none; }   /* hide site name, keep logo */
  .search { max-width: none; }
  .section-h {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
}

@media (max-width: 520px) {
  .foot-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .grid,
  .items { grid-template-columns: 1fr; }
}


/* ---------------------------------------------------------------------
   14. PLAIN LIBRARY LIST
   The HTML lists you edit. Hidden once the script has built the page;
   shown as a simple readable page if JavaScript is switched off.
   --------------------------------------------------------------------- */
html.js #library {
  display: none;
}
#library {
  padding-top: 20px;
  padding-bottom: 40px;
}
#library h2 {
  margin: 30px 0 4px;
  font-family: var(--f-serif);
}
#library h3 {
  margin: 18px 0 6px;
  font-size: 16px;
}
#library li {
  margin: 4px 0;
}
#library #verses figure {
  margin: 0 0 12px;
}
