/**
* CliniLearn design layer.
* Loaded after main.css: sets the brand tokens and restyles the header, footer,
* home page, library pages, forms and sign-in screen.
*/

/*--------------------------------------------------------------
# Tokens
--------------------------------------------------------------*/
:root {
  --cl-blue: #27408b;
  --cl-blue-600: #1f3473;
  --cl-blue-700: #172757;
  --cl-blue-100: #dde5f6;
  --cl-blue-50: #eef2fb;
  --cl-blue-rgb: 39, 64, 139;
  --cl-green: #26a344;
  --cl-green-600: #1b7f33;
  --cl-green-50: #e8f6ec;
  --cl-ink: #0f1b2d;
  --cl-text: #344256;
  --cl-muted: #64748b;
  --cl-line: #e3e8ef;
  --cl-surface: #f5f7fa;
  --cl-white: #ffffff;
  --cl-danger: #c62f3b;
  --cl-radius: 12px;
  --cl-radius-sm: 8px;
  --cl-shadow-sm: 0 1px 2px rgba(15, 27, 45, 0.06);
  --cl-shadow: 0 1px 2px rgba(15, 27, 45, 0.04), 0 8px 24px rgba(15, 27, 45, 0.06);
  --cl-shadow-lg: 0 16px 40px rgba(15, 27, 45, 0.14);
  --cl-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* template variables, aligned with the brand */
  --font-default: var(--cl-font);
  --font-primary: var(--cl-font);
  --font-secondary: var(--cl-font);
  --color-default: var(--cl-text);
  --color-links: var(--cl-blue);
  --color-links-hover: var(--cl-blue-600);
  --color-primary: var(--cl-blue);
  --color-primary-light: #3d59ad;
  --color-primary-dark: var(--cl-blue-600);
  --color-primary-rgb: 39, 64, 139;
  --color-primary-light-rgb: 61, 89, 173;
  --color-primary-dark-rgb: 31, 52, 115;
  --color-secondary: var(--cl-ink);
  --bs-primary: var(--cl-blue);
  --bs-primary-rgb: 39, 64, 139;
  --bs-link-color: var(--cl-blue);
  --bs-link-hover-color: var(--cl-blue-600);
}

/*--------------------------------------------------------------
# Base
--------------------------------------------------------------*/
body {
  font-family: var(--cl-font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--cl-text);
  background: var(--cl-surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--cl-ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}

a { transition: color 0.15s ease; }

img { max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--cl-blue);
  outline-offset: 2px;
}

::selection { background: var(--cl-blue-100); color: var(--cl-ink); }

#main {
  padding-top: 0;
  min-height: 60vh;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cl-green-600);
}

.highlight {
  color: inherit !important;
  background: #fff1c2;
  border-radius: 3px;
  padding: 0 2px;
}

/*--------------------------------------------------------------
# Buttons
--------------------------------------------------------------*/
.theamBtn,
.theamBtn:hover {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 0;
  padding: 11px 22px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--cl-white);
  border: 1px solid var(--cl-blue);
  border-radius: 10px;
  background: var(--cl-blue);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.theamBtn:hover {
  background: var(--cl-blue-600);
  border-color: var(--cl-blue-600);
  box-shadow: 0 4px 12px rgba(var(--cl-blue-rgb), 0.25);
}

.theamBtn.is-outline {
  color: var(--cl-blue);
  background: var(--cl-white);
  border-color: var(--cl-blue-100);
}

.theamBtn.is-outline:hover {
  color: var(--cl-blue-600);
  background: var(--cl-blue-50);
  border-color: var(--cl-blue);
  box-shadow: none;
}

.theamBtn.is-light {
  color: var(--cl-ink);
  background: var(--cl-white);
  border-color: var(--cl-white);
}

.theamBtn.is-light:hover {
  color: var(--cl-blue);
  background: var(--cl-blue-50);
  border-color: var(--cl-blue-50);
}

.theamBtn.is-ghost-light {
  color: var(--cl-white);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.45);
}

.theamBtn.is-ghost-light:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--cl-white);
  box-shadow: none;
}

.theamBtn.is-sm,
.theamBtn.is-sm:hover {
  padding: 8px 14px;
  font-size: 13.5px;
  border-radius: 8px;
}

.theamBtn.is-block { width: 100%; }

.theamBtn:disabled,
.theamBtn:disabled:hover,
button:disabled.theamBtn {
  color: #8b97a8;
  background: #e6eaf0 !important;
  border-color: #e6eaf0;
  box-shadow: none;
  cursor: not-allowed;
}

.btn { font-weight: 600; border-radius: 8px; }

