/* ── neuroflow custom styles ─────────────────────────────────────────────── */

/* ── Design tokens ───────────────────────────────────────────────────────── */
:root {
  --nf-radius: 14px;
  --nf-radius-sm: 8px;
  --nf-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.07);
  --nf-shadow-md: 0 4px 18px rgba(0, 0, 0, 0.11);
  --nf-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.14);
  --nf-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --nf-glow: 0 0 0 3px rgba(103, 58, 183, 0.18);
  --nf-z-sa-bar: 9999;
}

[data-md-color-scheme="slate"] {
  --nf-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.22);
  --nf-shadow-md: 0 4px 18px rgba(0, 0, 0, 0.3);
  --nf-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.38);
  --nf-glow: 0 0 0 3px rgba(149, 117, 205, 0.25);
}

/* ── Nav logo size ───────────────────────────────────────────────────────── */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 32px;
  width: auto;
  max-width: 180px;
}

/* ── Global polish ────────────────────────────────────────────────────────── */
.md-typeset h1 {
  font-weight: 800;
  letter-spacing: -0.5px;
}

.md-typeset h2 {
  font-weight: 700;
  letter-spacing: -0.3px;
}

.md-typeset code {
  border-radius: 5px;
  font-size: 0.87em;
  padding: 0.12em 0.38em;
}

.md-typeset a {
  text-underline-offset: 2px;
}

/* Wider content on large screens */
@media screen and (min-width: 76.25em) {
  .md-content__inner {
    max-width: 980px;
  }
}

/* ── Home page: full-width layout ────────────────────────────────────────── */
/* Remove the 61rem grid max-width and top gap so the hero fills the display */
body:has(.hero) .md-main__inner {
  max-width: none;
  margin-top: 0;
}

/* Center the content-inner on the homepage and remove top gap */
body:has(.hero) .md-content__inner {
  padding-top: 0;
  margin-top: 0;
  margin-left: auto;
  margin-right: auto;
}

/* Prevent horizontal scrollbar when hero breaks out to 100vw */
body:has(.hero) .md-main {
  overflow-x: hidden;
}

/* ── Self-assessment bar: push header below it when fixed at top ─────────── */
body.has-sa-bar .md-header {
  top: var(--sa-bar-height, 20px);
}

body.has-sa-bar {
  padding-top: var(--sa-bar-height, 20px);
}

/* ── Section separators ───────────────────────────────────────────────────── */
hr {
  border: none;
  border-top: 1px solid var(--md-default-fg-color--lightest);
  margin: 2.8rem 0;
}

/* Reduce section separator spacing on homepage */
body:has(.hero) hr {
  margin: 1rem 0;
}

/* ── Admonition tweaks ────────────────────────────────────────────────────── */
.md-typeset .admonition,
.md-typeset details {
  border-radius: var(--nf-radius-sm);
  box-shadow: var(--nf-shadow-sm);
  border-width: 0;
  border-left-width: 4px;
}

.md-typeset .admonition-title {
  font-weight: 700;
}

/* ── Tables ───────────────────────────────────────────────────────────────── */
.md-typeset table:not([class]) {
  border-radius: var(--nf-radius-sm);
  overflow: hidden;
  box-shadow: var(--nf-shadow-sm);
}

.md-typeset table:not([class]) th {
  background: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.md-typeset table:not([class]) td,
.md-typeset table:not([class]) th {
  border-color: var(--md-default-fg-color--lightest);
}

/* ── Code blocks ──────────────────────────────────────────────────────────── */
.md-typeset pre {
  border-radius: var(--nf-radius-sm);
  box-shadow: var(--nf-shadow-sm);
}



/* ── Header version badge ──────────────────────────────────────────────────── */
.nf-header-version {
  font-family: var(--md-code-font-family);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.26);
  color: rgba(255,255,255,0.9);
  padding: 0.18em 0.62em;
  border-radius: 50px;
  margin-left: 0.5rem;
  white-space: nowrap;
  align-self: center;
  flex-shrink: 0;
}

