/* ============================================================================
   CodeLogic Libraries — custom theme
   Accent derived from the logo (light-blue lettering #5cb8e6 / dot #3d8fb5
   on a #1e1e2e navy field).
   ========================================================================== */

:root {
  --cl-accent: #2f86ad;
  --cl-accent-2: #5cb8e6;
  --bs-primary: var(--cl-accent);
  --bs-primary-rgb: 47, 134, 173;
  --bs-link-color: var(--cl-accent);
  --bs-link-color-rgb: 47, 134, 173;
  --bs-link-hover-color: #1f6a8c;
}

[data-bs-theme="dark"] {
  --cl-accent: #5cb8e6;
  --cl-accent-2: #8fd0f0;
  --bs-primary: var(--cl-accent);
  --bs-link-color: var(--cl-accent);
  --bs-link-hover-color: var(--cl-accent-2);
}

/* Navbar brand a touch bolder, and constrain the logo. The logo SVG has a
   512×512 viewBox; without an explicit cap the navbar renders it full-size and
   it overflows the header. Pin it to a small, fixed box. */
.navbar-brand { font-weight: 700; display: inline-flex; align-items: center; gap: .5rem; }
.navbar-brand img,
.navbar-brand svg {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex: 0 0 auto;
}

/* ---- Landing hero -------------------------------------------------------- */
.cl-hero {
  text-align: center;
  padding: 3.25rem 1rem 1rem;
}
.cl-hero img {
  width: 92px;
  height: 92px;
  max-width: 92px;       /* hard cap regardless of the SVG's intrinsic size */
  border-radius: 20px;
}
.cl-hero h1 {
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 1.1rem;
}
.cl-hero .lead {
  max-width: 46rem;
  margin: 0.75rem auto 1.25rem;
}
.cl-badges {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

/* ---- Library card grid --------------------------------------------------- */
.lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}
.lib-card {
  display: block;
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  text-decoration: none !important;
  color: inherit !important;
  background: var(--bs-body-bg);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.lib-card:hover {
  border-color: var(--cl-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .10);
}
.lib-card .lib-name {
  font-weight: 700;
  color: var(--cl-accent);
}
.lib-card .lib-pkg {
  font-size: .78rem;
  color: var(--bs-secondary-color);
  font-family: var(--bs-font-monospace);
}
.lib-card .lib-desc {
  font-size: .9rem;
  margin-top: .45rem;
  margin-bottom: 0;
  color: var(--bs-secondary-color);
}

/* Section eyebrow above each card group */
.cl-group {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--cl-accent);
  margin: 1.5rem 0 .25rem;
}

/* Tables a little softer */
article table { font-size: .92rem; }