.btn-primary,
.btn-info {
  color: var(--cl-white);
  background: var(--cl-blue);
  border-color: var(--cl-blue);
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active,
.btn-info:hover, .btn-info:focus, .btn-info:active {
  color: var(--cl-white) !important;
  background: var(--cl-blue-600) !important;
  border-color: var(--cl-blue-600) !important;
}

.btn-secondary {
  color: var(--cl-blue);
  background: var(--cl-white);
  border-color: var(--cl-blue-100);
}

.btn-secondary:hover, .btn-secondary:focus, .btn-secondary:active {
  color: var(--cl-blue-600) !important;
  background: var(--cl-blue-50) !important;
  border-color: var(--cl-blue) !important;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--cl-blue);
  white-space: nowrap;
}

.link-arrow i { transition: transform 0.15s ease; }
.link-arrow:hover i { transform: translateX(3px); }

/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
.header {
  position: sticky;
  top: 0;
  padding: 0;
  background: var(--cl-white);
  border-bottom: 1px solid var(--cl-line);
  transition: box-shadow 0.2s ease;
}

.header.sticked { box-shadow: 0 6px 20px rgba(15, 27, 45, 0.08); }

.header-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 76px;
}

.header .logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.header .logo img {
  max-height: 50px;
  max-width: 220px;
  width: auto;
  margin: 0;
  object-fit: contain;
}

.site-search {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  max-width: 640px;
  height: 46px;
  padding: 0 5px 0 4px;
  background: var(--cl-surface);
  border: 1px solid var(--cl-line);
  border-radius: 999px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.site-search:focus-within {
  background: var(--cl-white);
  border-color: var(--cl-blue);
  box-shadow: 0 0 0 4px rgba(var(--cl-blue-rgb), 0.12);
}

.site-search select {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 30px 0 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--cl-ink);
  border: 0;
  border-right: 1px solid var(--cl-line);
  border-radius: 0;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M1.6 4.6a.75.75 0 0 1 1.06 0L8 9.94l5.34-5.34a.75.75 0 1 1 1.06 1.06l-5.87 5.87a.75.75 0 0 1-1.06 0L1.6 5.66a.75.75 0 0 1 0-1.06z'/%3E%3C/svg%3E") no-repeat right 12px center;
}

.site-search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0 14px;
  font-size: 14.5px;
  color: var(--cl-ink);
  border: 0;
  outline: none;
  background: transparent;
}

.site-search input::placeholder { color: #8b97a8; }
.site-search input::-webkit-search-cancel-button { display: none; }

.site-search button {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cl-white);
  border: 0;
  border-radius: 50%;
  background: var(--cl-blue);
  transition: background 0.15s ease;
}

.site-search button:hover { background: var(--cl-blue-600); }

.menus { background: var(--cl-blue); }

/* shared mega-menu pieces */
.navbar .mega { list-style: none; }

.mega-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.mega-head h5 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cl-muted);
}

.mega-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px 16px;
}

.mega-letters {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

@media (min-width: 1280px) {
  .navbar > ul { width: 100%; }

  .navbar > ul > li > a,
  .navbar > ul > li > a:focus {
    padding: 13px 15px;
    font-size: 14.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    transition: background 0.15s ease, color 0.15s ease;
  }

  .navbar > ul > li > a:before {
    height: 3px;
    background-color: #6fd58a;
    transition: transform 0.2s ease;
  }

  .navbar a:hover:before,
  .navbar li:hover > a:before,
  .navbar .active:before { transform: scaleX(1); }

  .navbar > ul > li > a:hover,
  .navbar > ul > li:hover > a,
  .navbar > ul > li > a.active,
  .navbar .dropdown > a:hover,
  .navbar .dropdown > a.active,
  .navbar .dropdown:hover > a {
    color: var(--cl-white);
    background: rgba(255, 255, 255, 0.1);
  }

  .navbar > ul > li > a span > i { font-size: 15px; }

  .navbar .nav-spacer { flex: 1 1 auto; }

  .navbar .megamenu > ul.mega {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: stretch;
    left: 0;
    right: 0;
    padding: 0;
    overflow: hidden;
    background: var(--cl-white);
    border: 1px solid var(--cl-line);
    border-top: 0;
    border-radius: 0 0 14px 14px;
    box-shadow: var(--cl-shadow-lg);
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  }

  .navbar .megamenu:hover > ul.mega { transform: none; }

  .navbar .megamenu .mega > li {
    flex: none;
    min-width: 0;
    padding: 24px 28px 26px;
    white-space: normal;
  }

  .navbar .megamenu .mega > li.mega-az {
    background: var(--cl-surface);
    border-left: 1px solid var(--cl-line);
  }

  .navbar .megamenu .mega .mega-links a,
  .navbar .megamenu .mega .mega-links a:focus {
    display: block;
    padding: 8px 10px;
    font-size: 14px;
    line-height: 1.35;
    color: var(--cl-text);
    white-space: normal;
    border-radius: 8px;
    background: none;
  }

  .navbar .megamenu .mega .mega-links a:hover {
    color: var(--cl-blue);
    background: var(--cl-blue-50);
  }

  .navbar .megamenu .mega .mega-letters a,
  .navbar .megamenu .mega .mega-letters a:focus {
    justify-content: center;
    height: 34px;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--cl-text);
    border: 1px solid var(--cl-line);
    border-radius: 8px;
    background: var(--cl-white);
  }

  .navbar .megamenu .mega .mega-letters a:hover {
    color: var(--cl-white);
    border-color: var(--cl-blue);
    background: var(--cl-blue);
  }

  .navbar .megamenu .mega a.mega-all,
  .navbar .megamenu .mega a.mega-all:focus,
  .navbar .megamenu .mega a.mega-all:hover {
    display: inline-flex;
    gap: 6px;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--cl-blue);
    background: none;
  }
}