/* ── Version badge ───────────────────────────────────────────────────────── */
.version-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.9);
  font-family: var(--md-code-font-family);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.2em 0.75em;
  border-radius: 50px;
  backdrop-filter: blur(6px);
  margin-bottom: 0.9rem;
  position: relative;
  z-index: 1;
}

/* ── Early access banner ──────────────────────────────────────────────────── */
.early-access-banner {
  border: 1px solid rgba(255, 180, 0, 0.35);
  border-left: 4px solid #f9a825;
  border-radius: var(--nf-radius-sm);
  background: rgba(249, 168, 37, 0.07);
  padding: 1.1rem 1.4rem 0.9rem;
  margin: -1rem 0 2rem;
  font-size: 0.9rem;
  line-height: 1.65;
}

.early-access-banner p {
  margin: 0 0 0.7rem;
}

.early-access-banner .md-button--sm {
  font-size: 0.8rem;
  padding: 0.35rem 0.9rem;
  margin: 0.25rem 0.25rem 0 0;
  border-radius: 50px;
}

/* ── Hero button group ────────────────────────────────────────────────────── */
.hero-buttons {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
  margin: 0.5rem 0 0.3rem;
}

.hero-buttons .md-button {
  margin: 0;
}

@media screen and (max-width: 480px) {
  .hero-buttons {
    flex-wrap: wrap;
  }
}

/* ── Hero section ─────────────────────────────────────────────────────────── */
.hero {
  padding: 1.5rem 2rem 2rem;
  background: linear-gradient(145deg,
    #4a148c 0%,
    #6a1b9a 30%,
    #7b1fa2 55%,
    #9c27b0 80%,
    #ab47bc 100%);
  border-radius: 0 0 20px 20px;
  /* Break out to full viewport width */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: 0;
  margin-top: 0;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}

/* Subtle grid overlay */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* Radial glow effect */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(255,255,255,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  z-index: 1;
  gap: 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Hero inline brand logo ──────────────────────────────────────────────── */
.hero-text .hero-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  margin: 0 0 0.2rem;
  flex-wrap: wrap;
}

.hero-text .hero-heading > p {
  margin: 0;
  display: flex;
  align-items: center;
}

.hero-brand-logo {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  vertical-align: middle;
  animation: hero-anim 9s ease-in-out infinite;
}

@media screen and (max-width: 640px) {
  .hero-brand-logo {
    width: 28px;
    height: 28px;
  }
}

@keyframes hero-anim {
  0%   { transform: translateY(0)     translateX(0)    rotate(0deg)    scaleX(1);    filter: drop-shadow(0 0 8px rgba(206,147,216,0.65)); }
  44%  { transform: translateY(-6px)  translateX(0)    rotate(0deg)    scaleX(1);    filter: drop-shadow(0 0 10px rgba(206,147,216,0.65)); }
  46%  { transform: translateY(-6px)  translateX(-3px) rotate(-2.5deg) scaleX(1.06); filter: drop-shadow(3px 0 0 rgba(255,120,255,0.7)) drop-shadow(-3px 0 0 rgba(120,220,255,0.7)); }
  48%  { transform: translateY(-6px)  translateX(3px)  rotate(2deg)    scaleX(0.94); filter: drop-shadow(-3px 0 0 rgba(255,120,255,0.7)) drop-shadow(3px 0 0 rgba(120,220,255,0.7)); }
  50%  { transform: translateY(-6px)  translateX(0)    rotate(0deg)    scaleX(1);    filter: drop-shadow(0 0 10px rgba(206,147,216,0.65)); }
  100% { transform: translateY(0)     translateX(0)    rotate(0deg)    scaleX(1);    filter: drop-shadow(0 0 8px rgba(206,147,216,0.65)); }
}


.hero-text {
  text-align: left;
  flex: 1 1 320px;
  min-width: 0;
  max-width: 600px;
}

.hero-text p,
.hero p {
  font-size: 1rem;
  color: rgba(255,255,255,0.88);
  margin: 0.3rem 0 1rem;
  line-height: 1.65;
  max-width: none;
  position: relative;
  z-index: 1;
}

.hero-text strong {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,0.22);
}

