/**
 * weave.vayati.ai — Constellation design alignment (vayati.com July 2026)
 * Overlay on Haven export bundle. Search-first with shared www tokens.
 */

:root {
  --constellation-bg: #0a0a0a;
  --constellation-violet: #9d6bff;
  --constellation-cyan: #00ffff;
  --constellation-threads: #cc88ff;
  --constellation-magenta: #ff00ff;
  --constellation-gold: #ffd700;
}

/* Base palette alignment with www */
body {
  background: radial-gradient(ellipse at 50% 0%, #1a0033 0%, var(--constellation-bg) 55%) !important;
  color: #e8e8e8;
}

.weave-main {
  max-width: 1100px !important;
}

/* Shared landing section system */
.landing-section__header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.landing-section__title {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
}

.landing-section__title--weave {
  background: linear-gradient(90deg, var(--constellation-cyan), var(--constellation-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-section__subtitle {
  margin: 0 auto;
  max-width: 560px;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #bbbbbb;
}

.landing-section__eyebrow {
  margin: 0 0 1rem;
  color: var(--constellation-cyan);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Header */
.weave-header {
  background: rgba(10, 10, 10, 0.92) !important;
  border-bottom-color: rgba(0, 255, 255, 0.15) !important;
}

.weave-header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.weave-header__brand:hover {
  text-decoration: none;
}

.weave-header__logo-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.35));
}

.weave-header__brand h1 {
  margin: 0;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  background: linear-gradient(90deg, var(--constellation-cyan), var(--constellation-threads));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.weave-header__tagline {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: #888;
  font-weight: 500;
}

.weave-header .live-badge {
  background: rgba(157, 107, 255, 0.2) !important;
  color: #c9a8ff !important;
  border: 1px solid rgba(157, 107, 255, 0.45) !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Session chrome — weave-hub-session-ui-v1 */
.weave-session-chrome {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-left: auto;
  margin-right: 0.75rem;
}

.weave-session-chrome__label {
  font-size: 0.8rem;
  color: #888;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.weave-session-chrome__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 255, 0.35);
  background: rgba(0, 255, 255, 0.08);
  color: #cceeee;
  font-size: 0.85rem;
  max-width: min(280px, 42vw);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weave-session-chrome__chip--pending {
  border-color: rgba(157, 107, 255, 0.4);
  background: rgba(157, 107, 255, 0.1);
  color: #d4c4ff;
}

.weave-session-chrome__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.8);
  flex-shrink: 0;
}

.weave-session-chrome__as {
  color: #88aaaa;
  font-weight: 500;
}

.weave-session-chrome__name {
  color: #00ffff;
  font-weight: 700;
}

.weave-session-chrome__btn {
  appearance: none;
  border: 1px solid rgba(255, 0, 255, 0.4);
  background: rgba(255, 0, 255, 0.12);
  color: #ffccff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.weave-session-chrome__btn:hover {
  border-color: #ff00ff;
  box-shadow: 0 0 12px rgba(255, 0, 255, 0.25);
  background: rgba(255, 0, 255, 0.2);
}

.weave-session-chrome__btn--sign-out {
  border-color: rgba(0, 255, 255, 0.35);
  background: rgba(0, 40, 40, 0.5);
  color: #aaffee;
}

.weave-session-chrome__btn--sign-out:hover {
  border-color: #00ffff;
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.2);
}

@media (max-width: 720px) {
  .weave-session-chrome {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    justify-content: flex-end;
    order: 5;
  }

  .weave-header {
    flex-wrap: wrap;
  }

  .weave-session-chrome__as {
    display: none;
  }
}

/* Hero shell with weave-search.jpg background */
.weave-hero-shell {
  position: relative;
  margin-bottom: 1.5rem;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 255, 0.25);
  box-shadow: 0 0 40px rgba(157, 107, 255, 0.1);
}

.weave-hero-shell__bg {
  position: absolute;
  inset: 0;
  background-position: center 35%;
  background-size: cover;
  background-repeat: no-repeat;
}

.weave-hero-shell__scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% 10%, rgba(157, 107, 255, 0.15) 0%, transparent 55%),
    linear-gradient(180deg, rgba(8, 8, 12, 0.5) 0%, rgba(10, 10, 10, 0.88) 55%, rgba(10, 10, 10, 0.95) 100%),
    linear-gradient(90deg, rgba(0, 255, 255, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.weave-hero-shell__content {
  position: relative;
  z-index: 1;
  padding: clamp(1.75rem, 4vw, 2.5rem) clamp(1.25rem, 4vw, 2rem) 1.5rem;
}

.weave-search-form--hero {
  max-width: 720px;
  margin: 0 auto 1rem;
}

.weave-search-btn {
  background: var(--constellation-cyan) !important;
  color: #000 !important;
  box-shadow: 0 0 24px rgba(0, 255, 255, 0.35);
  font-weight: 700 !important;
}

.weave-search-btn:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow: 0 0 32px rgba(0, 255, 255, 0.5);
}

/* Compact hierarchy strip */
.weave-hierarchy-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 auto 1rem;
  max-width: 720px;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(157, 107, 255, 0.3);
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(4px);
  font-size: 0.88rem;
  line-height: 1.5;
  color: #c4b5fd;
}