@media (max-width: 1279px) {
  .header .brand-cl { margin-right: 46px; } /* room for the menu toggle */

  .mobile-nav-toggle {
    top: 24px;
    right: 18px;
    color: var(--cl-ink);
  }

  .navbar ul { background: var(--cl-blue-700); padding: 14px 0; }

  .navbar a,
  .navbar a:focus {
    font-size: 15px;
    white-space: normal;
    color: rgba(255, 255, 255, 0.86);
  }

  .navbar .nav-spacer { display: none; }

  .navbar .dropdown ul.mega {
    margin: 4px 14px 10px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
  }

  .navbar .mega > li + li { margin-top: 18px; }
  .navbar .mega-head h5 { color: rgba(255, 255, 255, 0.6); }
  .navbar .mega-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .navbar .megamenu .mega a,
  .navbar .megamenu .mega a:focus {
    padding: 7px 8px;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.86);
  }

  .navbar .megamenu .mega .mega-letters a {
    justify-content: center;
    padding: 6px 0;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
  }

  .navbar .megamenu .mega a.mega-all { padding: 0; font-weight: 600; color: #a9c0ff; }
}

@media (max-width: 767px) {
  .header-top-inner {
    flex-wrap: wrap;
    gap: 10px 16px;
    min-height: 0;
    padding-top: 10px;
    padding-bottom: 12px;
  }

  .header .logo img { max-height: 38px; max-width: 130px; }

  .site-search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
    height: 44px;
  }

  .site-search select { padding-left: 12px; }
  .mobile-nav-toggle { top: 19px; }
}

/*--------------------------------------------------------------
# Home: hero and stats
--------------------------------------------------------------*/
#hero1 {
  position: relative;
  padding: 44px 0 92px;
  color: var(--cl-white);
  text-align: center;
  background:
    linear-gradient(110deg, rgba(15, 27, 45, 0.9) 0%, color-mix(in srgb, var(--cl-blue-700) 78%, transparent) 55%, color-mix(in srgb, var(--cl-blue-600) 50%, transparent) 100%),
    var(--hero-img, url(../img/bhs.jpg)) center / cover no-repeat;
}

#hero1.no-stats { padding-bottom: 44px; }

#hero1 .eyebrow {
  padding: 6px 14px;
  color: #bfe9ca;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

#hero1 h1 {
  max-width: 820px;
  margin: 0 auto;
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--cl-white);
}

#hero1 h1 small {
  display: block;
  margin-bottom: 6px;
  font-size: 0.48em;
  font-weight: 500;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.8);
}

#hero1 p.lead {
  max-width: 620px;
  margin: 10px auto 0;
  font-size: 15.5px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.82);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.stats-band {
  position: relative;
  z-index: 2;
  margin-top: -52px;
  padding: 0;
  overflow: visible;
}

.stats-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--cl-line);
  border: 1px solid var(--cl-line);
  border-radius: 16px;
  box-shadow: var(--cl-shadow-lg);
}

.stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 26px;
  background: var(--cl-white);
}

.stat-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--cl-blue);
  border-radius: 12px;
  background: var(--cl-blue-50);
}

.stat .counter {
  display: block;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--cl-ink);
  font-variant-numeric: tabular-nums;
}

.stat .counter::after { content: "+"; color: var(--cl-green); }

.stat-label {
  display: block;
  margin-top: 2px;
  font-size: 13.5px;
  color: var(--cl-muted);
}

/*--------------------------------------------------------------
# Sections and media cards
--------------------------------------------------------------*/
.lib-section { padding: 64px 0; overflow: visible; }
.lib-section.is-alt { background: var(--cl-white); border-top: 1px solid var(--cl-line); border-bottom: 1px solid var(--cl-line); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.section-head h2 {
  margin: 4px 0 0;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
}

.section-header { padding-bottom: 32px; }
.section-header h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; color: var(--cl-ink); margin-bottom: 14px; }
.section-header p { color: var(--cl-muted); }

.media-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--cl-white);
  border: 1px solid var(--cl-line);
  border-radius: var(--cl-radius);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.media-card:hover {
  transform: translateY(-3px);
  border-color: var(--cl-blue-100);
  box-shadow: var(--cl-shadow);
}

.media-cover {
  position: relative;
  display: block;
  aspect-ratio: 7 / 10;
  overflow: hidden;
  background: #edf1f6;
}

