/*
Theme Name: Grace Community
Theme URI: https://graceindia.net
Author: Santoshpur Grace Community Centre
Description: Custom theme for Santoshpur Grace Community Centre (GRACEINDIA) and the Grace Christian Library (GRACEXNLIB) sub-site.
Version: 1.0
Text Domain: grace-community
*/

:root {
  --bg: #FFFFFF;
  --bg-raised: #FFFFFF;
  --bg-sunken: #FBF5E8;
  --bg-tint: #EEF2FB;
  --ink: #262137;
  --ink-soft: #6B6478;
  --indigo: #3B4E93;
  --indigo-bright: #4A5FAE;
  --terracotta: #DE7A3C;
  --marigold: #F3AE3D;
  --line: #ECE3C9;
  --airmail-red: #E0563F;
  --on-indigo: #FFFFFF;
  --shadow: 0 16px 32px -22px rgba(59, 78, 147, 0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Karla', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  color: var(--ink);
  text-wrap: balance;
  margin: 0 0 0.5em;
}
a { color: var(--indigo); text-decoration-color: rgba(59,78,147,0.35); }
a:hover { color: var(--terracotta); }
img { max-width: 100%; display: block; }
.screen-reader-text { position: absolute; left: -9999px; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

.eyebrow {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
}

/* ---------- Airmail stripe divider ---------- */
.airmail-rule {
  height: 8px;
  background: repeating-linear-gradient(
    -45deg,
    var(--airmail-red) 0 10px,
    var(--bg-raised) 10px 20px,
    var(--indigo) 20px 30px,
    var(--bg-raised) 30px 40px
  );
}

/* ---------- Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}
.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
  white-space: nowrap;
}
.site-branding img.custom-logo { max-height: 52px; width: auto; }
.site-branding .brand-mark {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--indigo);
  color: var(--on-indigo);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-raised);
  cursor: pointer;
  flex-shrink: 0;
}
.menu-toggle-bars {
  display: block;
  width: 18px; height: 13px;
  position: relative;
}
.menu-toggle-bars span {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}
.menu-toggle-bars span:nth-child(1) { top: 0; }
.menu-toggle-bars span:nth-child(2) { top: 5.5px; }
.menu-toggle-bars span:nth-child(3) { top: 11px; }
.menu-toggle.is-active .menu-toggle-bars span:nth-child(1) { top: 5.5px; transform: rotate(45deg); }
.menu-toggle.is-active .menu-toggle-bars span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .menu-toggle-bars span:nth-child(3) { top: 5.5px; transform: rotate(-45deg); }

.submenu-toggle {
  display: none;
  position: absolute;
  right: 0; top: 0;
  width: 36px; height: 36px;
  border: none;
  background: none;
  cursor: pointer;
}
.submenu-toggle::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--ink-soft);
  border-bottom: 1.5px solid var(--ink-soft);
  transform: translate(-50%, -70%) rotate(45deg);
  transition: transform 0.2s ease;
}
li.submenu-open > .submenu-toggle::before { transform: translate(-50%, -30%) rotate(225deg); }

.primary-menu {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0; padding: 0;
  font-size: 14px;
  flex-wrap: wrap;
}
.primary-menu li { position: relative; }
.primary-menu > li > a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 10px 2px;
  display: inline-block;
  position: relative;
  font-weight: 500;
  transition: color 0.2s ease;
}
.primary-menu > li > a::after {
  content: "";
  position: absolute;
  left: 2px; right: 2px; bottom: 4px;
  height: 2px;
  background: var(--terracotta);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s cubic-bezier(.4,0,.2,1);
}
.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a { color: var(--ink); }
.primary-menu > li > a:hover::after,
.primary-menu > li.current-menu-item > a::after { transform: scaleX(1); }
.primary-menu > li.menu-item-has-children > a { padding-right: 16px; }
.primary-menu > li.menu-item-has-children > a::after {
  content: "";
  position: absolute;
  right: 0; top: 50%;
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-100%) rotate(45deg);
  opacity: 0.55;
  transition: transform 0.2s ease;
}
.primary-menu > li.menu-item-has-children:hover > a::after {
  transform: translateY(-60%) rotate(225deg);
}
.primary-menu > li.menu-item-has-children > a::before,
.primary-menu > li.menu-item-has-children:hover > a::before {
  transform: none;
}

/* ---------- Nav icons (top-level items only) ---------- */
.primary-menu > li > a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.primary-menu > li > a::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  flex: none;
  background-color: currentColor;
  opacity: 0.65;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  transition: opacity 0.2s ease;
}
.primary-menu > li > a:hover::before,
.primary-menu > li.current-menu-item > a::before { opacity: 1; }

.primary-menu > li > a[href$="/sgcc/"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cline x1='12' y1='11' x2='12' y2='16'/%3E%3Ccircle cx='12' cy='7.5' r='0.5' fill='%23000'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cline x1='12' y1='11' x2='12' y2='16'/%3E%3Ccircle cx='12' cy='7.5' r='0.5' fill='%23000'/%3E%3C/svg%3E");
}
.primary-menu > li > a[href$="/activities/"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");
}
.primary-menu > li > a[href$="/category/news/"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cline x1='7' y1='9' x2='14' y2='9'/%3E%3Cline x1='7' y1='13' x2='17' y2='13'/%3E%3Cline x1='7' y1='17' x2='17' y2='17'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cline x1='7' y1='9' x2='14' y2='9'/%3E%3Cline x1='7' y1='13' x2='17' y2='13'/%3E%3Cline x1='7' y1='17' x2='17' y2='17'/%3E%3C/svg%3E");
}
.primary-menu > li > a[href$="/category/photo/"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 16l-5.5-5.5L5 21'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 16l-5.5-5.5L5 21'/%3E%3C/svg%3E");
}
.primary-menu > li > a[href$="/category/financial-report/"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='20' x2='5' y2='12'/%3E%3Cline x1='12' y1='20' x2='12' y2='4'/%3E%3Cline x1='19' y1='20' x2='19' y2='15'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='20' x2='5' y2='12'/%3E%3Cline x1='12' y1='20' x2='12' y2='4'/%3E%3Cline x1='19' y1='20' x2='19' y2='15'/%3E%3C/svg%3E");
}
.primary-menu > li > a[href$="/contact-us/"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpolyline points='3,7 12,13 21,7'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpolyline points='3,7 12,13 21,7'/%3E%3C/svg%3E");
}
.primary-menu > li > a[href*="/lib-category/old-testament/"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h13a3 3 0 0 1 3 3v12a2 2 0 0 0 -2 -2H4z'/%3E%3Cline x1='8' y1='9' x2='15' y2='9'/%3E%3Cline x1='8' y1='13' x2='15' y2='13'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h13a3 3 0 0 1 3 3v12a2 2 0 0 0 -2 -2H4z'/%3E%3Cline x1='8' y1='9' x2='15' y2='9'/%3E%3Cline x1='8' y1='13' x2='15' y2='13'/%3E%3C/svg%3E");
}
.primary-menu > li > a[href*="/lib-category/systematic-theology/"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='2,9 12,4 22,9 12,14'/%3E%3Cpath d='M6 11v4a6 3 0 0 0 12 0v-4'/%3E%3Cline x1='22' y1='9' x2='22' y2='15'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='2,9 12,4 22,9 12,14'/%3E%3Cpath d='M6 11v4a6 3 0 0 0 12 0v-4'/%3E%3Cline x1='22' y1='9' x2='22' y2='15'/%3E%3C/svg%3E");
}
.primary-menu > li > a[href*="/lib-category/pdf/"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='5' height='15'/%3E%3Crect x='9.5' y='3' width='5' height='17'/%3E%3Crect x='16' y='7' width='5' height='13'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='5' height='15'/%3E%3Crect x='9.5' y='3' width='5' height='17'/%3E%3Crect x='16' y='7' width='5' height='13'/%3E%3C/svg%3E");
}
.primary-menu > li > a[href*="/lib-category/creeds-catechisms/"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='6' width='14' height='12' rx='1'/%3E%3Ccircle cx='5' cy='12' r='2'/%3E%3Ccircle cx='19' cy='12' r='2'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='6' width='14' height='12' rx='1'/%3E%3Ccircle cx='5' cy='12' r='2'/%3E%3Ccircle cx='19' cy='12' r='2'/%3E%3C/svg%3E");
}
.primary-menu ul.sub-menu {
  display: block;
  position: absolute;
  top: 100%; left: 0;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  list-style: none;
  margin: 10px 0 0;
  padding: 8px;
  min-width: 230px;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.primary-menu li:hover > ul.sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.primary-menu ul.sub-menu li a {
  display: block;
  padding: 9px 12px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 5px;
  font-size: 13.5px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
}
.primary-menu ul.sub-menu li a:hover {
  background: var(--bg-sunken);
  color: var(--terracotta);
  padding-left: 16px;
}

/* ---------- Write-new button (board listings, admin only) ---------- */
.gcc-write-row { display: flex; justify-content: flex-end; margin-top: 28px; }
.gcc-write-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.gcc-write-btn:hover { transform: translateY(-2px) scale(1.05); background: var(--marigold); border-color: var(--marigold); }
.gcc-write-btn:hover::before { background-color: #241A05; }
.gcc-write-btn::before {
  content: "";
  display: block;
  width: 22px; height: 22px;
  background-color: var(--terracotta);
  transition: background-color 0.2s ease;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E");
}

/* ---------- Inline write form ---------- */
.gcc-write-panel {
  margin-top: 28px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-top: 3px solid var(--terracotta);
  border-radius: 6px;
  padding: clamp(20px, 4vw, 32px);
  box-shadow: var(--shadow);
}
.gcc-write-panel h3 { margin-bottom: 18px; }
.gcc-write-error {
  background: color-mix(in srgb, var(--airmail-red) 12%, transparent);
  border: 1px solid var(--airmail-red);
  color: var(--airmail-red);
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin-bottom: 18px;
}
.gcc-field-hint {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--ink-soft);
}
.gcc-field-hint-error { color: var(--airmail-red); }
.gcc-field {
  display: block;
  margin-bottom: 16px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.gcc-field span {
  display: block;
  margin-bottom: 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.gcc-field input[type="text"],
.gcc-field select,
.gcc-field textarea {
  width: 100%;
  font-family: 'Karla', sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  box-sizing: border-box;
}
.gcc-field textarea { resize: vertical; line-height: 1.6; }
.gcc-field input:focus, .gcc-field select:focus, .gcc-field textarea:focus {
  outline: none;
  border-color: var(--indigo);
}
.gcc-write-actions { display: flex; gap: 12px; margin-top: 6px; }
.gcc-btn-ghost-light { border: 1px solid var(--line); color: var(--ink-soft); }
.gcc-btn-ghost-light:hover { border-color: var(--ink-soft); color: var(--ink); }

/* ---------- Login/dashboard icon ---------- */
.nav-login-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  flex-shrink: 0;
  background-color: var(--ink-soft);
  opacity: 0.8;
  -webkit-mask-size: 16px;
  mask-size: 16px;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  transition: opacity 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.nav-login-icon:hover { opacity: 1; border-color: var(--indigo); background-color: var(--indigo); }
.nav-login-icon.icon-login {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-4'/%3E%3Cpolyline points='10,17 15,12 10,7'/%3E%3Cline x1='15' y1='12' x2='3' y2='12'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-4'/%3E%3Cpolyline points='10,17 15,12 10,7'/%3E%3Cline x1='15' y1='12' x2='3' y2='12'/%3E%3C/svg%3E");
}
.nav-login-icon.icon-user {
  background-color: var(--terracotta);
  border-color: var(--terracotta);
  opacity: 1;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c0-4 4-7 8-7s8 3 8 7'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c0-4 4-7 8-7s8 3 8 7'/%3E%3C/svg%3E");
}
.nav-login-icon.icon-user:hover { background-color: var(--indigo); border-color: var(--indigo); }

/* This item is an icon button, not a text menu link — cancel the generic
   menu-link treatment (icon pseudo, underline, padding) so only the
   .nav-login-icon circle itself shows. */
.primary-menu > li.nav-login-item { margin-left: 6px; }
.primary-menu > li.nav-login-item > a {
  padding: 0;
  display: inline-flex;
}
.primary-menu > li.nav-login-item > a::before,
.primary-menu > li.nav-login-item > a::after {
  content: none;
}

/* ---------- Mobile nav ---------- */

/* ---------- Mobile nav ---------- */
@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }

  .primary-menu {
    display: none;
    width: 100%;
    order: 3;
    flex-direction: column;
    gap: 0;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-top: 10px;
    padding: 6px;
  }
  .primary-menu.is-open { display: flex; }

  .primary-menu > li {
    width: 100%;
    border-bottom: 1px solid var(--line);
  }
  .primary-menu > li:last-child { border-bottom: none; }

  .primary-menu > li > a {
    width: 100%;
    padding: 14px 10px;
  }
  .primary-menu > li > a::after { display: none; }
  .primary-menu > li.menu-item-has-children > a::after { display: none; }
  .primary-menu > li > a[href]::before { margin-right: 10px; }

  .primary-menu > li.nav-login-item {
    width: auto;
    border-bottom: none;
    padding: 10px;
    align-self: flex-start;
  }
  .primary-menu > li.nav-login-item > a { width: 34px; height: 34px; padding: 0; }

  .submenu-toggle { display: block; }

  .primary-menu ul.sub-menu {
    display: none;
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: var(--bg-sunken);
    margin: 0 0 6px;
    padding: 4px 4px 4px 18px;
    min-width: 0;
  }
  li.submenu-open > ul.sub-menu { display: block; }
  .primary-menu ul.sub-menu li a:hover { padding-left: 12px; }
}

/* ---------- Library theme: dark reading-room palette ---------- */
.library-theme {
  --bg: #1B140D;
  --bg-raised: #241B12;
  --bg-sunken: #150F09;
  --bg-tint: #2A2013;
  --ink: #EDE2CC;
  --ink-soft: #B3A587;
  --indigo: #C9A24A;
  --indigo-bright: #DDB65A;
  --terracotta: #B5502F;
  --marigold: #D9A73B;
  --line: #3A2E1F;
  --on-indigo: #201A14;
  --shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.65);
}
.library-theme .g-card,
.library-theme .contact-card { box-shadow: var(--shadow), 0 0 0 1px rgba(201, 162, 74, 0.12); }
.library-theme .site-header { background: color-mix(in srgb, var(--bg) 88%, transparent); }
.library-theme ::selection { background: var(--indigo); color: var(--on-indigo); }

/* Book-spine shelf divider, replaces the airmail stripe inside the Library section */
.shelf-rule {
  height: 10px;
  background: repeating-linear-gradient(
    90deg,
    #7A2E22 0 8px,
    #C9A24A 8px 11px,
    #241B12 11px 22px,
    #B3A587 22px 24px,
    #1B140D 24px 36px
  );
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  border-bottom: 1px solid var(--line);
  background: var(--bg-sunken);
}
.breadcrumbs .wrap {
  padding-top: 12px;
  padding-bottom: 12px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12.5px;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.breadcrumbs a { color: var(--ink-soft); text-decoration: none; }
.breadcrumbs a:hover { color: var(--terracotta); }
.breadcrumbs .crumb-sep { opacity: 0.5; }
.breadcrumbs .crumb-current { color: var(--ink); font-weight: 600; }

/* ---------- Plain image banner (no overlay) ---------- */
.hero-banner img { width: 100%; height: auto; display: block; }
.library-theme .hero-banner img { width: auto; max-width: 100%; height: auto; margin: 0 auto; }

/* Rolling crossfade between two (or more) hero images */
.hero-slider {
  position: relative;
  aspect-ratio: 1920 / 600;
  overflow: hidden;
  background: var(--bg-sunken);
}
.hero-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero-slider img.active { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero-slider img { transition: none; }
}

@media (max-width: 780px) {
  .two-col-intro { grid-template-columns: 1fr !important; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--on-indigo);
  background: var(--indigo-bright);
  overflow: hidden;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.6;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(45,60,128,0.68) 0%, rgba(58,76,150,0.6) 52%, rgba(255,255,255,0.2) 84%, #FFFFFF 100%);
}
.hero .wrap {
  position: relative;
  padding-top: clamp(56px, 9vw, 96px);
  padding-bottom: clamp(48px, 8vw, 80px);
  max-width: 760px;
}
.hero .eyebrow { color: var(--marigold); }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.08; margin-top: 12px; color: #fff; }
.hero p.lead { margin-top: 18px; font-size: 1.1rem; color: #E7E2F2; max-width: 56ch; }
.hero-ctas { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 3px; font-weight: 600; font-size: 14.5px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.btn-primary { background: var(--marigold); color: #241A05; }
.btn-primary:hover { background: #E4AD48; color: #241A05; transform: translateY(-1px); box-shadow: 0 10px 20px -12px rgba(227,158,45,0.65); }
.btn-ghost { border-color: rgba(255,255,255,0.5); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,0.1); color: #fff; transform: translateY(-1px); }

/* ---------- Sections ---------- */
main { display: block; }
section { padding: clamp(48px, 7vw, 88px) 0; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-head p { color: var(--ink-soft); margin-top: 10px; }
.on-sunken { background: var(--bg-sunken); }

/* ---------- Ministry / card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.g-card {
  background: var(--bg-raised);
  border-radius: 4px;
  overflow: hidden;
  border-top: 3px solid var(--terracotta);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.g-card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -20px rgba(59,78,147,0.35); }
/* height:auto is required alongside aspect-ratio here: WordPress writes the
   source image's real height as an HTML attribute on every <img> it renders,
   and that attribute otherwise wins over the CSS aspect-ratio, so the box
   comes out however tall the original photo was instead of the 4:3 the ratio
   asks for. */
.g-card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; height: auto; transition: transform 0.4s ease; }
.g-card:hover img { transform: scale(1.04); }

.g-card-icon {
  aspect-ratio: 4/3;
  width: 100%;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.22s ease;
}
.g-card:hover .g-card-icon { background: var(--bg-sunken); }
.g-card-icon::before {
  content: "";
  display: block;
  width: 96px;
  height: 96px;
  background-color: var(--terracotta);
  opacity: 0.85;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  transition: transform 0.3s ease;
}
.g-card:hover .g-card-icon::before { transform: scale(1.08); }

.g-card-icon.icon-introduction::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 6.5c-1.6-1.2-4-1.8-6.5-1.8-1 0-1.7.1-2.5.3v13c.8-.2 1.5-.3 2.5-.3 2.5 0 4.9.6 6.5 1.8'/%3E%3Cpath d='M12 6.5c1.6-1.2 4-1.8 6.5-1.8 1 0 1.7.1 2.5.3v13c-.8-.2-1.5-.3-2.5-.3-2.5 0-4.9.6-6.5 1.8'/%3E%3Cline x1='12' y1='6.5' x2='12' y2='19.8'/%3E%3Cline x1='5.3' y1='8.2' x2='9' y2='8.7'/%3E%3Cline x1='5.3' y1='11.2' x2='9' y2='11.7'/%3E%3Cline x1='5.3' y1='14.2' x2='9' y2='14.7'/%3E%3Cline x1='15' y1='8.7' x2='18.7' y2='8.2'/%3E%3Cline x1='15' y1='11.7' x2='18.7' y2='11.2'/%3E%3Cline x1='15' y1='14.7' x2='18.7' y2='14.2'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 6.5c-1.6-1.2-4-1.8-6.5-1.8-1 0-1.7.1-2.5.3v13c.8-.2 1.5-.3 2.5-.3 2.5 0 4.9.6 6.5 1.8'/%3E%3Cpath d='M12 6.5c1.6-1.2 4-1.8 6.5-1.8 1 0 1.7.1 2.5.3v13c-.8-.2-1.5-.3-2.5-.3-2.5 0-4.9.6-6.5 1.8'/%3E%3Cline x1='12' y1='6.5' x2='12' y2='19.8'/%3E%3Cline x1='5.3' y1='8.2' x2='9' y2='8.7'/%3E%3Cline x1='5.3' y1='11.2' x2='9' y2='11.7'/%3E%3Cline x1='5.3' y1='14.2' x2='9' y2='14.7'/%3E%3Cline x1='15' y1='8.7' x2='18.7' y2='8.2'/%3E%3Cline x1='15' y1='11.7' x2='18.7' y2='11.2'/%3E%3Cline x1='15' y1='14.7' x2='18.7' y2='14.2'/%3E%3C/svg%3E");
}
.g-card-icon.icon-history::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cline x1='12' y1='3' x2='12' y2='4.6'/%3E%3Cline x1='12' y1='19.4' x2='12' y2='21'/%3E%3Cline x1='3' y1='12' x2='4.6' y2='12'/%3E%3Cline x1='19.4' y1='12' x2='21' y2='12'/%3E%3Cline x1='5.6' y1='5.6' x2='6.7' y2='6.7'/%3E%3Cline x1='17.3' y1='17.3' x2='18.4' y2='18.4'/%3E%3Cline x1='5.6' y1='18.4' x2='6.7' y2='17.3'/%3E%3Cline x1='17.3' y1='6.7' x2='18.4' y2='5.6'/%3E%3Cline x1='12' y1='12' x2='12' y2='6.8'/%3E%3Cline x1='12' y1='12' x2='16' y2='14.2'/%3E%3Ccircle cx='12' cy='12' r='0.9' fill='%23000'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cline x1='12' y1='3' x2='12' y2='4.6'/%3E%3Cline x1='12' y1='19.4' x2='12' y2='21'/%3E%3Cline x1='3' y1='12' x2='4.6' y2='12'/%3E%3Cline x1='19.4' y1='12' x2='21' y2='12'/%3E%3Cline x1='5.6' y1='5.6' x2='6.7' y2='6.7'/%3E%3Cline x1='17.3' y1='17.3' x2='18.4' y2='18.4'/%3E%3Cline x1='5.6' y1='18.4' x2='6.7' y2='17.3'/%3E%3Cline x1='17.3' y1='6.7' x2='18.4' y2='5.6'/%3E%3Cline x1='12' y1='12' x2='12' y2='6.8'/%3E%3Cline x1='12' y1='12' x2='16' y2='14.2'/%3E%3Ccircle cx='12' cy='12' r='0.9' fill='%23000'/%3E%3C/svg%3E");
}
.g-card-icon.icon-gb-members::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='5' r='2.3'/%3E%3Ccircle cx='4.5' cy='19' r='2.3'/%3E%3Ccircle cx='19.5' cy='19' r='2.3'/%3E%3Cpath d='M12 7.3v2.2'/%3E%3Cpath d='M4.5 16.7v-2.5h15v2.5'/%3E%3Cpath d='M12 9.5v2.5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='5' r='2.3'/%3E%3Ccircle cx='4.5' cy='19' r='2.3'/%3E%3Ccircle cx='19.5' cy='19' r='2.3'/%3E%3Cpath d='M12 7.3v2.2'/%3E%3Cpath d='M4.5 16.7v-2.5h15v2.5'/%3E%3Cpath d='M12 9.5v2.5'/%3E%3C/svg%3E");
}
.g-card .g-body { padding: 16px 18px 20px; flex: 1; overflow: hidden; }
.g-card h3 { font-size: 1rem; margin-bottom: 6px; transition: color 0.2s ease; }
.g-card:hover h3 { color: var(--terracotta); }
.g-card p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 980px) { .card-grid, .card-grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .card-grid, .card-grid.cols-3 { grid-template-columns: 1fr; } }

/* ---------- Library banner (home) ---------- */
.library-banner {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  color: #fff;
  box-shadow: var(--shadow);
  text-decoration: none;
  display: block;
  transition: box-shadow 0.25s ease;
}
.library-banner:hover { box-shadow: 0 26px 50px -22px rgba(29,43,76,0.5); }
.library-banner img { width: 100%; height: clamp(220px, 32vw, 340px); object-fit: cover; transition: transform 0.5s ease; }
.library-banner:hover img { transform: scale(1.03); }
.library-banner .btn-primary { transition: background 0.2s ease, transform 0.15s ease; }
.library-banner:hover .btn-primary { transform: translateX(4px); }
.library-banner .lb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(29,43,76,0.82) 0%, rgba(29,43,76,0.35) 65%, transparent 100%);
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(24px, 5vw, 56px);
}
.library-banner .lb-logo { max-height: 44px; height: auto; width: auto; margin-bottom: 14px; filter: brightness(0) invert(1); object-fit: contain; }
.library-banner h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.library-banner p { color: #E7E2F2; margin-top: 10px; max-width: 42ch; }
.library-banner .btn { margin-top: 18px; align-self: flex-start; }

/* ---------- Board listings (posts) ---------- */
.board-list { list-style: none; margin: 0; padding: 0; }
.board-list li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.board-list a.b-title { font-weight: 600; text-decoration: none; color: var(--ink); }
.board-list a.b-title:hover { color: var(--terracotta); }
.board-list .b-date { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }

.single-content { max-width: 72ch; }
.single-content h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
.post-meta { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 24px; }
.single-content .entry-content img { border-radius: 4px; margin: 20px 0; }
.single-content .entry-content { color: var(--ink); }

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  border: none !important;
  margin: 20px 0;
  font-size: 0.95rem;
}
.entry-content table th,
.entry-content table td {
  border: none !important;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.entry-content table th {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--terracotta);
  background: var(--bg-sunken);
  border-bottom: 2px solid var(--terracotta);
}
.entry-content table tr:last-child td { border-bottom: none; }
.entry-content table tr:hover td { background: var(--bg-tint); }
@media (max-width: 600px) {
  .entry-content table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* ---------- History-style year timeline (no table, no horizontal scroll) ---------- */
.gcc-timeline { margin: 24px 0; }
.gcc-timeline-group {
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--terracotta);
}
.gcc-timeline-group:first-child { padding-top: 0; margin-top: 0; border-top: none; }
.gcc-timeline-year {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--terracotta);
  margin-bottom: 10px;
}
.gcc-timeline-item {
  display: flex;
  gap: 14px;
  padding: 6px 0;
  align-items: baseline;
}
.gcc-timeline-date {
  flex: none;
  width: 56px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink-soft);
}
.gcc-timeline-item p { margin: 0; color: var(--ink); }
@media (max-width: 560px) {
  .gcc-timeline-item { flex-direction: column; gap: 2px; }
  .gcc-timeline-date { width: auto; }
}