.weave-hierarchy-strip p {
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.weave-hierarchy-strip__flow {
  display: block;
  font-weight: 700;
  color: var(--constellation-cyan);
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.weave-hierarchy-strip__hint {
  color: #999;
  font-size: 0.82rem;
}

.weave-hierarchy-strip button {
  background: transparent;
  border: 1px solid rgba(0, 255, 255, 0.4);
  color: var(--constellation-cyan);
  border-radius: 9999px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  flex-shrink: 0;
}

/* Filter tab type accents */
.filter-tabs {
  max-width: 720px;
  margin: 0 auto 0.75rem;
  justify-content: center;
}

.filter-tab[data-filter='weave'].active {
  background: rgba(157, 107, 255, 0.28);
  border-color: var(--constellation-violet);
  color: #e9d5ff;
}

.filter-tab[data-filter='thread'].active {
  background: rgba(0, 255, 255, 0.15);
  border-color: var(--constellation-cyan);
  color: var(--constellation-cyan);
}

.filter-tab[data-filter='relic'].active {
  background: rgba(255, 215, 0, 0.12);
  border-color: var(--constellation-gold);
  color: var(--constellation-gold);
}

.filter-tab[data-filter='character'].active {
  background: rgba(255, 0, 255, 0.12);
  border-color: var(--constellation-magenta);
  color: #ff99ff;
}

.weave-hero-shell .weave-status-line {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.65rem;
}

.weave-status-line::before {
  content: attr(data-active-filter-label);
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid rgba(157, 107, 255, 0.35);
  background: rgba(157, 107, 255, 0.12);
  color: #d8b4fe;
  flex-shrink: 0;
}

.weave-status-line[data-active-filter='relic']::before {
  border-color: rgba(255, 215, 0, 0.45);
  background: rgba(255, 215, 0, 0.1);
  color: var(--constellation-gold, #ffd700);
}

.weave-status-line[data-active-filter='thread']::before {
  border-color: rgba(0, 255, 255, 0.4);
  background: rgba(0, 255, 255, 0.1);
  color: var(--constellation-cyan, #00ffff);
}

.weave-status-line[data-active-filter='weave']::before {
  border-color: rgba(157, 107, 255, 0.5);
  background: rgba(157, 107, 255, 0.18);
  color: #e9d5ff;
}

.weave-status-line[data-active-filter='character']::before {
  border-color: rgba(255, 0, 255, 0.4);
  background: rgba(255, 0, 255, 0.1);
  color: #ff99ff;
}

.weave-status-line:not([data-active-filter])::before {
  content: none;
}

/* Compact service status strip */
.weave-status-strip-section {
  margin-bottom: 1.5rem;
  padding: 0 0.25rem;
}

.weave-status-strip {
  text-align: center;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  border: 1px solid rgba(157, 107, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

.weave-status-strip__meta {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--constellation-violet);
}

.weave-status-strip__meta.is-stale {
  color: #f59e0b;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.04em;
}

.weave-status-strip.is-stale {
  border-color: rgba(245, 158, 11, 0.35);
}

.weave-status-strip__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.weave-status-strip__list.is-loading {
  opacity: 0.55;
}

.weave-status-strip__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
}

.weave-status-strip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.weave-status-strip__item.is-up .weave-status-strip__dot {
  background: #34d399;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.6);
}

.weave-status-strip__item.is-down .weave-status-strip__dot {
  background: #f87171;
}

.weave-status-strip__item.is-stale .weave-status-strip__dot {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.45);
}

.weave-status-strip__item.is-stale .weave-status-strip__name {
  color: #d4a574;
}

.weave-status-strip__name {
  color: #ccc;
  font-weight: 600;
}

/* Image-driven result cards */
.weave-card {
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  overflow: hidden;
  background: rgba(20, 20, 20, 0.85) !important;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.weave-card--weave {
  border-top-color: transparent;
}

.weave-card--thread {
  border-top-color: transparent;
}

.weave-card--relic {
  /* top bar retired — polish uses left accent only */
  border-top-color: transparent;
}

.weave-card--character {
  border-top-color: transparent;
}

.weave-card:hover,
.weave-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 10px 32px rgba(157, 107, 255, 0.15);
}

.weave-card__media {
  position: relative;
  /* card-height-v1 (2026-08-09): taller result cards — was 120px */
  height: 200px;
  min-height: 200px;
  flex-shrink: 0;
  overflow: hidden;
}

.weave-card__media-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  transition: transform 0.3s ease;
}

.weave-card:hover .weave-card__media-bg,
.weave-card:focus-visible .weave-card__media-bg {
  transform: scale(1.05);
}

.weave-card__media-bg--placeholder {
  opacity: 0.88;
  filter: saturate(0.75);
}

.weave-card__media-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, rgba(10, 10, 10, 0.35) 55%, rgba(10, 10, 10, 0.92) 100%),
    linear-gradient(90deg, rgba(157, 107, 255, 0.12) 0%, transparent 55%);
  pointer-events: none;
}