.media-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-card.is-journal .media-cover {
  aspect-ratio: 4 / 5;
  padding: 14px;
  background: var(--cl-white);
  border-bottom: 1px solid var(--cl-line);
}

.media-card.is-journal .media-cover img { object-fit: contain; }

/* title printed on a generic cover */
.cover-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16%;
  text-align: center;
  color: var(--cl-white);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.cover-label strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cover-label span { font-size: 12px; opacity: 0.9; }

.media-body { padding: 14px 16px 16px; }

.media-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--cl-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.media-title a { color: inherit; }
.media-title a::after { content: ""; position: absolute; inset: 0; }
.media-card:hover .media-title { color: var(--cl-blue); }

.media-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--cl-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/*--------------------------------------------------------------
# Inner pages
--------------------------------------------------------------*/
.page-head {
  padding: 22px 0 24px;
  background: var(--cl-white);
  border-bottom: 1px solid var(--cl-line);
}

.page-head h1 {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700;
}

.page-head p { margin: 6px 0 0; color: var(--cl-muted); }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--cl-muted);
}

.crumbs a { color: var(--cl-muted); }
.crumbs a:hover { color: var(--cl-blue); }
.crumbs i { font-size: 10px; opacity: 0.7; }
.crumbs span { color: var(--cl-text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.lib-page { padding: 28px 0 72px; overflow: visible; }

.panel {
  background: var(--cl-white);
  border: 1px solid var(--cl-line);
  border-radius: var(--cl-radius);
  box-shadow: var(--cl-shadow-sm);
}

.panel-body { padding: 24px; }

/* filters */
.filter-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 12px;
  padding: 11px 16px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--cl-ink);
  background: var(--cl-white);
  border: 1px solid var(--cl-line);
  border-radius: 10px;
}

.filter-card + .filter-card { margin-top: 16px; }

.filter-card h2 {
  margin: 0;
  padding: 14px 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cl-muted);
  border-bottom: 1px solid var(--cl-line);
}

.filter-list {
  list-style: none;
  max-height: 340px;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cfd6e4 transparent;
}

.filter-list a {
  display: block;
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--cl-text);
  border-radius: 8px;
}

.filter-list a:hover { color: var(--cl-blue); background: var(--cl-blue-50); }

.filter-list a.active {
  font-weight: 600;
  color: var(--cl-blue);
  background: var(--cl-blue-50);
  box-shadow: inset 3px 0 0 var(--cl-blue);
}

.letter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  gap: 6px;
  padding: 14px;
}

.letter-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cl-text);
  border: 1px solid var(--cl-line);
  border-radius: 8px;
  transition: all 0.15s ease;
}

.letter-grid a:hover { color: var(--cl-blue); border-color: var(--cl-blue); background: var(--cl-blue-50); }
.letter-grid a.active { color: var(--cl-white); border-color: var(--cl-blue); background: var(--cl-blue); }

.result-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--cl-muted);
}

.result-bar strong { color: var(--cl-ink); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cl-blue);
  border-radius: 999px;
  background: var(--cl-blue-50);
}

.chip.is-green { color: var(--cl-green-600); background: var(--cl-green-50); }
a.chip:hover { color: var(--cl-blue-600); background: var(--cl-blue-100); }

/* list rows */
.lib-list { display: grid; gap: 12px; }

.lib-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  background: var(--cl-white);
  border: 1px solid var(--cl-line);
  border-radius: var(--cl-radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lib-row:hover { border-color: var(--cl-blue-100); box-shadow: var(--cl-shadow); }

.lib-thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--cl-line);
  border-radius: 8px;
  background: var(--cl-white);
}

.lib-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }

.lib-body { flex: 1 1 auto; min-width: 0; }

.lib-title {
  margin: 2px 0 0;
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.35;
}

.lib-title a { color: var(--cl-ink); }
.lib-title a:hover { color: var(--cl-blue); }

.lib-meta { margin: 4px 0 0; font-size: 13.5px; color: var(--cl-muted); }
.lib-meta strong { font-weight: 500; color: var(--cl-text); }
.lib-row .theamBtn { flex: 0 0 auto; }

.empty-state {
  padding: 56px 24px;
  text-align: center;
  color: var(--cl-muted);
  background: var(--cl-white);
  border: 1px dashed #cfd8e3;
  border-radius: var(--cl-radius);
}

.empty-state i { display: block; margin-bottom: 10px; font-size: 34px; color: #a9b6c7; }
.empty-state h3 { margin: 0 0 4px; font-size: 17px; }
.empty-state p { margin: 0; }

/* detail */
.detail {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  padding: 28px;
}

.detail-cover {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--cl-line);
  border-radius: 10px;
  background: #edf1f6;
  box-shadow: var(--cl-shadow);
}

.detail-cover img { display: block; width: 100%; height: auto; }

.detail-body h1 {
  margin: 6px 0 0;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  line-height: 1.25;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px 24px;
  margin: 22px 0 0;
  padding: 18px 0;
  border-top: 1px solid var(--cl-line);
  border-bottom: 1px solid var(--cl-line);
}

