.home-page .site-header {
  background: #009688;
  border-bottom-color: #00796b;
  box-shadow: 0 4px 18px rgba(0, 77, 64, 0.22);
}
.home-page .site-header .brand-text,
.home-page .site-header .brand-text strong,
.home-page .site-header .brand-text .brand-evo,
.home-page .site-header .desktop-nav a,
.home-page .site-header .desktop-nav button,
.home-page .site-header .mobile-nav a,
.home-page .site-header .mobile-nav .report-bug-button {
  color: #fff;
}
.home-page .site-header .desktop-nav a:hover,
.home-page .site-header .desktop-nav button:hover,
.home-page .site-header .mobile-nav a:hover,
.home-page .site-header .mobile-nav .report-bug-button:hover,
.home-page .site-header .desktop-nav .section-nav-link.is-active,
.home-page .site-header .mobile-nav .section-nav-link.is-active {
  color: #fff;
}
.home-page .site-header .desktop-nav .section-nav-link::after,
.home-page .site-header .mobile-nav .section-nav-link::after {
  background: #fff;
}
.home-page .site-header .menu-toggle {
  border-color: rgba(255, 255, 255, 0.65);
  background: rgba(0, 77, 64, 0.18);
}
.home-page .site-header .menu-toggle span {
  background: #fff;
}
.home-page .site-header .report-bug-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-weight: 400;
  transform: none;
}
.home-page .site-header .report-bug-button:hover,
.home-page .site-header .report-bug-button:focus-visible {
  background: transparent;
  box-shadow: none;
  transform: none;
}
.home-page .site-header .mobile-nav .report-bug-button {
  display: flex;
  width: 100%;
  padding: 12px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  text-align: left;
}
.home-page .report-bug-icon {
  display: block;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  transform: translateY(1px);
}
.home-page .site-footer {
  border-top-color: #000;
  background: #000;
  color: #fff;
}
.home-page .site-footer .footer-copy,
.home-page .site-footer .footer-copy p,
.home-page .site-footer .footer-copy p + p {
  color: #fff;
}
.home-page .site-footer .footer-resources a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.home-page .site-footer .footer-resources a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.home-page .hero-section {
  display: flex;
  align-items: center;
  min-height: calc(100svh - 77px);
  padding: 32px 0;
}
.home-page .hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(1500px, calc(100% - 48px));
  min-height: 0;
}
.home-page .hero-logo-frame {
  width: clamp(180px, 29svh, 250px);
  max-width: 70%;
  aspect-ratio: 975 / 610;
  overflow: hidden;
}
.home-page .hero-logo {
  display: block;
  width: 100%;
  height: auto;
}
.home-page .hero-content h1 {
  margin: 20px 0 0;
  font-size: clamp(2rem, 3.8vw, 3.25rem);
}
.home-page .hero-actions {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.home-page .hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 154px;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #231f1b;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
  transition: background-color 160ms ease, border-color 160ms ease;
}
.home-page .hero-button-start { background: #f7f9fc; border-color: #f7f9fc; }
.home-page .hero-button-docs { background: #fff; border-color: #e2e6ea; }
.home-page .hero-button:hover { background: #e9edf2; border-color: #d5dbe2; }
.home-page .hero-button:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
.home-page .hero-description {
  display: grid;
  gap: 10px;
}
.home-page .hero-description p { margin: 0; }
.home-page .hero-description .hero-access-note {
  color: var(--primary-deep);
  font-size: 1.2rem;
  font-weight: 600;
}
.home-page .hero-capabilities {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 920px;
  margin: 22px auto 0;
}
.home-page .hero-capabilities span {
  padding: 7px 13px;
  border: 1px solid rgba(0, 150, 136, 0.18);
  border-radius: 999px;
  background: rgba(234, 244, 250, 0.82);
  color: var(--primary-deep);
  font-size: 0.88rem;
  font-weight: 600;
}
.home-workflow-scroll {
  margin-top: 40px;
  overflow-x: auto;
  padding: 4px;
}
.home-workflow-scroll:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.home-workflow { position: relative; min-width: 1000px; }
.home-workflow-image { display: block; width: 100%; height: auto; }
.home-workflow-links { position: absolute; inset: 0; pointer-events: none; }
.home-workflow-link {
  position: absolute;
  display: block;
  border-radius: 10px;
  pointer-events: auto;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}
.home-workflow-link:hover {
  background: rgb(77 150 232 / 10%);
  box-shadow: inset 0 0 0 2px #4d96e8;
}
.home-workflow-link:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  background: rgb(77 150 232 / 12%);
}
@media (max-width: 640px) {
  .home-page .hero-section { min-height: calc(100svh - 71px); }
  .home-page .hero-content { width: calc(100% - 24px); }
  .home-workflow-scroll { margin-top: 28px; }
  .home-page .hero-capabilities { justify-content: flex-start; }
}

/* Homepage tool catalogue; scoped independently of analysis workspaces. */
.home-page #tools.analysis-section {
  position: relative;
  display: block;
  /* Keep the following section below the viewport at the Analysis anchor. */
  min-height: calc(100svh - var(--home-header-height, 77px) + 1px);
  min-height: calc(100dvh - var(--home-header-height, 77px) + 1px);
  padding: 24px 0;
  background: #fff;
}
.home-page #tools .container { width: min(1120px, calc(100% - 48px)); }
.home-page #tools .section-heading { max-width: none; margin: 0 0 18px; text-align: center; }
.home-page #tools .section-heading h2 { margin: 0; font-size: 1.8rem; }
.home-page #docs .section-heading h2 { font-size: 1.8rem; }
.analysis-legacy-anchor { position: absolute; top: 0; left: 0; }
.analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 22px;
}
.analysis-tool {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px 18px;
  border: 1px solid #dae5eb;
  border-radius: 8px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.analysis-tool h3 {
  margin: 0 0 8px;
  color: var(--primary-deep);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
}
/* Extend each illustration's background into the space left by object-fit. */
.analysis-tool[href="/ncbi-fetcher"] { --preview-background: #eaf7fe; }
.analysis-tool[href="/crispr-processing"] { --preview-background: #fde4e6; }
.analysis-tool[href="/spacer-map"] { --preview-background: #fafae5; }
.analysis-tool[href="/spacer-target"] { --preview-background: #faecdb; }
.analysis-tool[href="/tree-builder"] { --preview-background: #e8f4ea; }
.analysis-tool[href="/figure-composer"] { --preview-background: #fde9f2; }
.analysis-tool img {
  display: block;
  width: 100%;
  height: clamp(64px, calc(50svh - 235px), 140px);
  object-fit: contain;
  border-radius: 4px;
  background: var(--preview-background, transparent);
}
.analysis-tool p { margin: 10px 0 0; color: var(--muted); font-size: 0.9rem; font-weight: 700; line-height: 1.45; }
.analysis-tool:hover { border-color: #7faabd; box-shadow: 0 6px 20px #123f5510; }
.analysis-tool:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }

/* Documentation cards use the same compact card language as Analysis cards. */
.home-page #docs {
  /* Leave enough scrollable space to align Documentation below the header
     without bringing the preceding Analysis section into view. */
  min-height: calc(100svh - var(--home-header-height, 77px) - var(--home-footer-height, 103px));
  min-height: calc(100dvh - var(--home-header-height, 77px) - var(--home-footer-height, 103px));
  padding: clamp(24px, 5svh, 48px) 0;
}
.home-page #docs .container { width: min(1000px, calc(100% - 32px)); }
.home-page #docs .section-heading { margin: 0 auto 20px; }
.home-page #docs .section-heading h2 { margin: 0; }
.home-page #docs .docs-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 22px;
  justify-content: initial;
}
.home-page #docs .docs-workflow-image {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 24px;
}
.home-page #docs .doc-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px 18px;
  border: 1px solid #dae5eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}
.home-page #docs .doc-card h3 {
  margin: 0 0 8px;
  color: var(--primary-deep);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
}
.home-page #docs .doc-card p {
  min-height: 0;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}
.home-page #docs .doc-tool-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 12px;
  margin-top: 14px;
}
.home-page #docs .doc-tool-links a {
  margin: 0;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
}
.home-page #docs .doc-tool-links a:hover {
  color: var(--primary-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.home-page #docs .doc-tool-links a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 2px;
}
.home-page .footer-copy .report-bug-button { margin-bottom: 12px; }
@media (max-width: 960px) {
  .analysis-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 820px) {
  .home-page #docs .docs-grid { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 580px) {
  .home-page #tools.analysis-section { padding: 24px 0; }
  .home-page #tools .container { width: calc(100% - 32px); }
  .analysis-grid { grid-template-columns: 1fr; gap: 20px; }
  .home-page #docs .doc-card { padding: 14px 12px; }
  .home-page #docs .doc-tool-links { gap: 8px; }
  .home-page #docs .doc-tool-links a { font-size: 0.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .analysis-tool, .home-workflow-link, .home-page .hero-button { transition: none; }
}