.weave-card--thread .weave-card__media-overlay {
  background:
    linear-gradient(180deg, transparent 0%, rgba(10, 10, 10, 0.35) 55%, rgba(10, 10, 10, 0.92) 100%),
    linear-gradient(90deg, rgba(0, 255, 255, 0.12) 0%, transparent 55%);
}

.weave-card--relic .weave-card__media-overlay {
  background:
    linear-gradient(180deg, transparent 0%, rgba(10, 10, 10, 0.35) 55%, rgba(10, 10, 10, 0.92) 100%),
    linear-gradient(90deg, rgba(255, 215, 0, 0.1) 0%, transparent 55%);
}

.weave-card__body {
  padding: 1.1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Type tag stays inside the card media only (not the viewport chrome) */
.weave-card {
  position: relative;
  isolation: isolate;
}

.weave-card .weave-card__type {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  margin-bottom: 0;
  /* Stay under sticky header chrome if a card peeks under the bar */
  max-width: calc(100% - 5.5rem);
  pointer-events: none;
}

.weave-card__type {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
}

.weave-card--weave .weave-card__type {
  background: rgba(201, 168, 255, 0.25);
  color: #e9d5ff;
  border: 1px solid rgba(201, 168, 255, 0.45);
}

.weave-card--thread .weave-card__type {
  background: rgba(0, 255, 255, 0.15);
  color: #7fffff;
  border: 1px solid rgba(0, 255, 255, 0.35);
}

.weave-card--relic .weave-card__type {
  background: rgba(255, 215, 0, 0.15);
  color: var(--constellation-gold);
  border: 1px solid rgba(255, 215, 0, 0.35);
}

.weave-card--relic .weave-card__thread-count {
  color: #ffcc00;
  font-weight: 500;
}

.weave-card--thread .weave-card__meta .weave-card__thread-count {
  color: var(--constellation-gold);
  font-weight: 500;
}

.weave-card--character .weave-card__type {
  background: rgba(255, 0, 255, 0.12);
  color: #ff99ff;
  border: 1px solid rgba(255, 0, 255, 0.35);
}

.weave-card__actions {
  margin-top: auto;
}

/* Modal + CTA */
.weave-modal__title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.weave-modal__backdrop {
  z-index: 0;
}

.weave-modal__panel {
  z-index: 1;
  background: #0d0d0d !important;
  border-color: rgba(0, 255, 255, 0.2) !important;
}

.weave-modal__close {
  position: relative;
  z-index: 2;
}

.weave-type-badge {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.weave-type-badge--weave { background: rgba(201, 168, 255, 0.2); color: #e9d5ff; border: 1px solid rgba(201, 168, 255, 0.5); }
.weave-type-badge--thread { background: rgba(0, 255, 255, 0.12); color: var(--constellation-cyan); border: 1px solid rgba(0, 255, 255, 0.35); }
.weave-type-badge--relic { background: rgba(255, 215, 0, 0.12); color: var(--constellation-gold); border: 1px solid rgba(255, 215, 0, 0.35); }
.weave-type-badge--character { background: rgba(167, 139, 250, 0.15); color: #c4b5fd; border: 1px solid rgba(167, 139, 250, 0.4); }
/* Castaway Chronicle strands (www-2 / chronicle-strand-weave-integration-v1) */
.weave-type-badge--chronicle {
  background: rgba(196, 163, 90, 0.16);
  color: #e8c56a;
  border: 1px solid rgba(196, 163, 90, 0.45);
}

.weave-modal__edu {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(157, 107, 255, 0.2);
}

.weave-modal__edu h4 {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--constellation-cyan);
}

.weave-modal__edu p {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #aaa;
}

.weave-modal__linked {
  margin: 0;
  font-size: 0.82rem;
  color: #888;
}

button.weave-cta {
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
}

.weave-cta--magenta {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  background: #c026d3;
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.weave-cta--magenta:hover,
.weave-cta--magenta:focus-visible {
  background: #a21caf;
}

.weave-modal__realm-link,
.weave-cta--cyan {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.85rem 1.5rem;
  border-radius: 9999px;
  border: none;
  background: var(--constellation-cyan);
  color: #000;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 0 24px rgba(0, 255, 255, 0.35);
  transition: filter 0.2s ease, box-shadow 0.2s ease;
}

.weave-modal__realm-link:hover,
.weave-cta--cyan:hover {
  filter: brightness(1.06);
  box-shadow: 0 0 32px rgba(0, 255, 255, 0.5);
  text-decoration: none;
  color: #000;
}

.weave-empty__title {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  color: #ccc;
  margin-bottom: 0.35rem;
}

.weave-empty__hint {
  display: block;
  margin-top: 0.5rem;
  color: #888;
  font-size: 0.9rem;
  line-height: 1.5;
}

.weave-card--fallback {
  cursor: default;
}

.weave-card--fallback:hover {
  transform: translateY(-2px);
}

.weave-card--fallback.weave-card--relic .weave-card__type {
  background: linear-gradient(135deg, rgba(22, 17, 0, 0.62) 0%, rgba(38, 30, 2, 0.56) 100%);
  color: #ffe07a;
  border: 1px solid rgba(255, 215, 0, 0.52);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.32);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.weave-card--fallback.weave-card--thread .weave-card__type {
  background: linear-gradient(135deg, rgba(0, 20, 24, 0.62) 0%, rgba(0, 34, 40, 0.56) 100%);
  color: #90ffff;
  border: 1px solid rgba(0, 255, 255, 0.52);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.32);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.weave-card--fallback.weave-card--weave .weave-card__type {
  background: linear-gradient(135deg, rgba(16, 9, 32, 0.62) 0%, rgba(30, 17, 50, 0.56) 100%);
  color: #ead8ff;
  border: 1px solid rgba(201, 168, 255, 0.56);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.32);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.weave-card--fallback .weave-card__media-overlay {
  z-index: 1;
  background:
    linear-gradient(180deg, transparent 0%, rgba(10, 10, 10, 0.28) 72%, rgba(10, 10, 10, 0.65) 100%),
    linear-gradient(
      90deg,
      #000 0%,
      rgba(0, 0, 0, 0.95) 6%,
      rgba(0, 0, 0, 0.65) 14%,
      rgba(0, 0, 0, 0.15) 24%,
      transparent 32%,
      transparent 68%,
      rgba(0, 0, 0, 0.15) 76%,
      rgba(0, 0, 0, 0.65) 86%,
      rgba(0, 0, 0, 0.95) 94%,
      #000 100%
    );
}

.weave-card--fallback.weave-card--relic {
  border-color: rgba(255, 215, 0, 0.35) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.1);
}

.weave-card--fallback.weave-card--relic:hover {
  box-shadow: 0 8px 28px rgba(255, 215, 0, 0.14);
}

.weave-card--fallback.weave-card--thread {
  border-color: rgba(0, 255, 255, 0.28) !important;
  box-shadow: inset 0 0 0 1px rgba(0, 255, 255, 0.08);
}

.weave-card--fallback.weave-card--thread:hover {
  box-shadow: 0 8px 28px rgba(0, 255, 255, 0.12);
}

.weave-card--fallback.weave-card--weave {
  border-color: rgba(157, 107, 255, 0.35) !important;
  box-shadow: inset 0 0 0 1px rgba(157, 107, 255, 0.1);
}

.weave-card--fallback.weave-card--weave:hover {
  box-shadow: 0 8px 28px rgba(157, 107, 255, 0.14);
}

.weave-card--fallback.weave-card--relic .weave-card__open {
  color: var(--constellation-gold);
}

.weave-card--fallback.weave-card--thread .weave-card__open {
  color: #7fffff;
}

.weave-card--fallback.weave-card--weave .weave-card__open {
  color: #e9d5ff;
}

/* Footer */
.weave-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.75rem 1.25rem;
  border-top-color: rgba(0, 255, 255, 0.1) !important;
}

.weave-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.weave-footer__links a {
  font-weight: 600;
}

.weave-footer__note {
  margin: 0;
  font-size: 0.8rem;
  color: #666;
}

.weave-footer__links--legal {
  gap: 0.85rem;
  font-size: 0.9rem;
}

.weave-footer__links--legal a {
  color: #88dddd;
  font-weight: 500;
}

/* Guest banner legal links (legal-weave-wiring-v1) */
.weave-guest-banner__legal {
  display: inline-block;
  margin-left: 0.65rem;
  font-size: 0.85rem;
  color: #999;
}

.weave-guest-banner__legal-link {
  color: #88dddd;
  text-decoration: none;
  font-weight: 500;
}

.weave-guest-banner__legal-link:hover {
  text-decoration: underline;
  color: #00ffff;
}

/* Phase 3 — Interactive pyramid hierarchy */
:root {
  --constellation-emerald: #34d399;
  --constellation-emerald-dim: rgba(52, 211, 153, 0.15);
}

.hierarchy-tree--pyramid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0;
}

.pyramid-apex {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  max-width: 100%;
}

.pyramid-apex__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e8e8e8;
  line-height: 1.35;
}