.meta-grid dt {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cl-muted);
}

.meta-grid dd { margin: 2px 0 0; font-size: 15px; font-weight: 500; color: var(--cl-ink); overflow-wrap: anywhere; }

.detail-desc { margin-top: 20px; color: var(--cl-text); }
.detail-desc > :last-child { margin-bottom: 0; }

.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.edition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.edition {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  color: var(--cl-text);
  background: var(--cl-white);
  border: 1px solid var(--cl-line);
  border-radius: var(--cl-radius);
  transition: all 0.15s ease;
}

.edition small { display: block; font-size: 12px; color: var(--cl-muted); }
.edition strong { display: block; font-size: 20px; font-weight: 700; line-height: 1.2; color: var(--cl-ink); }
.edition i { font-size: 18px; color: var(--cl-blue); transition: transform 0.15s ease; }

.edition:hover { color: var(--cl-text); border-color: var(--cl-blue); box-shadow: var(--cl-shadow); }
.edition:hover i { transform: translateX(3px); }

/* articles */
.group-title {
  margin: 28px 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cl-muted);
}

.group-title:first-child { margin-top: 0; }

.article-card {
  padding: 22px 24px;
  background: var(--cl-white);
  border: 1px solid var(--cl-line);
  border-radius: var(--cl-radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.article-card + .article-card { margin-top: 12px; }
.article-card:hover { border-color: var(--cl-blue-100); box-shadow: var(--cl-shadow); }

.article-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }

.article-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.article-title a { color: var(--cl-ink); }
.article-title a:hover { color: var(--cl-blue); }

.article-authors {
  display: flex;
  gap: 8px;
  margin: 8px 0 0;
  font-size: 13.5px;
  color: var(--cl-muted);
}

.article-abstract {
  margin-top: 12px;
  font-size: 14.5px;
  color: var(--cl-text);
}

.article-abstract:empty { display: none; }
.article-abstract p { margin: 0 0 8px; }
.article-abstract > :last-child { margin-bottom: 0; }

.article-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--cl-muted);
}

.article-facts strong { font-weight: 600; color: var(--cl-text); }

.article-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/*--------------------------------------------------------------
# Forms, cards, tables, pagination
--------------------------------------------------------------*/
.form-label {
  margin-bottom: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--cl-ink);
}

.form-control,
.form-select {
  padding: 10px 14px;
  font-size: 14.5px;
  color: var(--cl-ink);
  border: 1px solid #d5dce6;
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control::placeholder { color: #9aa6b6; }

.form-control:focus,
.form-select:focus {
  border-color: var(--cl-blue);
  box-shadow: 0 0 0 4px rgba(var(--cl-blue-rgb), 0.12);
}

.form-control[readonly] { color: var(--cl-text); background: var(--cl-surface); }
.form-check-input:checked { background-color: var(--cl-blue); border-color: var(--cl-blue); }
.form-hint { margin-top: 6px; font-size: 13px; color: var(--cl-muted); }

.form-step {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--cl-ink);
}

.form-step b {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--cl-white);
  border-radius: 50%;
  background: var(--cl-blue);
}

.card {
  border: 1px solid var(--cl-line);
  border-radius: var(--cl-radius);
  box-shadow: var(--cl-shadow-sm) !important;
}

.blog .card h4, .about .card h4 { font-weight: 700; color: var(--cl-ink) !important; }
.blog .card h5 { margin-top: 22px; font-size: 16px; }
.blog .card p { color: var(--cl-text); }

.about .tab-content h4 { color: var(--cl-ink); }
.about .tab-content i { color: var(--cl-green); }

.table { font-size: 14px; color: var(--cl-text); }

.table > thead th {
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cl-muted);
  white-space: nowrap;
  background: var(--cl-surface);
  border-bottom: 1px solid var(--cl-line);
}

.table > tbody td { padding: 12px 14px; vertical-align: middle; border-color: var(--cl-line); }
.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: #fafbfd; }
.table-hover > tbody > tr:hover > * { --bs-table-accent-bg: var(--cl-blue-50); }

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #d5dce6;
  border-radius: 8px;
  outline: none;
}

.dataTables_wrapper .dataTables_filter input:focus { border-color: var(--cl-blue); box-shadow: 0 0 0 4px rgba(var(--cl-blue-rgb), 0.12); }
.dataTables_wrapper .dataTables_info { padding-top: 14px; font-size: 13.5px; color: var(--cl-muted); }
.dataTables_wrapper .dataTables_paginate { padding-top: 10px; }

.pagination { flex-wrap: wrap; gap: 6px; margin: 0; }
.pagination .page-item { display: flex; align-items: center; color: var(--cl-muted); }

.page-link {
  min-width: 38px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  color: var(--cl-text);
  border: 1px solid var(--cl-line);
  border-radius: 8px !important;
  background: var(--cl-white);
}