.hero-community {
  font-size: 0.82rem !important;
  opacity: 0.75;
  margin-top: 0.75rem !important;
  margin-bottom: 0 !important;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 0.65rem;
  line-height: 1.55 !important;
}

.hero-community a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.hero-community a:hover {
  color: #fff;
  text-decoration: underline;
}

.hero .md-button {
  position: relative;
  z-index: 1;
  margin: 0;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  padding: 0.32rem 0.85rem;
  transition: transform var(--nf-transition), box-shadow var(--nf-transition), background var(--nf-transition);
}

/* Primary button – white fill */
.hero .md-button.md-button--primary {
  background: #fff;
  color: #6a1b9a;
  border-color: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.22);
}

.hero .md-button.md-button--primary:hover {
  background: rgba(255,255,255,0.95);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.28);
}

/* Secondary button – ghost */
.hero .md-button:not(.md-button--primary) {
  border-color: rgba(255,255,255,0.55);
  color: #fff;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(6px);
}

.hero .md-button:not(.md-button--primary):hover {
  border-color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.18);
  transform: translateY(-2px);
}

/* ── Feature highlights ───────────────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 1.75rem 0 2.25rem;
}

.feature-card {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: var(--nf-radius);
  padding: 1.5rem 1.5rem 1.3rem;
  background: var(--md-default-bg-color);
  box-shadow: var(--nf-shadow-sm);
  transition: transform var(--nf-transition), box-shadow var(--nf-transition), border-color var(--nf-transition);
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--md-primary-fg-color), var(--md-accent-fg-color));
  opacity: 0;
  transition: opacity var(--nf-transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--md-primary-fg-color--light);
  box-shadow: var(--nf-shadow-md);
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-icon {
  font-size: 2.1rem;
  line-height: 1;
  margin-bottom: 0.85rem;
  display: block;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: var(--md-primary-fg-color);
}

.feature-card p {
  font-size: 0.875rem;
  margin: 0;
  opacity: 0.78;
  line-height: 1.6;
}

/* ── Pipeline diagram ─────────────────────────────────────────────────────── */
.pipeline-wrap {
  background: var(--md-code-bg-color);
  border-radius: var(--nf-radius);
  padding: 1.75rem 1.75rem 1.4rem;
  margin: 1.75rem 0;
  border: 1px solid var(--md-default-fg-color--lightest);
  box-shadow: var(--nf-shadow-sm);
}

.pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

/* MkDocs wraps inline spans in a <p> inside md_in_html; make it
   transparent so the step spans become direct flex items */
.pipeline > p {
  display: contents;
}

.pipeline-step {
  background: linear-gradient(135deg, var(--md-primary-fg-color), var(--md-accent-fg-color));
  color: #fff;
  padding: 0.5rem 1.1rem;
  border-radius: 50px;
  font-family: var(--md-code-font-family);
  font-size: 0.82rem;
  white-space: nowrap;
  font-weight: 600;
  box-shadow: var(--nf-shadow-sm);
  transition: transform var(--nf-transition), box-shadow var(--nf-transition);
  letter-spacing: 0.01em;
}

.pipeline-step:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: var(--nf-shadow-md);
}

.pipeline-arrow {
  color: var(--md-accent-fg-color);
  font-size: 1.25rem;
  font-weight: 700;
  opacity: 0.7;
}

.pipeline-caption {
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.62;
  margin-top: 1.1rem;
  line-height: 1.6;
}

/* ── Expandable research pipelines ───────────────────────────────────────── */
.rp-intro {
  font-size: 0.95rem;
  opacity: 0.72;
  margin: 0.25rem 0 1.5rem;
}

/* rp-grid is now defined later with grid layout */

.rp-card {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: var(--nf-radius);
  background: var(--md-default-bg-color);
  box-shadow: var(--nf-shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--nf-transition), border-color var(--nf-transition);
}

.rp-card[open] {
  box-shadow: var(--nf-shadow-md);
}

