/**
 * weave-search-fold-v1 (2026-08-15)
 * Close the gap between the search bar and result cards.
 * Health lives in the footer. Cabinet collapses. Active search
 * hides hero extras so mobile results stay on screen.
 */

/* Always: less air under the hero title */
.weave-hero-shell {
  margin-bottom: 0.75rem;
}
.weave-hero-shell__content {
  padding: clamp(1rem, 3vw, 1.75rem) clamp(0.9rem, 3vw, 1.75rem) 1rem;
}
.weave-hero-shell .landing-section__header {
  margin-bottom: 0.65rem;
}
.weave-hero-shell .landing-section__title--weave {
  font-size: clamp(1.35rem, 4vw, 2.1rem);
  margin-bottom: 0.25rem;
}

/* Health: compact when it still sits mid-page (pre-move), then footer home */
.weave-status-strip-section {
  margin-bottom: 0.75rem;
}
.weave-status-strip {
  padding: 0.55rem 0.75rem;
}

.weave-footer .weave-status-strip-section {
  margin: 0.85rem 0 0.15rem;
  padding: 0;
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}
.weave-footer .weave-status-strip {
  padding: 0.4rem 0.15rem;
  border: none;
  background: transparent;
}
.weave-footer .weave-status-strip__meta {
  margin-bottom: 0.35rem;
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  opacity: 0.8;
}
.weave-footer .weave-status-strip__item {
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
}

/* Cabinet: one-line summary, body only if opened */
.weave-cabinet-frame {
  margin: 0.4rem auto 0.35rem !important;
  max-width: 720px;
  padding: 0.35rem 0.7rem !important;
}
.weave-cabinet-frame > summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c9a84c;
  font-weight: 700;
  padding: 0.15rem 0;
}
.weave-cabinet-frame > summary::-webkit-details-marker {
  display: none;
}
.weave-cabinet-frame > summary::after {
  content: ' ▾';
  opacity: 0.55;
  font-size: 0.8em;
}
.weave-cabinet-frame[open] > summary::after {
  content: ' ▴';
}
.weave-cabinet-frame[open] {
  padding-bottom: 0.55rem !important;
}

.weave-results {
  scroll-margin-top: 3.2rem;
}

/* Session chrome must stay visible — fold never hides Sign in / Signed in. */
.weave-session-chrome,
#weave-session-chrome {
  display: flex !important;
  visibility: visible !important;
}
@media (max-width: 800px) {
  .weave-header {
    position: sticky;
    top: 0;
    z-index: 50;
  }
}

/* Active search: drop everything that is not search / tabs / results */
body.weave-search-active .weave-hero-shell .landing-section__subtitle,
body.weave-search-active #weave-edu-banner,
body.weave-search-active .weave-cabinet-frame,
body.weave-search-active #odyssey-featured-host,
body.weave-search-active .cohesion-demo-host,
body.weave-search-active .cohesion-welcome {
  display: none !important;
}
body.weave-search-active .weave-hero-shell {
  margin-bottom: 0.45rem;
}
body.weave-search-active .weave-hero-shell__content {
  padding-top: 0.75rem;
  padding-bottom: 0.65rem;
}
body.weave-search-active .weave-hero-shell .landing-section__header {
  margin-bottom: 0.4rem;
}
body.weave-search-active .weave-search-form--hero {
  margin-bottom: 0.55rem;
}

/* Create-path honesty: one line stays visible on Relics even during search */
.weave-create-path {
  max-width: 720px;
  margin: 0 auto 0.45rem;
  padding: 0.35rem 0.15rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: rgba(200, 190, 170, 0.88);
  text-align: center;
}
.weave-create-path[hidden] {
  display: none !important;
}
.weave-create-path a {
  color: #c9a84c;
  font-weight: 650;
}
.weave-create-empty-hint {
  display: block;
  margin-top: 0.55rem;
  font-size: 0.82rem;
  color: rgba(200, 190, 170, 0.9);
}
.weave-create-empty-hint[hidden] {
  display: none !important;
}
.weave-create-empty-hint a {
  color: #c9a84c;
}

@media (max-width: 720px) {
  .weave-hero-shell__content {
    padding: 0.75rem 0.75rem 0.65rem;
  }
  .weave-hero-shell .landing-section__header {
    margin-bottom: 0.45rem;
  }
  .weave-hierarchy-strip {
    margin-bottom: 0.55rem;
    padding: 0.5rem 0.7rem;
    font-size: 0.8rem;
  }
  .weave-status-strip-section:not(.weave-footer .weave-status-strip-section) {
    margin-bottom: 0.5rem;
  }
  body.weave-search-active .weave-hero-shell .landing-section__title--weave {
    font-size: 1.15rem;
  }
}