.page-link:hover { color: var(--cl-blue); border-color: var(--cl-blue); background: var(--cl-blue-50); }
.page-link:focus { box-shadow: 0 0 0 4px rgba(var(--cl-blue-rgb), 0.12); }
.page-item.active .page-link { color: var(--cl-white); border-color: var(--cl-blue); background: var(--cl-blue); }
.page-item.disabled .page-link { color: #a3aebd; background: var(--cl-surface); }

.pager { display: flex; justify-content: center; margin-top: 28px; }
.pager nav { max-width: 100%; }

.alert { border-radius: 10px; font-size: 14.5px; }
.badge.bg-primary { background: var(--cl-blue-50) !important; color: var(--cl-blue); font-weight: 600; }

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.footer { font-size: 14px; color: rgba(255, 255, 255, 0.72); }

.footer .footer-content {
  padding: 56px 0 28px;
  background: var(--cl-ink);
}

.footer .footer-content .footer-info h3 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--cl-white);
}

.footer .footer-content .footer-info h3 span { color: #6fd58a; }

.footer .footer-content .footer-info p {
  max-width: 340px;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
}

.footer .footer-content .footer-info p + p { margin-top: 12px; }

.footer .footer-content h4 {
  margin-bottom: 16px;
  padding-bottom: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.footer .footer-content h4::after { display: none; }

.footer .footer-content .footer-links ul li { padding: 6px 0; gap: 10px; }
.footer .footer-content .footer-links ul li:first-child { padding-top: 6px; }

.footer .footer-content .footer-links ul i {
  padding: 0;
  font-size: 15px;
  color: #6fd58a;
}

.footer .footer-content .footer-links ul a,
.footer .footer-content .footer-links ul button {
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
  border: 0;
  background: none;
  transition: color 0.15s ease;
}

.footer .footer-content .footer-links ul a:hover,
.footer .footer-content .footer-links ul button:hover { color: var(--cl-white); }

.footer .footer-legal {
  padding: 18px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  background: #0a1422;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.scroll-top { border-radius: 10px; background: var(--cl-blue); box-shadow: var(--cl-shadow); }
.scroll-top:hover { background: var(--cl-blue-600); }

/*--------------------------------------------------------------
# Sign-in
--------------------------------------------------------------*/
.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  min-height: 100vh;
  background: var(--cl-white);
}

.auth-aside {
  position: relative;
  display: flex;
  align-items: center;
  padding: 64px clamp(32px, 6vw, 88px);
  overflow: hidden;
  color: var(--cl-white);
  background:
    radial-gradient(700px circle at 0% 0%, rgba(38, 163, 68, 0.28), transparent 60%),
    radial-gradient(900px circle at 100% 100%, rgba(61, 89, 173, 0.55), transparent 60%),
    linear-gradient(135deg, #0f1b2d 0%, #172757 60%, #1f3473 100%);
}

.auth-aside-inner { position: relative; max-width: 520px; }

.auth-aside .eyebrow {
  padding: 6px 14px;
  color: #bfe9ca;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.auth-aside h1 {
  margin: 22px 0 0;
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--cl-white);
}

.auth-aside p.lead {
  margin: 16px 0 0;
  font-size: 16px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
}

.auth-points { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 14px; }

.auth-points li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
}

.auth-points i {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #9fe3b1;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.09);
}

.auth-cta {
  margin: 36px 0 0;
  padding-top: 24px;
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.75);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.auth-cta a { font-weight: 600; color: var(--cl-white); text-decoration: underline; text-underline-offset: 3px; }
.auth-cta a:hover { color: #bfe9ca; }

.auth-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 28px;
  background: var(--cl-surface);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 34px 34px;
  background: var(--cl-white);
  border: 1px solid var(--cl-line);
  border-radius: 16px;
  box-shadow: var(--cl-shadow);
}

.auth-logo { display: block; height: 52px; width: auto; margin-bottom: 26px; }
.auth-card h2 { margin: 0; font-size: 22px; font-weight: 700; }
.auth-card .sub { margin: 6px 0 24px; font-size: 14.5px; color: var(--cl-muted); }
.auth-card .field + .field { margin-top: 16px; }

.input-icon { position: relative; }

.input-icon > i {
  position: absolute;
  top: 23px; /* half the input height: stays put when an error shows below */
  left: 14px;
  font-size: 16px;
  line-height: 1;
  color: #8b97a8;
  transform: translateY(-50%);
  pointer-events: none;
}

.input-icon .form-control { padding-left: 42px; height: 46px; }
.input-icon .form-control.has-toggle { padding-right: 46px; }
.input-icon .form-control.is-invalid { background-image: none; }

.pw-toggle {
  position: absolute;
  top: 23px;
  right: 6px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--cl-muted);
  border: 0;
  border-radius: 8px;
  background: none;
  transform: translateY(-50%);
}

.pw-toggle:hover { color: var(--cl-blue); background: var(--cl-blue-50); }