/* Left accent bar per pipeline type */
.rp-card--full    { border-left: 4px solid #7b1fa2; }
.rp-card--analysis{ border-left: 4px solid #1565c0; }
.rp-card--tool    { border-left: 4px solid #2e7d32; }
.rp-card--model   { border-left: 4px solid #e65100; }
.rp-card--ideation{ border-left: 4px solid #00838f; }

.rp-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  gap: 1rem;
  transition: background var(--nf-transition);
}

/* Remove default disclosure triangle */
.rp-summary::-webkit-details-marker { display: none; }
.rp-summary::marker { display: none; }

.rp-card:not([open]) .rp-summary:hover {
  background: var(--md-default-fg-color--lightest);
}

.rp-card[open] .rp-summary {
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.rp-summary-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

/* Chevron via pseudo-element */
.rp-summary::after {
  content: "›";
  font-size: 1.4rem;
  line-height: 1;
  color: var(--md-default-fg-color--light);
  transition: transform 0.25s ease;
  flex-shrink: 0;
  margin-left: auto;
}

.rp-card[open] .rp-summary::after {
  transform: rotate(90deg);
}

.rp-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
}

.rp-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--md-default-fg-color);
  white-space: nowrap;
}

.rp-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.18em 0.7em;
  border-radius: 50px;
  white-space: nowrap;
  flex-shrink: 0;
  color: #fff;
}

.rp-badge--full     { background: #7b1fa2; }
.rp-badge--analysis { background: #1565c0; }
.rp-badge--tool     { background: #2e7d32; }
.rp-badge--model    { background: #e65100; }
.rp-badge--ideation { background: #00838f; }

.rp-body {
  padding: 1.25rem 1.4rem 1.4rem;
}

.rp-desc {
  font-size: 0.9rem;
  line-height: 1.65;
  opacity: 0.8;
  margin: 0 0 1.1rem;
}

.rp-pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
}

/* Optional step styling */
.rp-step--optional {
  opacity: 0.62;
  border: 2px dashed rgba(255, 255, 255, 0.5);
}

/* Parallel pipeline layout */
.rp-pipeline--parallel {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
}

.pipeline-track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.pipeline-track--parallel {
  padding-left: 1rem;
  border-left: 3px solid var(--md-accent-fg-color);
  opacity: 0.85;
}

.pipeline-parallel-label {
  font-size: 0.72rem;
  font-style: italic;
  font-weight: 600;
  color: var(--md-accent-fg-color);
  white-space: nowrap;
}

.pipeline-parallel-merge {
  font-size: 0.72rem;
  font-style: italic;
  color: var(--md-accent-fg-color);
  opacity: 0.8;
  white-space: nowrap;
}

.rp-caption {
  font-size: 0.82rem;
  opacity: 0.58;
  line-height: 1.6;
  margin: 0;
}

.rp-caption code {
  font-size: 0.82em;
}

@media screen and (max-width: 540px) {
  .rp-title { font-size: 0.92rem; }
  .rp-badge { display: none; }
  .rp-summary { padding: 0.9rem 1rem; }
  .rp-body { padding: 1rem; }
}

/* ── Command cards grid ───────────────────────────────────────────────────── */
.command-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.1rem;
  margin: 1.75rem 0;
}

.command-card {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: var(--nf-radius);
  padding: 1.35rem 1.5rem 1.2rem;
  background: var(--md-default-bg-color);
  box-shadow: var(--nf-shadow-sm);
  transition: transform var(--nf-transition), border-color var(--nf-transition), box-shadow var(--nf-transition);
  position: relative;
  overflow: hidden;
}

.command-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--md-primary-fg-color), var(--md-accent-fg-color));
  opacity: 0;
  transition: opacity var(--nf-transition);
}

.command-card:hover {
  transform: translateY(-4px);
  border-color: var(--md-primary-fg-color--light);
  box-shadow: var(--nf-shadow-md);
}

.command-card:hover::before {
  opacity: 1;
}

.command-icon {
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 0.55rem;
  display: block;
}

.command-card h3 {
  font-size: 0.97rem;
  margin: 0 0 0.45rem;
  font-family: var(--md-code-font-family);
  color: var(--md-primary-fg-color);
  font-weight: 700;
}

.command-card p {
  font-size: 0.875rem;
  margin: 0 0 0.75rem;
  opacity: 0.78;
  line-height: 1.55;
}

.command-card a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--md-accent-fg-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  transition: gap var(--nf-transition);
}