.back-link { display: inline-block; font-size: 14px; }
.gcc-article-footer-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}
.gcc-edit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.gcc-edit-icon:hover { background: var(--marigold); border-color: var(--marigold); transform: translateY(-1px); }
.gcc-edit-icon::before {
  content: "";
  display: block;
  width: 15px; height: 15px;
  background-color: var(--terracotta);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  transition: background-color 0.2s ease;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E");
}
.gcc-edit-icon:hover::before { background-color: #241A05; }

/* ---------- Download link button (PDF/file attachments) ---------- */
.gcc-download-wrap { margin: 24px 0; }
.gcc-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  color: #241A05;
  background: var(--marigold);
  border: 1px solid transparent;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.gcc-download-btn:hover {
  background: #E4AD48;
  color: #241A05;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px -12px rgba(227,158,45,0.65);
}
.gcc-download-icon {
  display: block;
  width: 18px; height: 18px;
  flex-shrink: 0;
  background-color: #241A05;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1 -2 2H5a2 2 0 0 1 -2 -2v-4'/%3E%3Cpolyline points='7,10 12,15 17,10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1 -2 2H5a2 2 0 0 1 -2 -2v-4'/%3E%3Cpolyline points='7,10 12,15 17,10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E");
}

/* ---------- Library taxonomy pills ---------- */
.lib-cats { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0 0 32px; }
.lib-cats a {
  display: inline-block; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line); text-decoration: none; font-size: 13.5px; color: var(--ink);
}
.lib-cats a:hover { border-color: var(--indigo); color: var(--indigo); }
.lib-cats a.active { background: var(--indigo); color: var(--on-indigo); border-color: var(--indigo); }
.lib-cats.section-pills { margin-top: 6px; gap: 8px; }
@media (min-width: 1000px) {
  .lib-cats.section-pills {
    flex-wrap: nowrap;
    justify-content: center;
  }
  .lib-cats.section-pills a {
    white-space: nowrap;
    padding: 7px 12px;
    font-size: 12.5px;
  }
}