.auth-card .invalid-feedback { font-size: 13px; }
.auth-card .theamBtn { height: 46px; margin-top: 22px; }

.auth-foot { margin: 22px 0 0; font-size: 13px; text-align: center; color: var(--cl-muted); }

.modal-content { border: 0; border-radius: 16px; box-shadow: var(--cl-shadow-lg); }
.modal-header { align-items: flex-start; padding: 24px 28px 18px; border-bottom: 1px solid var(--cl-line); }
.modal-header h5 { margin: 0; font-size: 19px; font-weight: 700; }
.modal-header p { margin: 4px 0 0; font-size: 14px; color: var(--cl-muted); }
.modal-body { padding: 22px 28px; }

.modal-footer {
  justify-content: space-between;
  gap: 14px;
  padding: 18px 28px 22px;
  border-top: 1px solid var(--cl-line);
  background: var(--cl-surface);
  border-radius: 0 0 16px 16px;
}

.modal-footer .form-check { margin: 0; font-size: 13.5px; color: var(--cl-text); }
.err { display: block; font-size: 13px; }
.err:empty { display: none; }

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/
@media (max-width: 991px) {
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth-aside { padding: 40px 24px; }
  .auth-points { display: none; }
  .auth-cta { margin-top: 22px; padding-top: 18px; }
  .auth-main { padding: 32px 16px 28px; }

  .detail { grid-template-columns: 180px minmax(0, 1fr); gap: 24px; padding: 22px; }
}

@media (max-width: 767px) {
  #hero1 { padding: 32px 0 84px; }
  #hero1.no-stats { padding-bottom: 32px; }
  .stats-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; }
  .stat-icon { flex-basis: 40px; width: 40px; height: 40px; font-size: 19px; }
  .stat .counter { font-size: 22px; }

  .lib-section { padding: 44px 0; }
  .section-head { align-items: center; }

  .detail { grid-template-columns: 1fr; }
  .detail-cover { max-width: 200px; }

  .lib-row { flex-wrap: wrap; gap: 14px; padding: 14px; }
  .lib-thumb { flex-basis: 56px; width: 56px; height: 72px; }
  .lib-body { flex-basis: calc(100% - 70px); }
  .lib-row .theamBtn { width: 100%; }

  .article-card { padding: 18px; }
  .article-title { font-size: 16.5px; }
  .panel-body { padding: 18px; }
  .auth-card { padding: 28px 22px; }
  .modal-footer { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  :root { scroll-behavior: auto; }
}

/*--------------------------------------------------------------
# Profile menu, search suggestions, save buttons, tabs, pages
--------------------------------------------------------------*/
.site-search { position: relative; }

.search-suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 1000;
  max-height: min(70vh, 460px);
  overflow-y: auto;
  padding: 8px;
  text-align: left;
  background: var(--cl-white);
  border: 1px solid var(--cl-line);
  border-radius: 14px;
  box-shadow: var(--cl-shadow-lg);
}

.search-suggest[hidden] { display: none; }

.search-suggest h6 {
  margin: 0;
  padding: 8px 10px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cl-muted);
}

.search-suggest a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  color: var(--cl-ink);
  border-radius: 8px;
}

.search-suggest a > i { margin-top: 2px; font-size: 15px; color: var(--cl-blue); }
.search-suggest a strong { display: block; font-size: 14px; font-weight: 500; line-height: 1.35; }
.search-suggest a small { display: block; font-size: 12.5px; color: var(--cl-muted); }
.search-suggest a:hover, .search-suggest a.is-active { background: var(--cl-blue-50); }

.search-suggest a.suggest-all {
  justify-content: center;
  margin-top: 4px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--cl-blue);
  border-top: 1px solid var(--cl-line);
  border-radius: 0 0 8px 8px;
}

.search-suggest .suggest-empty { margin: 0; padding: 12px 10px; font-size: 13.5px; color: var(--cl-muted); }

@media (min-width: 1280px) {
  .navbar .profile-menu > ul {
    left: auto;
    right: 0;
    min-width: 230px;
    padding: 8px;
    background: var(--cl-white);
    border: 1px solid var(--cl-line);
    border-top: 0;
    border-radius: 0 0 12px 12px;
    box-shadow: var(--cl-shadow-lg);
  }

  .navbar .dropdown.profile-menu ul li { min-width: 0; }

  .navbar .dropdown.profile-menu ul li a,
  .navbar .dropdown.profile-menu ul li a:focus {
    justify-content: flex-start;
    gap: 10px;
    padding: 9px 12px;
    font-size: 14px;
    color: var(--cl-text);
    border-radius: 8px;
    background: none;
  }

  .navbar .dropdown.profile-menu ul li a i { margin: 0; font-size: 15px; color: var(--cl-muted); }

  .navbar .dropdown.profile-menu ul li a:hover,
  .navbar .dropdown.profile-menu ul li a.active {
    color: var(--cl-blue);
    background: var(--cl-blue-50);
  }

  .navbar .dropdown.profile-menu ul li a:hover i,
  .navbar .dropdown.profile-menu ul li a.active i { color: var(--cl-blue); }

  .navbar .dropdown.profile-menu ul li.menu-sep { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--cl-line); }
}