.command-card a:hover {
  text-decoration: underline;
  gap: 0.4rem;
}

/* ── Stats / metrics row ──────────────────────────────────────────────────── */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 1.75rem 0;
}

.stat-chip {
  background: linear-gradient(135deg, var(--md-primary-fg-color), var(--md-accent-fg-color));
  color: #fff;
  border-radius: var(--nf-radius-sm);
  padding: 0.7rem 1.3rem;
  text-align: center;
  min-width: 115px;
  box-shadow: var(--nf-shadow-sm);
  transition: transform var(--nf-transition), box-shadow var(--nf-transition);
}

.stat-chip:hover {
  transform: translateY(-2px);
  box-shadow: var(--nf-shadow-md);
}

.stat-chip .stat-number {
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
  display: block;
}

.stat-chip .stat-label {
  font-size: 0.75rem;
  opacity: 0.88;
  margin-top: 0.2rem;
  display: block;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Install / How-it-works blocks ───────────────────────────────────────── */
.install-block,
.how-it-works {
  background: var(--md-code-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: var(--nf-radius);
  padding: 1.6rem 1.9rem;
  margin: 1.75rem 0;
  box-shadow: var(--nf-shadow-sm);
}

.install-block h3 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 700;
}

/* ── Phase badge ──────────────────────────────────────────────────────────── */
.phase-badge {
  display: inline-block;
  padding: 0.22rem 0.75rem;
  border-radius: 50px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* ── Badge row ────────────────────────────────────────────────────────────── */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2.2rem;
}

/* ── IO table ─────────────────────────────────────────────────────────────── */
.io-table th {
  background: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
}

/* ── Navigation tweaks ────────────────────────────────────────────────────── */
.md-nav__link--active {
  font-weight: 700;
}

/* ── Search highlight ─────────────────────────────────────────────────────── */
.md-search-result mark {
  border-radius: 3px;
}

/* ── Tabs ─────────────────────────────────────────────────────────────────── */
.md-typeset .tabbed-labels > label {
  font-weight: 600;
}

/* ── Quote bubbles ────────────────────────────────────────────────────────── */
#nf-quotes {
  position: relative;
  width: 100%;
  min-height: 2.25rem;
  pointer-events: none;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nf-quote-bubble {
  position: absolute;
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(10px);
  border-radius: 2rem;
  padding: 0.55rem 1.25rem;
  font-size: 0.85rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.97);
  max-width: 85%;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  white-space: normal;
  line-height: 1.5;
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 0.65s ease, transform 0.65s ease;
  pointer-events: none;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.nf-quote-bubble.nf-quote-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Why neuroflow gap fix ────────────────────────────────────────────────── */
.feature-grid {
  margin-top: 0.9rem;
}

/* ── Responsive hero ──────────────────────────────────────────────────────── */
@media screen and (max-width: 600px) {
  .hero {
    padding: 1.25rem 1rem 1.5rem;
    border-radius: 0 0 14px 14px;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: 0;
    margin-top: 0;
    margin-bottom: 2.25rem;
  }

  .hero-text strong {
    font-size: 1.2rem;
  }

  .pipeline-step {
    font-size: 0.75rem;
    padding: 0.4rem 0.75rem;
  }

  .stat-chip {
    min-width: 90px;
  }
}

/* ── Skills section pages ─────────────────────────────────────────────────── */

/* Strip the YAML frontmatter "---" from rendered SKILL.md pages */
.md-typeset hr:first-child {
  display: none;
}

/* Skill page header pill badge */
.md-typeset h1 + p > code:first-child {
  background: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
  border-radius: 50px;
  padding: 0.18em 0.65em;
  font-size: 0.8em;
}

/* ── Hide site name text next to logo (logo already shows the name) ──────── */
.md-header__title {
  display: none !important;
}

/* ── Hide auto-injected page title on home page (hero logo is the identity) ── */
.md-content:has(.hero) .md-content__inner > h1 {
  display: none !important;
}

/* ── Hide edit/view-source page action buttons ────────────────────────────── */
.md-content__button {
  display: none !important;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.md-footer {
  margin-top: 2rem;
}

/* ── Neuroflow Mind page ──────────────────────────────────────────────────── */

/* Full-screen canvas container */
.nf-mind-fullscreen {
  position: fixed;
  inset: 0;
  background: #080812;
  z-index: 50;
  display: flex;
  flex-direction: column;
}

/* Top bar */
.nf-mind-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1.2rem;
  background: rgba(13, 10, 25, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(149, 117, 205, 0.18);
  flex-shrink: 0;
  z-index: 10;
}

.nf-mind-back {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}
.nf-mind-back:hover { color: #ce93d8; }

/* Large prominent back-to-docs button overlaid on the mind map */
.nf-mind-back-btn-wrap {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  pointer-events: none;
}

.nf-mind-back-btn {
  display: inline-block;
  pointer-events: all;
  padding: 0.75rem 2rem;
  background: rgba(106, 27, 154, 0.85);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 2rem;
  text-decoration: none;
  border: 1.5px solid rgba(206, 147, 216, 0.55);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.nf-mind-back-btn:hover {
  background: rgba(149, 0, 200, 0.95);
  border-color: #ce93d8;
  color: #fff;
}

.nf-mind-topbar-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.02em;
}

.nf-mind-topbar-icon { font-size: 1.1rem; }

.nf-mind-topbar-hint {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.32);
  margin: 0;
  margin-left: auto;
  white-space: nowrap;
}

/* SVG takes remaining space */
.nf-mind-fullscreen svg {
  flex: 1;
  min-height: 0;
}

/* Info panel */
.nf-mind-panel {
  position: fixed;
  right: -360px;
  top: 0;
  bottom: 0;
  width: 320px;
  background: rgba(14, 10, 28, 0.94);
  backdrop-filter: blur(16px);
  border-left: 1px solid rgba(149, 117, 205, 0.22);
  z-index: 200;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.nf-mind-panel--open {
  right: 0;
}

.nf-mind-panel-inner {
  padding: 1.4rem 1.2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nf-mind-close {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.nf-mind-close:hover { background: rgba(255, 255, 255, 0.15); }

.nf-mind-panel-type {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nf-mind-panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  font-family: "JetBrains Mono", monospace;
}

.nf-mind-panel-desc {
  font-size: 0.83rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.62);
  margin: 0;
}

.nf-conn-heading {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 0.4rem;
}

.nf-conn-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nf-conn-list li {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nf-conn-rel {
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.72rem;
}

.nf-mind-panel-link {
  margin-top: 0.5rem;
  font-size: 0.82rem !important;
  padding: 0.45rem 1rem !important;
  border-radius: 50px !important;
  align-self: flex-start;
}

/* ── Tag pills in node info panel ─────────────────────────────────────────── */
.nf-tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.nf-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.18em 0.55em 0.18em 0.4em;
  border-radius: 50px;
  border: 1px solid;
  background: rgba(255,255,255,0.05);
  white-space: nowrap;
}

.nf-tag-dot-sm {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Hide MkDocs chrome on the mind page */
body:has(.nf-mind-fullscreen) .md-header,
body:has(.nf-mind-fullscreen) .md-sidebar,
body:has(.nf-mind-fullscreen) .md-footer,
body:has(.nf-mind-fullscreen) .md-content__inner > h1,
body:has(.nf-mind-fullscreen) .md-content__button {
  display: none !important;
}

body:has(.nf-mind-fullscreen) .md-main {
  margin: 0 !important;
  padding: 0 !important;
}

body:has(.nf-mind-fullscreen) .md-content {
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

body:has(.nf-mind-fullscreen) .md-content__inner {
  margin: 0 !important;
  padding: 0 !important;
  max-width: 100% !important;
}

/* ── "Explore the Mind" button on homepage ────────────────────────────────── */
.md-button--mind {
  border-color: rgba(149, 117, 205, 0.55) !important;
  color: rgba(255, 255, 255, 0.82) !important;
  background: rgba(103, 58, 183, 0.12) !important;
  backdrop-filter: blur(4px);
}

.md-button--mind:hover {
  background: rgba(103, 58, 183, 0.28) !important;
  border-color: rgba(206, 147, 216, 0.7) !important;
  color: #fff !important;
}

/* Responsive: hide hint text on very small screens */
@media screen and (max-width: 480px) {
  .nf-mind-topbar-hint { display: none; }
  .nf-mind-panel { width: 100%; right: -100%; }
}

/* ── Cognitive self-assessment probe block ────────────────────────────────── */
.probe-block {
  background: rgba(103, 58, 183, 0.08);
  border: 1px solid rgba(149, 117, 205, 0.4);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
}

/* ── Hero self-assessment panel (right side of hero) ─────────────────────── */
.hero-probe {
  flex: 0 0 auto;
  width: min(300px, 100%);
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.hero-probe-title {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7) !important;
  margin: 0 0 0.15rem !important;
  line-height: 1.3 !important;
}

.hero-probe-version {
  font-size: 0.65rem !important;
  font-weight: 600 !important;
  color: rgba(255, 255, 255, 0.45) !important;
  letter-spacing: 0.04em;
  margin: 0 0 0.5rem !important;
  line-height: 1.2 !important;
}

.hero-probe-caption {
  font-size: 0.78rem !important;
  font-style: italic;
  color: rgba(255, 255, 255, 0.6) !important;
  margin: 0 0 0.7rem !important;
  line-height: 1.45 !important;
}

.probe-rows {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.probe-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.32rem 0.55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.probe-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.09);
}

.probe-q {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

.probe-badge {
  display: inline-block;
  padding: 0.14rem 0.52rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  white-space: nowrap;
  flex-shrink: 0;
}

.probe-yes {
  background: rgba(72, 199, 116, 0.22);
  color: #6ee09d;
  border: 1px solid rgba(72, 199, 116, 0.4);
}

.probe-no {
  background: rgba(255, 100, 100, 0.2);
  color: #ff9494;
  border: 1px solid rgba(255, 100, 100, 0.35);
}

.probe-partial {
  background: rgba(255, 193, 7, 0.18);
  color: #ffd54f;
  border: 1px solid rgba(255, 193, 7, 0.35);
}

.probe-unknown {
  background: rgba(180, 180, 180, 0.15);
  color: #c0c0c0;
  border: 1px solid rgba(180, 180, 180, 0.3);
}

/* Responsive: stack hero panels on smaller screens */
@media screen and (max-width: 800px) {
  .hero-inner {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .hero-probe {
    width: min(420px, 100%);
    align-self: center;
  }
}

/* ── Hero right column: Why neuroflow? ───────────────────────────────────── */
.hero-why {
  flex: 0 0 auto;
  width: min(310px, 100%);
  align-self: flex-start;
}

.hero-why-title {
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52) !important;
  margin: 0 0 0.55rem !important;
  line-height: 1.2 !important;
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.why-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 0.75rem 0.8rem 0.7rem;
  backdrop-filter: blur(8px);
  cursor: default;
  transition: background var(--nf-transition), border-color var(--nf-transition), transform var(--nf-transition);
  position: relative;
  overflow: hidden;
}

.why-card:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-2px);
  z-index: 1;
}

.why-icon {
  font-size: 1.3rem;
  line-height: 1;
  display: block;
  margin-bottom: 0.3rem;
}

.why-name {
  font-size: 0.73rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  display: block;
  line-height: 1.3;
}

.why-desc {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.5;
  display: block;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  transition: max-height 0.3s ease, opacity 0.28s ease, margin-top 0.3s ease;
}

.why-card:hover .why-desc {
  max-height: 140px;
  opacity: 1;
  margin-top: 0.38rem;
}

@media screen and (max-width: 800px) {
  .hero-why {
    width: min(420px, 100%);
    align-self: center;
  }
}

@media screen and (max-width: 520px) {
  .why-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
  }

  .why-icon { font-size: 1.1rem; }
  .why-name { font-size: 0.68rem; }
}

/* ── Self-assessment bar (between nav tabs and hero) ─────────────────────── */
.sa-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: linear-gradient(90deg,
    rgba(55, 0, 110, 0.97) 0%,
    rgba(90, 20, 140, 0.97) 50%,
    rgba(55, 0, 110, 0.97) 100%);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.06rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  z-index: var(--nf-z-sa-bar);
}

.sa-bar-label {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sa-bar-version {
  font-size: 0.55rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.28);
  letter-spacing: 0.04em;
  font-family: var(--md-code-font-family);
}

.sa-items {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sa-item {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50px;
  padding: 0.14rem 0.45rem 0.14rem 0.38rem;
  white-space: nowrap;
  cursor: default;
  position: relative;
  transition: background var(--nf-transition), border-color var(--nf-transition),
    box-shadow var(--nf-transition);
  flex-shrink: 0;
}

.sa-item:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(200, 160, 255, 0.45);
  box-shadow: 0 0 8px rgba(180, 100, 255, 0.25);
}

.sa-q-short {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.68);
  font-weight: 500;
}

/* Probe badges reused in sa-bar — reduce size slightly */
.sa-bar .probe-badge {
  font-size: 0.54rem;
  padding: 0.08rem 0.38rem;
}

/* ── Floating tooltip for self-assessment items (JS-powered) ─────────────── */
.sa-float-tip {
  position: fixed;
  transform: translateX(-50%);
  background: rgba(20, 0, 45, 0.97);
  border: 1px solid rgba(200, 160, 255, 0.3);
  border-radius: 8px;
  padding: 0.4rem 0.85rem;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: var(--nf-z-sa-bar);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(180, 100, 255, 0.12);
}

.sa-float-tip::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: rgba(200, 160, 255, 0.3);
}

