/* ============================================================
   lab.css — Singh Lab website styles
   Separate from style.css (SSPred tool styles).
   CSS variables mirror style.css values for visual coherence.
   ============================================================ */

:root {
  /* Shared with style.css — identical values */
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --secondary: #64748b;
  --success: #059669;
  --warning: #d97706;
  --error: #dc2626;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,.05);
  --shadow: 0 1px 3px 0 rgba(0,0,0,.1), 0 1px 2px 0 rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);

  /* Lab additions */
  --hero-bg: #1e3a8a;
  --hero-bg-end: #2563eb;
  --card-radius: 12px;
  --nav-height: 64px;
  --footer-bg: #0f172a;
  --footer-text: #94a3b8;
  --accent-teal: #0d9488;
  --accent-purple: #7c3aed;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;
  --section-pad: 72px 0;
  --container-max: 1100px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── Layout utilities ── */
.lab-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}
.lab-section { padding: var(--section-pad); }
.lab-section--alt { background: var(--surface); }
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}
.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.2;
}
.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 48px;
}
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ── Navbar ── */
.lab-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  height: var(--nav-height);
}
.lab-header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lab-logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.5px;
  white-space: nowrap;
}
.lab-logo:hover { text-decoration: none; color: var(--primary-dark); }
.lab-nav { display: flex; align-items: center; gap: 4px; }
.lab-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.lab-nav a:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.lab-nav a.active { color: var(--primary); background: #eff6ff; }
.lab-nav .nav-tool-btn {
  background: var(--primary);
  color: #fff !important;
  border-radius: 6px;
  padding: 8px 16px;
  font-weight: 600;
  margin-left: 8px;
}
.lab-nav .nav-tool-btn:hover { background: var(--primary-dark) !important; color: #fff; }

/* Hamburger */
.lab-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border: none;
  background: none;
}
.lab-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: .2s;
}

/* ── Buttons ── */
.btn-lab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .15s, transform .1s, box-shadow .15s;
  text-decoration: none;
}
.btn-lab:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-lab-primary { background: var(--primary); color: #fff; }
.btn-lab-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-lab-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-lab-outline:hover { background: #eff6ff; color: var(--primary); }
.btn-lab-white { background: #fff; color: var(--primary); }
.btn-lab-white:hover { background: #f0f4ff; color: var(--primary-dark); }
.btn-lab-white-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.6);
}
.btn-lab-white-outline:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ── Cards ── */
.lab-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 28px;
  transition: box-shadow .2s, transform .2s;
}
.lab-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

/* ── Badges ── */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}
.badge-active { background: #dcfce7; color: #15803d; }
.badge-dev { background: #fef3c7; color: #92400e; }
.badge-soon { background: #f1f5f9; color: #64748b; }
.badge-featured { background: #eff6ff; color: var(--primary); }

/* ── Hero ── */
.lab-hero {
  background: linear-gradient(135deg, var(--hero-bg) 0%, var(--hero-bg-end) 100%);
  color: #fff;
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}
.lab-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.lab-hero-inner {
  position: relative;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}
.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
  margin-bottom: 16px;
}
.hero-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 8px;
}
.hero-sub {
  font-size: 1.2rem;
  color: rgba(255,255,255,.8);
  margin-bottom: 36px;
  max-width: 620px;
  line-height: 1.6;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ── Featured tool card ── */
.featured-tool-card {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  border-radius: var(--card-radius);
  padding: 40px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.featured-tool-card .tool-badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.featured-tool-card h3 { font-size: 1.8rem; margin-bottom: 8px; }
.featured-tool-card p { color: rgba(255,255,255,.85); max-width: 440px; margin-bottom: 24px; }
.tool-meta { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.tool-meta-item { font-size: 0.85rem; color: rgba(255,255,255,.7); }
.tool-meta-item strong { color: #fff; display: block; font-size: 1rem; }

/* ── Research area cards ── */
.research-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 28px;
  border-top: 3px solid var(--primary);
  transition: box-shadow .2s, transform .2s;
}
.research-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.research-card:nth-child(2) { border-top-color: var(--accent-teal); }
.research-card:nth-child(3) { border-top-color: var(--accent-purple); }
.research-card:nth-child(4) { border-top-color: var(--accent-amber); }
.research-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
  background: #eff6ff;
}
.research-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.research-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }

/* ── News items ── */
.news-list { display: flex; flex-direction: column; gap: 16px; }
.news-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: box-shadow .15s;
}
.news-item:hover { box-shadow: var(--shadow-md); }
.news-date {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
  min-width: 90px;
  padding-top: 2px;
}
.news-content h4 { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.news-content p { font-size: 0.88rem; color: var(--text-secondary); }

/* ── Member cards ── */
.member-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 28px;
  text-align: center;
  transition: box-shadow .2s, transform .2s;
}
.member-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.member-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c7d2fe, #a5b4fc);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--primary-dark);
  font-weight: 700;
}
.member-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.member-role { font-size: 0.85rem; color: var(--primary); font-weight: 600; margin-bottom: 8px; }
.member-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }

/* ── PI section ── */
.pi-section {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: start;
}
.pi-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c7d2fe, #818cf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #fff;
  font-weight: 700;
  font-family: Georgia, serif;
}
.pi-name { font-size: 1.6rem; font-weight: 700; margin-bottom: 4px; }
.pi-title { color: var(--primary); font-weight: 600; margin-bottom: 16px; }
.pi-bio { color: var(--text-secondary); line-height: 1.75; margin-bottom: 20px; }
.pi-edu h4 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-light); margin-bottom: 10px; }
.pi-edu ul { display: flex; flex-direction: column; gap: 6px; }
.pi-edu li { font-size: 0.9rem; color: var(--text-secondary); padding-left: 12px; border-left: 2px solid var(--border); }

/* ── Publications ── */
.pub-list { display: flex; flex-direction: column; gap: 16px; }
.pub-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  border-left: 3px solid var(--primary);
}
.pub-item p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.65; }
.pub-item .pub-doi { font-size: 0.8rem; color: var(--primary); margin-top: 8px; display: block; }
.pub-year {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-light);
  margin-bottom: 6px;
}

/* ── Tool cards (tools page) ── */
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.tool-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.tool-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.tool-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.tool-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; flex: 1; margin-bottom: 20px; }
.tool-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }

/* ── Tutorials ── */
.tutorial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 24px;
  transition: box-shadow .2s, transform .2s;
}
.tutorial-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.tutorial-card .tut-num {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary);
  margin-bottom: 10px;
}
.tutorial-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.tutorial-card p { font-size: 0.88rem; color: var(--text-secondary); }

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.contact-info h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 16px; }
.contact-info p { color: var(--text-secondary); line-height: 1.7; margin-bottom: 16px; }
.contact-detail { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.contact-detail-icon { font-size: 1.1rem; margin-top: 2px; }
.contact-detail p { margin: 0; font-size: 0.9rem; color: var(--text-secondary); }
.contact-detail strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }

/* ── Footer ── */
.lab-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 48px 0 28px;
}
.lab-footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .lab-logo { color: #fff; font-size: 1.1rem; display: block; margin-bottom: 10px; }
.footer-brand p { font-size: 0.85rem; line-height: 1.65; color: var(--footer-text); }
.footer-col h4 { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #fff; margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col li a { color: var(--footer-text); font-size: 0.88rem; transition: color .15s; }
.footer-col li a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--footer-text);
}

/* ── Page hero (inner pages) ── */
.page-hero {
  background: linear-gradient(135deg, var(--hero-bg) 0%, var(--hero-bg-end) 100%);
  padding: 56px 0 48px;
  color: #fff;
}
.page-hero h1 { font-size: 2rem; font-weight: 700; margin-bottom: 8px; }
.page-hero p { color: rgba(255,255,255,.8); font-size: 1.05rem; }