@media (max-width: 1279px) {
  .navbar .dropdown.profile-menu ul {
    margin: 4px 14px 10px;
    padding: 6px 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
  }

  .navbar .dropdown.profile-menu ul a { justify-content: flex-start; gap: 10px; padding: 9px 14px; font-size: 14.5px; }
  .navbar .dropdown.profile-menu ul a i { margin: 0; font-size: 15px; }
}

.save-actions { display: inline-flex; flex-wrap: wrap; gap: 8px; }

.save-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--cl-text);
  white-space: nowrap;
  border: 1px solid var(--cl-line);
  border-radius: 8px;
  background: var(--cl-white);
  transition: all 0.15s ease;
}

.save-btn:hover { color: var(--cl-blue); border-color: var(--cl-blue); background: var(--cl-blue-50); }
.save-btn.is-on { color: var(--cl-blue); border-color: var(--cl-blue-100); background: var(--cl-blue-50); }
.save-btn[data-list="favourites"].is-on { color: #c62f3b; border-color: #f6cfd3; background: #fdf1f2; }
.save-btn:disabled { opacity: 0.6; cursor: progress; }

.lib-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 20px;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  border-bottom: 1px solid var(--cl-line);
  scrollbar-width: none;
}

.lib-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: -1px;
  padding: 10px 16px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--cl-muted);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.lib-tabs a:hover { color: var(--cl-blue); }
.lib-tabs a.active { color: var(--cl-blue); border-bottom-color: var(--cl-blue); }

.lib-tabs .count {
  min-width: 22px;
  padding: 1px 7px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  color: var(--cl-text);
  border-radius: 999px;
  background: #e9edf3;
}

.lib-tabs a.active .count { color: var(--cl-white); background: var(--cl-blue); }

.section-head.is-sub { margin: 28px 0 12px; align-items: center; }
.section-head.is-sub:first-child { margin-top: 0; }
.section-head.is-sub h2 { margin: 0; font-size: 17px; }

.filter-search { padding: 12px 12px 4px; }

.filter-search input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  font-size: 14px;
  color: var(--cl-ink);
  border: 1px solid #d5dce6;
  border-radius: 8px;
  outline: none;
  background: var(--cl-white) url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2714%27 height=%2714%27 fill=%27%238b97a8%27 viewBox=%270 0 16 16%27%3E%3Cpath d=%27M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398l3.85 3.85a1 1 0 0 0 1.415-1.414zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0%27/%3E%3C/svg%3E") no-repeat 11px center;
}

.filter-search input:focus { border-color: var(--cl-blue); box-shadow: 0 0 0 4px rgba(var(--cl-blue-rgb), 0.12); }
.filter-none { margin: 0; padding: 10px 18px 14px; font-size: 13.5px; color: var(--cl-muted); }

.prose { font-size: 15.5px; line-height: 1.7; color: var(--cl-text); overflow-wrap: anywhere; }
.prose h2 { margin: 32px 0 10px; font-size: 20px; font-weight: 700; scroll-margin-top: 150px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 22px 0 8px; font-size: 16.5px; font-weight: 600; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose > :last-child { margin-bottom: 0; }

.toc { position: sticky; top: 150px; }
.toc ol { list-style: none; margin: 0; padding: 8px; }
.toc a { display: block; padding: 7px 10px; font-size: 13.5px; line-height: 1.35; color: var(--cl-text); border-radius: 8px; }
.toc a:hover { color: var(--cl-blue); background: var(--cl-blue-50); }

.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; }
.contact-list .stat-icon { flex-basis: 42px; width: 42px; height: 42px; font-size: 18px; }
.contact-list small { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cl-muted); }
.contact-list strong, .contact-list a { font-size: 15px; font-weight: 500; color: var(--cl-ink); overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--cl-blue); }

.stats-band.is-bottom { margin-top: 0; padding: 48px 0 56px; }
.stats-band.is-bottom .stats-card { box-shadow: var(--cl-shadow); }
#hero1, #hero1.no-stats { padding-bottom: 44px; }
.footer .footer-content .footer-links ul small { display: block; color: rgba(255, 255, 255, 0.55); }

@media (max-width: 767px) {
  #hero1, #hero1.no-stats { padding-bottom: 32px; }
  .stats-band.is-bottom { padding: 32px 0 40px; }
  .toc { position: static; }
}

/* Compact form (Request Article): placeholders instead of labels */
.compact-form .form-control { padding: 9px 12px; }
.compact-form .form-control::placeholder { color: #7b8798; }
.compact-form .form-control[readonly]::placeholder { color: #94a0b0; }
.compact-form .req, .form-hint .req { font-weight: 700; color: var(--cl-danger); }

@media (max-width: 767px) {
  .compact-form .theamBtn { width: 100%; }
}