.pyramid-connector {
  width: 2px;
  height: 14px;
  background: linear-gradient(180deg, var(--constellation-violet), rgba(157, 107, 255, 0.2));
}

.pyramid-connector--between {
  height: 10px;
}

.pyramid-tier {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
}

.pyramid-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 108px;
  max-width: 160px;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(157, 107, 255, 0.3);
  background: rgba(255, 255, 255, 0.04);
  color: #ccc;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  font: inherit;
  text-align: center;
}

.pyramid-node:hover,
.pyramid-node:focus-visible {
  border-color: var(--constellation-cyan);
  box-shadow: 0 0 16px rgba(0, 255, 255, 0.2);
  outline: none;
}

.pyramid-node--active,
.pyramid-node--revealed {
  border-color: var(--constellation-violet);
  background: rgba(157, 107, 255, 0.12);
}

.pyramid-node--focused {
  box-shadow: 0 0 0 2px var(--constellation-cyan);
}

.pyramid-node__icon {
  font-size: 1.1rem;
  color: var(--constellation-cyan);
}

.pyramid-node__type {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
}

.pyramid-node__label {
  font-size: 0.78rem;
  line-height: 1.35;
  color: #ddd;
}

.pyramid-node--relic .pyramid-node__icon { color: var(--constellation-gold); }
.pyramid-node--character .pyramid-node__icon { color: var(--constellation-magenta); }
.pyramid-node--proof .pyramid-node__icon { color: var(--constellation-violet); }
.pyramid-node--source .pyramid-node__icon { color: var(--constellation-cyan); }
.pyramid-node--interweave .pyramid-node__icon { color: #c4b5fd; }

.pyramid-node--echoes {
  border-color: rgba(52, 211, 153, 0.45);
  background: var(--constellation-emerald-dim);
}

.pyramid-node--echoes .pyramid-node__icon,
.pyramid-node--echoes .pyramid-node__type {
  color: var(--constellation-emerald);
}

.pyramid-node--echoes:hover,
.pyramid-node--echoes:focus-visible {
  border-color: var(--constellation-emerald);
  box-shadow: 0 0 18px rgba(52, 211, 153, 0.25);
}

.pyramid-echoes-banner {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.08), rgba(10, 10, 10, 0.6));
}