/* ── Misc ── */
.text-center { text-align: center; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-40 { margin-bottom: 40px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 40px 0; }
.link-arrow::after { content: ' →'; }

/* ── Nav dropdown ── */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger { cursor: pointer; }
.nav-dropdown-trigger::after { content: ' ▾'; font-size: 0.7em; opacity: .7; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 210px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 300;
  padding: 6px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 6px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.nav-dropdown-menu a:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.nav-dropdown-menu .dd-icon {
  width: 26px; height: 26px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700;
}
.nav-dropdown-menu .dd-badge {
  margin-left: auto;
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  padding: 2px 6px; border-radius: 999px;
}
.nav-dropdown-menu hr { border: none; border-top: 1px solid var(--border); margin: 4px 8px; }

/* ── Tool grid (tools page active section) ── */
.tools-active-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}
.active-tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: box-shadow .2s, transform .2s;
  border-top: 3px solid var(--primary);
}
.active-tool-card:nth-child(2) { border-top-color: var(--accent-teal); }
.active-tool-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.active-tool-card .tool-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.active-tool-card h3 { font-size: 1.2rem; font-weight: 700; color: var(--text); margin: 0; }
.active-tool-card > p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; margin-bottom: 18px; }
.active-tool-card .tool-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.active-tool-card .tool-tag {
  font-size: 0.75rem; font-weight: 600; padding: 3px 10px;
  border-radius: 999px; background: #f1f5f9; color: var(--text-secondary);
}
.active-tool-card .card-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.badge-beta { background: #fff7ed; color: #c2410c; }
.badge-live { background: #dcfce7; color: #15803d; }
.badge-pending { background: #fef2f2; color: #991b1b; }

/* ── ProtPipe form page ── */
.pipe-form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 28px 32px;
  margin-bottom: 20px;
}
.pipe-form-section-title {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--primary); margin-bottom: 16px;
}
.pipe-input-type-row { display: flex; gap: 12px; flex-wrap: wrap; }
.pipe-input-type-label {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border: 2px solid var(--border);
  border-radius: 8px; cursor: pointer; font-size: 0.9rem; color: var(--text-secondary);
  transition: border-color .15s, background .15s;
  user-select: none;
}
.pipe-input-type-label:has(input:checked) {
  border-color: var(--primary); background: #eff6ff; color: var(--primary); font-weight: 600;
}
.pipe-input-type-label input { width: auto; margin: 0; }
.pipe-textarea {
  width: 100%; box-sizing: border-box;
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.85rem; line-height: 1.6;
  padding: 14px 16px; border: 1px solid var(--border);
  border-radius: 8px; background: #f8fafc;
  resize: vertical; min-height: 120px;
  transition: border-color .15s;
}
.pipe-textarea:focus { outline: none; border-color: var(--primary); background: #fff; }
.pipe-textarea-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pipe-btn-ghost {
  padding: 7px 14px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; font-size: 0.82rem; cursor: pointer;
  color: var(--text-secondary); transition: background .15s, color .15s;
}
.pipe-btn-ghost:hover { background: #e2e8f0; color: var(--text); }
.pipe-validation-msg {
  display: none;
  margin-top: 10px; padding: 10px 14px;
  border-radius: 7px; font-size: 0.85rem;
}
.pipe-validation-msg.error { display: block; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.pipe-validation-msg.warning { display: block; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.pipe-analysis-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px;
}
.pipe-analysis-option {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 16px; border: 1.5px solid var(--border);
  border-radius: 10px; cursor: pointer; background: var(--bg);
  transition: border-color .15s, background .15s;
}
.pipe-analysis-option:has(input:checked) {
  border-color: var(--primary); background: #eff6ff;
}
.pipe-analysis-option input { width: auto; margin-top: 2px; flex-shrink: 0; }
.pipe-analysis-option .opt-title { font-weight: 600; font-size: 0.88rem; color: var(--text); margin-bottom: 3px; }
.pipe-analysis-option .opt-desc { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.4; }
.pipe-analysis-option .opt-status {
  display: inline-block; font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; padding: 2px 7px; border-radius: 999px;
  margin-top: 5px; letter-spacing: .04em;
}
.opt-status-live { background: #dcfce7; color: #15803d; }
.opt-status-beta { background: #fff7ed; color: #c2410c; }
.pipe-file-upload-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.pipe-file-btn { padding: 8px 14px; background: var(--bg); border: 1px dashed #94a3b8; border-radius: 7px; font-size: 0.83rem; cursor: pointer; color: var(--text-secondary); }
.pipe-file-btn:hover { background: #e2e8f0; }

/* ── ProtPipe results tabs ── */
.pipe-tabs-bar {
  display: flex; gap: 4px; flex-wrap: wrap;
  border-bottom: 2px solid var(--border); margin-bottom: 28px;
}
.pipe-tab-btn {
  padding: 10px 18px; background: none; border: none;
  font-size: 0.88rem; font-weight: 600; color: var(--text-secondary);
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; border-radius: 6px 6px 0 0;
  transition: color .15s, background .15s;
}
.pipe-tab-btn:hover { color: var(--text); background: var(--bg); }
.pipe-tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); background: #eff6ff; }
.pipe-tab-btn .tab-check { color: var(--success); margin-left: 5px; font-size: 0.8rem; }
.pipe-tab-btn .tab-warn { color: var(--warning); margin-left: 5px; font-size: 0.8rem; }
.pipe-tab-panel { display: none; }
.pipe-tab-panel.active { display: block; }

/* ── ProtPipe results components ── */
.pipe-result-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--card-radius); padding: 24px 28px; margin-bottom: 20px;
}
.pipe-result-card-title {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-light); margin-bottom: 14px;
}
.pipe-stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.pipe-stat {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 14px;
}
.pipe-stat-label { font-size: 0.72rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.pipe-stat-value { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.pipe-progress-steps { display: flex; flex-direction: column; gap: 10px; }
.pipe-step {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--border);
  font-size: 0.88rem;
}
.pipe-step-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.pipe-step-name { font-weight: 500; color: var(--text); flex: 1; }
.pipe-step-label { font-size: 0.78rem; font-weight: 700; }
.pipe-step.step-complete { background: #f0fdf4; border-color: #bbf7d0; }
.pipe-step.step-running { background: #eff6ff; border-color: #bfdbfe; }
.pipe-step.step-error { background: #fef2f2; border-color: #fecaca; }
.pipe-step.step-skipped { opacity: .5; }
.pipe-download-bar {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px;
  padding: 16px 20px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px;
  align-items: center;
}
.pipe-download-bar span { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); margin-right: 4px; }
.pipe-dl-btn {
  padding: 7px 14px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; background: var(--surface); color: var(--text-secondary);
  transition: background .15s, color .15s, border-color .15s;
  text-decoration: none; display: inline-flex; align-items: center; gap: 5px;
}
.pipe-dl-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; }
.pipe-endpoint-note {
  padding: 12px 16px; background: #fffbeb;
  border: 1px solid #fde68a; border-radius: 8px;
  font-size: 0.83rem; color: #92400e; margin-top: 14px; line-height: 1.5;
}
.pipe-endpoint-note strong { display: block; margin-bottom: 4px; }
.pipe-error-diag {
  padding: 16px 20px; background: #fef2f2;
  border: 1px solid #fecaca; border-radius: 10px; color: #991b1b;
  font-size: 0.88rem; line-height: 1.6;
}
.pipe-error-diag h4 { margin-bottom: 6px; font-size: 0.9rem; }
.pipe-error-diag code { background: rgba(0,0,0,.07); padding: 2px 6px; border-radius: 3px; font-size: 0.82rem; }
.comp-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.comp-bar-aa { width: 20px; font-size: 0.8rem; font-family: monospace; font-weight: 700; color: var(--text-secondary); text-align: center; flex-shrink: 0; }
.comp-bar-track { flex: 1; height: 14px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.comp-bar-fill { height: 100%; background: var(--primary); border-radius: 999px; opacity: .75; }
.comp-bar-pct { font-size: 0.78rem; color: var(--text-secondary); width: 36px; text-align: right; flex-shrink: 0; }
.pipe-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.pipe-table th {
  text-align: left; padding: 9px 12px;
  border-bottom: 2px solid var(--border);
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-secondary);
}
.pipe-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.pipe-table tr:last-child td { border-bottom: none; }
.pipe-table tr:hover td { background: #f8fafc; }
.pipe-phobius-grid { display: flex; gap: 16px; flex-wrap: wrap; }
.pipe-phob-card {
  border-radius: 10px; padding: 16px 20px; min-width: 160px; border: 1px solid;
}
.pipe-copy-btn {
  padding: 7px 14px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 0.82rem; font-weight: 600; cursor: pointer;
  background: var(--surface); color: var(--text-secondary);
  transition: background .15s; display: inline-flex; align-items: center; gap: 5px;
}
.pipe-copy-btn:hover { background: #e2e8f0; color: var(--text); }
.pipe-seq-display {
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.82rem; word-break: break-all;
  background: #f8fafc; padding: 14px 16px;
  border-radius: 8px; border: 1px solid var(--border);
  max-height: 140px; overflow-y: auto; line-height: 1.7;
}
.pipe-archive-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-bottom: 1px solid #f1f5f9;
  font-size: 0.88rem;
}
.pipe-archive-row:last-child { border-bottom: none; }
.pipe-archive-row:hover { background: #f8fafc; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pi-section { grid-template-columns: 1fr; }
  .pi-photo { margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; }
  /* Hide redundant tool launch buttons at narrow widths; dropdown covers them */
  .nav-tool-btn { display: none; }
}
@media (max-width: 700px) {
  .lab-nav {
    display: none; flex-direction: column;
    position: absolute; top: var(--nav-height); left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 12px 24px; gap: 4px; box-shadow: var(--shadow-md);
  }
  .lab-nav.open { display: flex; }
  .lab-nav a { padding: 10px 14px; }
  .lab-hamburger { display: flex; }
  .lab-header { position: relative; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-title { font-size: 1.9rem; }
  .featured-tool-card { flex-direction: column; }
  .section-title { font-size: 1.6rem; }
  /* Tool grids collapse to single column */
  .tools-active-grid { grid-template-columns: 1fr; }
  .pipe-analysis-grid { grid-template-columns: 1fr; }
  .pipe-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .pipe-phobius-grid { flex-direction: column; }
  /* Mobile nav: show dropdown sub-items inline (no floating overlay) */
  .nav-dropdown { position: static; }
  .nav-dropdown-menu {
    position: static;
    display: block;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--border);
    border-radius: 0;
    padding: 4px 0 4px 12px;
    background: none;
    margin-left: 14px;
  }
  .nav-dropdown-menu hr { display: none; }
  .nav-dropdown-menu a { font-size: 0.88rem; padding: 7px 10px; }
  .pipe-tabs-bar { gap: 2px; }
  .pipe-tab-btn { padding: 8px 12px; font-size: 0.82rem; }
  .pipe-download-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .pipe-download-bar .pipe-copy-btn { margin-left: 0 !important; }
}

/* ============================================================
   Motif Tool — standalone + ProtPipe integration styles
   ============================================================ */

/* ── Mode toggle tabs ── */
.motif-mode-bar {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  width: fit-content;
  margin-bottom: 18px;
}
.motif-mode-btn {
  padding: 7px 20px;
  font-size: 0.84rem;
  font-weight: 500;
  border: none;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.motif-mode-btn:not(:last-child) { border-right: 1px solid var(--border); }
.motif-mode-btn.active {
  background: var(--accent-teal);
  color: #fff;
}

/* ── Visual builder ── */
.motif-builder {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 56px;
}
.motif-segment {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1.5px solid var(--accent-teal);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-teal);
  position: relative;
  user-select: none;
}
.motif-segment .seg-del {
  cursor: pointer;
  color: var(--text-light);
  margin-left: 6px;
  font-size: 0.75rem;
  line-height: 1;
  border: none;
  background: none;
  padding: 0 2px;
}
.motif-segment .seg-del:hover { color: var(--error); }
.motif-gap-pill {
  display: flex;
  align-items: center;
  background: #fef9c3;
  border: 1.5px solid #fbbf24;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.78rem;
  color: #92400e;
  font-weight: 500;
  cursor: pointer;
  gap: 4px;
  position: relative;
}
.motif-gap-pill .seg-del {
  cursor: pointer;
  color: #b45309;
  font-size: 0.72rem;
  border: none;
  background: none;
  padding: 0 1px;
  margin-left: 4px;
}
.motif-gap-pill .seg-del:hover { color: var(--error); }
.motif-add-btn {
  padding: 5px 12px;
  border: 1.5px dashed var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text-light);
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.motif-add-btn:hover { border-color: var(--accent-teal); color: var(--accent-teal); }

/* ── Motif preview strip ── */
.motif-preview-bar {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 10px 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 7px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.motif-preview-label {
  font-size: 0.72rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.motif-preview-value {
  font-family: 'Menlo', 'Consolas', 'Courier New', monospace;
  font-size: 0.95rem;
  font-weight: 600;
  color: #065f46;
  letter-spacing: 0.03em;
}
.motif-preview-regex {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--text-light);
  word-break: break-all;
}

/* ── Preset chips ── */
.motif-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}
.motif-preset-chip {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  font-family: 'Menlo', 'Consolas', monospace;
}
.motif-preset-chip:hover {
  background: #eff6ff;
  border-color: var(--primary);
  color: var(--primary);
}
.motif-preset-chip.active {
  background: #eff6ff;
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

/* ── Sequence viewer ── */
.seq-viewer {
  font-family: 'Menlo', 'Consolas', 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  letter-spacing: 0.06em;
  overflow-x: auto;
  padding: 14px;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
  max-height: 320px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
.seq-viewer .seq-line {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}
.seq-viewer .seq-num {
  color: #475569;
  min-width: 40px;
  text-align: right;
  flex-shrink: 0;
  font-size: 0.72rem;
  user-select: none;
}
.seq-viewer .seq-text { flex: 1; }
.seq-viewer .seq-hit-1  { background: #fbbf24; color: #0f172a; border-radius: 2px; }
.seq-viewer .seq-hit-2  { background: #34d399; color: #0f172a; border-radius: 2px; }
.seq-viewer .seq-hit-3  { background: #f87171; color: #0f172a; border-radius: 2px; }
.seq-viewer .seq-hit-4  { background: #a78bfa; color: #0f172a; border-radius: 2px; }
.seq-viewer .seq-hit-5  { background: #38bdf8; color: #0f172a; border-radius: 2px; }
.seq-viewer .seq-hit-other { background: #fb923c; color: #0f172a; border-radius: 2px; }

/* ── Results table ── */
.motif-hits-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.motif-hits-table th {
  text-align: left;
  padding: 7px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}
.motif-hits-table td {
  padding: 7px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text);
}
.motif-hits-table tr:hover td { background: #f8fafc; cursor: pointer; }
.motif-hit-seq {
  font-family: monospace;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-teal);
}
.motif-hit-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  background: #d1fae5;
  color: #065f46;
}

/* ── Tutorial accordion ── */
.motif-tutorial { margin-top: 32px; }
.motif-tutorial-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}
.motif-accordion { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.motif-accordion-item { border-bottom: 1px solid var(--border); }
.motif-accordion-item:last-child { border-bottom: none; }
.motif-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 18px;
  cursor: pointer;
  background: var(--surface);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  user-select: none;
  transition: background 0.12s;
}
.motif-accordion-header:hover { background: #f8fafc; }
.motif-accordion-arrow { transition: transform 0.2s; font-size: 0.75rem; color: var(--text-light); }
.motif-accordion-header.open .motif-accordion-arrow { transform: rotate(180deg); }
.motif-accordion-body {
  display: none;
  padding: 16px 18px 18px;
  font-size: 0.87rem;
  line-height: 1.75;
  color: var(--text-secondary);
  background: #fafcff;
}
.motif-accordion-body.open { display: block; }
.motif-example-block {
  font-family: monospace;
  background: #1e293b;
  color: #e2e8f0;
  padding: 10px 14px;
  border-radius: 6px;
  margin: 10px 0;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}
.motif-example-block .ex-comment {
  color: #64748b;
  font-style: italic;
}

/* ── Inline add-segment popover ── */
.seg-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 14px;
  min-width: 240px;
  display: none;
}
.seg-popover.open { display: block; }
.seg-popover label { display: block; font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 4px; }
.seg-popover input, .seg-popover select {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 0.83rem;
  margin-bottom: 8px;
  background: var(--bg);
}
.seg-popover .pop-actions { display: flex; gap: 7px; }
.seg-popover .pop-actions button {
  flex: 1;
  padding: 5px 0;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg);
}
.seg-popover .pop-actions button.primary {
  background: var(--accent-teal);
  color: #fff;
  border-color: var(--accent-teal);
}

/* ── ProtPipe motif section ── */
.pipe-motif-section { margin-top: 12px; }
.pipe-motif-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 10px 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  user-select: none;
}
.pipe-motif-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-teal);
  cursor: pointer;
}
.pipe-motif-body { display: none; padding-top: 12px; }
.pipe-motif-body.open { display: block; }
.pipe-motif-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.pipe-motif-preset-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 0.82rem;
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.12s;
}
.pipe-motif-preset-item:hover { border-color: var(--accent-teal); }
.pipe-motif-preset-item input[type="checkbox"] { margin-top: 2px; accent-color: var(--accent-teal); }
.pipe-motif-preset-name { font-weight: 700; font-family: monospace; color: var(--accent-teal); display: block; }
.pipe-motif-preset-desc { color: var(--text-light); font-size: 0.74rem; margin-top: 2px; display: block; }
.pipe-motif-custom-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}
.pipe-motif-custom-row input {
  flex: 1;
  min-width: 200px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.88rem;
}
.pipe-motif-custom-row input:focus {
  outline: none;
  border-color: var(--accent-teal);
}

/* ── Motif results in ProtPipe ── */
.motif-query-block { margin-bottom: 20px; }
.motif-query-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.motif-query-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}
.motif-query-pattern {
  font-family: monospace;
  font-size: 0.82rem;
  color: var(--accent-teal);
  background: #f0fdf4;
  padding: 2px 8px;
  border-radius: 4px;
}
.motif-hit-count-badge {
  margin-left: auto;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
}
.motif-hit-count-badge.has-hits { background: #d1fae5; color: #065f46; }
.motif-hit-count-badge.no-hits  { background: #f1f5f9; color: var(--text-light); }

@media (max-width: 640px) {
  .motif-mode-bar { width: 100%; }
  .motif-mode-btn { flex: 1; text-align: center; }
  .pipe-motif-preset-grid { grid-template-columns: 1fr; }
}

/* ── Info tooltip (?) icons ─────────────────────────────────── */
.pipe-info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  user-select: none;
  border: 1px solid #cbd5e1;
}
.pipe-info-tip:hover { background: #cbd5e1; color: #1e293b; }
.pipe-info-tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #f8fafc;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.5;
  padding: 8px 12px;
  border-radius: 7px;
  white-space: normal;
  width: 280px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  text-transform: none;
  letter-spacing: 0;
}
.pipe-info-tip:hover::after { opacity: 1; }

/* Identity color coding in BLAST table */
.blast-ident-high { color: #15803d; font-weight: 700; }
.blast-ident-med  { color: #d97706; font-weight: 600; }
.blast-ident-low  { color: var(--text-secondary); }

/* ── ProtPipe progress bar ── */
.pipe-progress-track { background: #e2e8f0; border-radius: 4px; height: 6px; margin-bottom: 14px; overflow: hidden; }
.pipe-progress-fill  { height: 100%; background: #2563eb; border-radius: 4px; transition: width 0.4s ease; }

/* Running step pulse */
@keyframes pipe-shimmer { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }
.step-running { border-left: 3px solid #2563eb !important; animation: pipe-shimmer 1.4s ease-in-out infinite; }

/* ── Small navbar pill button (Motif Search) ── */
.nav-tool-btn-sm {
  display: inline-flex; align-items: center;
  padding: 5px 12px; border-radius: 6px; font-size: 0.82rem; font-weight: 500;
  border: 1px solid var(--border); color: var(--text-secondary);
  background: var(--bg); text-decoration: none;
  transition: background 0.15s, color 0.15s;
  margin-left: 4px;
}
.nav-tool-btn-sm:hover { background: #f1f5f9; color: var(--text); }
@media (max-width: 920px) { .nav-tool-btn-sm { display: none; } }
