/* Neurohaven Knowledge hub v115 — one consistent card surface for every topic. */
.page-knowledge {
  --nh-knowledge-card-bg: linear-gradient(145deg, rgba(255,255,255,.052), rgba(255,255,255,.025));
  --nh-knowledge-card-bg-hover: linear-gradient(145deg, rgba(255,255,255,.072), rgba(255,255,255,.038));
  --nh-knowledge-card-shadow: 0 .75rem 2rem rgba(0,0,0,.12);
}

/* Grouped sections (ADHD & Autism / Mental Health) and legacy flat sections
   (Physical health onward) deliberately share the exact same surface system. */
.page-knowledge .kcat-subsection,
.page-knowledge .kcat-links a {
  border-color: var(--line);
  background: var(--nh-knowledge-card-bg);
  box-shadow: var(--nh-knowledge-card-shadow);
}

.page-knowledge .kcat-links a {
  border-radius: 1rem;
  padding: .875rem 1rem;
}

.page-knowledge .kcat-links a:hover,
.page-knowledge .kcat-links a:focus-visible {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  background: var(--nh-knowledge-card-bg-hover);
  box-shadow: 0 .9rem 2.15rem rgba(0,0,0,.15);
  transform: translateY(-.0625rem);
}

/* Keep the Featured guide in the same family instead of introducing a third
   background treatment. Its accent border/badge still provides hierarchy. */
.page-knowledge .kcat-featured-link {
  background: var(--nh-knowledge-card-bg);
  box-shadow: var(--nh-knowledge-card-shadow);
}

.page-knowledge .kcat-featured-link:hover,
.page-knowledge .kcat-featured-link:focus-visible {
  background: var(--nh-knowledge-card-bg-hover);
}

[data-theme="light"] .page-knowledge {
  --nh-knowledge-card-bg: linear-gradient(145deg, rgba(255,255,255,.94), rgba(246,249,252,.92));
  --nh-knowledge-card-bg-hover: linear-gradient(145deg, #ffffff, rgba(242,248,251,.98));
  --nh-knowledge-card-shadow: 0 .75rem 2rem rgba(16,24,40,.055);
}

[data-theme="light"] .page-knowledge .kcat-subsection,
[data-theme="light"] .page-knowledge .kcat-links a,
[data-theme="light"] .page-knowledge .kcat-featured-link {
  color: #243357;
}

[data-theme="light"] .page-knowledge .kcat-links a:hover,
[data-theme="light"] .page-knowledge .kcat-links a:focus-visible,
[data-theme="light"] .page-knowledge .kcat-featured-link:hover,
[data-theme="light"] .page-knowledge .kcat-featured-link:focus-visible {
  color: var(--link-hover);
  box-shadow: 0 .9rem 2.1rem rgba(16,24,40,.075);
}

@media (prefers-reduced-motion: reduce) {
  .page-knowledge .kcat-links a:hover,
  .page-knowledge .kcat-links a:focus-visible {
    transform: none;
  }
}

/* v208 — keep normal Knowledge article link text + arrows neutral/white. */
:root:not([data-theme="light"]) .page-knowledge .kcat-links a .kcat-link-label,
:root:not([data-theme="light"]) .page-knowledge .kcat-links a > span[aria-hidden="true"],
:root:not([data-theme="light"]) .page-knowledge .kcat-subsection-links a .kcat-link-label,
:root:not([data-theme="light"]) .page-knowledge .kcat-subsection-links a > span[aria-hidden="true"] {
  color: #fff;
  opacity: 1;
}
[data-theme="light"] .page-knowledge .kcat-links a .kcat-link-label,
[data-theme="light"] .page-knowledge .kcat-links a > span[aria-hidden="true"],
[data-theme="light"] .page-knowledge .kcat-subsection-links a .kcat-link-label,
[data-theme="light"] .page-knowledge .kcat-subsection-links a > span[aria-hidden="true"] {
  color: #243357;
  opacity: 1;
}