.pyramid-echoes-banner__title {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--constellation-emerald);
}

.pyramid-echoes-banner__text {
  margin: 0 0 0.6rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #aaa;
}

.pyramid-echoes-banner__link {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--constellation-emerald);
  text-decoration: none;
}

.pyramid-echoes-banner__link:hover {
  text-decoration: underline;
}

.pyramid-empty {
  color: #888;
  font-size: 0.9rem;
  text-align: center;
}

.weave-type-badge--echoes {
  background: rgba(52, 211, 153, 0.15);
  color: var(--constellation-emerald);
  border: 1px solid rgba(52, 211, 153, 0.4);
}

/* Phase 4 — rich node preview panels */
.node-preview-panel {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 255, 0.25);
  background: rgba(10, 10, 10, 0.55);
}

.node-preview-panel__media {
  margin-bottom: 0.65rem;
  border-radius: 10px;
  overflow: hidden;
  max-height: 100px;
}

.node-preview-panel__img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.node-preview-panel__title {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--constellation-cyan);
}

.node-preview-panel__body {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #aaa;
}

.node-preview-panel__link {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--constellation-violet);
  text-decoration: none;
}

.node-preview-panel__link:hover {
  text-decoration: underline;
}

/* Phase 4 — inline attribution form (replaces window.prompt patterns) */
.pyramid-inline-form {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(157, 107, 255, 0.3);
  background: rgba(157, 107, 255, 0.06);
}