/* ---------- Governing body ---------- */
.gb-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.gb-card { text-align: center; }
.gb-card img { width: 108px; height: 108px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; border: 3px solid var(--bg-raised); box-shadow: var(--shadow); }
.gb-card h3 { font-size: 0.96rem; margin-bottom: 2px; }
.gb-card .role { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--terracotta); }
@media (max-width: 980px) { .gb-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 48px); }
.contact-card { background: var(--bg-tint); border-radius: 6px; border-top: 3px solid var(--indigo-bright); padding: clamp(24px, 4vw, 40px); }
.contact-row { margin-top: 20px; }
.contact-row .lbl { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--terracotta); }
.contact-row .val { margin-top: 4px; }
@media (max-width: 780px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-map {
  margin-top: clamp(24px, 5vw, 48px);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 16/7;
}
@media (max-width: 780px) { .contact-map { aspect-ratio: 4/3; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-sunken); color: var(--ink-soft); padding: 26px 0; font-size: 12.5px; border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.site-footer a { color: var(--indigo); }

/* ---------- Pagination ---------- */
.gcc-pagination { display: flex; gap: 10px; margin-top: 32px; }
.gcc-pagination a, .gcc-pagination span {
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; color: var(--ink); font-size: 13.5px;
}
.gcc-pagination .current { background: var(--indigo); color: #fff; border-color: var(--indigo); }

/* ---------- Library search ---------- */
.lib-search { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.lib-search input[type="search"] {
  flex: 1 1 260px; min-width: 0;
  padding: 11px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg);
  color: var(--ink); font-family: inherit; font-size: 14px;
}
.lib-search input[type="search"]::placeholder { color: var(--ink-soft); }
.lib-search input[type="search"]:focus {
  outline: none; border-color: var(--indigo);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--indigo) 22%, transparent);
}
.lib-search button {
  padding: 11px 22px; border-radius: 999px; border: 1px solid var(--indigo);
  background: var(--indigo); color: var(--on-indigo);
  font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.lib-search button:hover { filter: brightness(1.08); }
@media (max-width: 560px) {
  .lib-search button { flex: 1 1 100%; }
}