.sa-float-tip::after {
  content: "";
  position: absolute;
  bottom: calc(100% - 1px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: rgba(20, 0, 45, 0.97);
}

.sa-float-tip--visible {
  opacity: 1;
}

/* ── Who is this for — expandable card ───────────────────────────────────── */
.who-card {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: var(--nf-radius);
  background: var(--md-default-bg-color);
  box-shadow: var(--nf-shadow-sm);
  overflow: hidden;
  margin-bottom: 0.5rem;
  transition: box-shadow var(--nf-transition), border-color var(--nf-transition);
  border-left: 4px solid #7b1fa2;
}

.who-card[open] {
  box-shadow: var(--nf-shadow-md);
}

.who-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.4rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background var(--nf-transition);
}

.who-summary::-webkit-details-marker { display: none; }
.who-summary::marker { display: none; }

.who-card:not([open]) .who-summary:hover {
  background: var(--md-default-fg-color--lightest);
}

.who-card[open] .who-summary {
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.who-summary::after {
  content: "›";
  font-size: 1.4rem;
  line-height: 1;
  color: var(--md-default-fg-color--light);
  transition: transform 0.25s ease;
  flex-shrink: 0;
  margin-left: auto;
}

.who-card[open] .who-summary::after {
  transform: rotate(90deg);
}

.who-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  line-height: 1;
}

.who-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--md-default-fg-color);
}

.who-tagline {
  font-size: 0.82rem;
  opacity: 0.55;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.who-card[open] .who-tagline {
  display: none;
}

.who-body {
  padding: 1rem 1.4rem 1.2rem;
  font-size: 0.9rem;
  line-height: 1.65;
  opacity: 0.82;
}

/* ── Research pipelines: 2-column grid on wide screens ───────────────────── */
.rp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 0.85rem;
  margin: 0 0 2rem;
  align-items: start;
}

/* An open card spans both columns so its content isn't cramped */
.rp-card[open] {
  grid-column: 1 / -1;
}

@media screen and (max-width: 820px) {
  .rp-grid {
    grid-template-columns: 1fr;
  }
  .rp-card[open] {
    grid-column: auto;
  }
}