.pyramid-inline-form__label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--constellation-violet);
}

.pyramid-inline-form__output {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(157, 107, 255, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: #ccc;
  font-size: 0.8rem;
  font-family: inherit;
  resize: vertical;
}

.pyramid-inline-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.pyramid-inline-form__btn {
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  border: 1px solid rgba(0, 255, 255, 0.45);
  background: rgba(0, 255, 255, 0.1);
  color: var(--constellation-cyan);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.pyramid-inline-form__btn:hover {
  background: rgba(0, 255, 255, 0.18);
}

.pyramid-inline-form__status {
  font-size: 0.75rem;
  color: var(--constellation-emerald);
}

/* weave-five — hierarchy threads, guest CTAs, thread search */
.pyramid-node--thread {
  border-color: rgba(0, 255, 255, 0.35) !important;
  background: rgba(0, 255, 255, 0.08) !important;
}

.pyramid-node--thread .pyramid-node__type {
  color: var(--constellation-cyan);
}

.weave-back-to-relic {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  padding: 0.4rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(201, 168, 255, 0.35);
  background: rgba(201, 168, 255, 0.1);
  color: #e9d5ff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.weave-back-to-relic:hover,
.weave-back-to-relic:focus-visible {
  border-color: rgba(0, 255, 255, 0.45);
  color: #fff;
}

.weave-card--thread-result {
  border-top: 3px solid var(--constellation-cyan) !important;
}

.weave-card--thread-result .weave-card__media {
  position: relative;
  min-height: 140px;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.weave-card--thread-result .weave-card__media-bg {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.weave-card--thread-result .weave-card__body {
  padding-top: 0.85rem;
}

.weave-card__parent-relic {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  opacity: 0.85;
}

.weave-card__guest-cta {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.78rem;
  padding: 0.45rem 0.75rem;
  text-decoration: none;
}

.weave-guest-banner {
  margin: 0 0 1rem;
  padding: 12px 20px;
  text-align: center;
  border-radius: 0;
  border-bottom: 1px solid #2a2a4a;
  background: #1a1a2e;
}

.weave-guest-banner__content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

.weave-guest-banner__text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.weave-guest-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.weave-guest-banner__secondary {
  font-size: 0.82rem;
}

.weave-modal__guest-cta {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 0, 255, 0.3);
  background: rgba(255, 0, 255, 0.06);
}

.weave-modal__guest-cta p {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
}

.weave-modal__guest-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.weave-modal__guest-hint {
  margin: 0;
  font-size: 0.78rem;
  opacity: 0.8;
}

@media (max-width: 640px) {
  .weave-hierarchy-strip {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .weave-search-form--hero {
    flex-direction: column;
  }

  .weave-search-btn {
    width: 100%;
  }

  .pyramid-tier {
    gap: 0.4rem;
  }

  .pyramid-node {
    min-width: 96px;
    max-width: 48%;
  }
}
/* TP-ECHO-005 / mythic-promotion-close-out-v1 */
.weave-type-badge--mythic,
.weave-card--mythic .weave-type-badge,
[data-badge="Mythic Relic"] {
  background: linear-gradient(135deg, rgba(168, 92, 42, 0.2), rgba(196, 163, 90, 0.35));
  border-color: rgba(168, 92, 42, 0.55);
  color: #6b3a12;
  font-weight: 700;
}
.weave-card--mythic {
  box-shadow: 0 0 0 1px rgba(196, 163, 90, 0.35), 0 8px 24px rgba(42, 24, 8, 0.08);
}
.weave-card--virtual .weave-type-badge,
.weave-type-badge--virtual {
  background: rgba(42, 95, 110, 0.12);
  border-color: rgba(42, 95, 110, 0.35);
  color: #2a5f6e;
}

