
/* ============================================================================
   REPO WELCOME — diamond-sheet style
   Each feature is its own COLOR-CODED ROW. Typewriter monospace.
   Anti-regression: pure addition. No existing CSS touched.
   ============================================================================ */

.repo-welcome-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none;
  transition: opacity 320ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10000;
}
.repo-welcome-backdrop.is-open { opacity: 1 !important; pointer-events: auto !important; }

.repo-welcome {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -46%) scale(0.96);
  width: calc(100% - 32px);
  max-width: 620px;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  background: linear-gradient(180deg, #0d0710 0%, #14081a 100%);
  border: 1px solid rgba(20, 184, 166, 0.18);
  border-radius: 20px;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(20, 184, 166, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 40px 36px 28px;
  opacity: 0; pointer-events: none;
  transition: opacity 320ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10001;
  color: #fafafa;
  font-family: 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
}

/* Header */
.repo-welcome-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 30px; height: 30px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #75665a;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  transition: color 160ms, border-color 160ms;
}
.repo-welcome-close:hover { color: #fafafa; border-color: rgba(255, 255, 255, 0.25); }

.repo-welcome-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 4px;
  flex-wrap: wrap;
}
.repo-welcome-prefix {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #14b8a6;
  white-space: nowrap;
}
.repo-welcome-id {
  font-size: 10px;
  letter-spacing: 0.10em;
  color: #75665a;
  white-space: nowrap;
}

.repo-welcome-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 34px;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 8px 0 14px;
  color: #fafafa;
}
.repo-welcome-title em {
  font-style: italic;
  color: #14b8a6;
}

/* DIAMOND-SHEET ROWS — each feature is its own labeled bullet row */
.repo-welcome-sheet {
  display: flex;
  flex-direction: column;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.repo-welcome-row {
  display: grid;
  grid-template-columns: 28px 110px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  line-height: 1.45;
  color: #d9d2c8;
}
.repo-welcome-row:last-child { border-bottom: none; }

.repo-welcome-row-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #75665a;
  font-feature-settings: "tnum" 1;
}
.repo-welcome-row-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.repo-welcome-row-text {
  color: #d9d2c8;
  font-size: 13px;
  line-height: 1.5;
}
.repo-welcome-row-text a {
  color: #14b8a6;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.repo-welcome-row-check {
  width: 24px; height: 24px;
  display: inline-flex;
  align-items: center; justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #0c0710;
  background: #14b8a6;
}

/* Color-coded row variants */
.repo-welcome-row.is-sell   { /* The main "you should buy this" rows - teal */
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.04), transparent 80%);
}
.repo-welcome-row.is-sell .repo-welcome-row-label,
.repo-welcome-row.is-sell .repo-welcome-row-text a { color: #14b8a6; }
.repo-welcome-row.is-sell .repo-welcome-row-label { color: #2dd4bf; }

.repo-welcome-row.is-promise { /* Guarantees - amber/gold */
  background: linear-gradient(90deg, rgba(245, 165, 36, 0.05), transparent 80%);
}
.repo-welcome-row.is-promise .repo-welcome-row-label { color: #fb923c; }
.repo-welcome-row.is-promise .repo-welcome-row-check { background: #f59e0b; }

.repo-welcome-row.is-live   { /* Action/live - matching elyndor green accent */
  background: linear-gradient(90deg, rgba(0, 255, 65, 0.04), transparent 80%);
}
.repo-welcome-row.is-live .repo-welcome-row-label {
  color: #00ff41;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.25);
}

/* "WHAT'S GROWING" stats panel */
.repo-welcome-stats {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.30);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 22px;
}
.repo-welcome-stats-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #14b8a6;
  margin: 0 0 12px;
}
.repo-welcome-stats-title::before {
  content: "▲";
  font-size: 10px;
  color: #00ff41;
}
.repo-welcome-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  font-size: 12px;
  color: #d9d2c8;
  line-height: 1.5;
}
.repo-welcome-stats-grid dt {
  display: inline;
  color: #f5a524;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.repo-welcome-stats-grid dd {
  display: inline;
  margin: 0;
  color: #e6e6e0;
}
.repo-welcome-stats-grid > div { display: flex; gap: 6px; align-items: baseline; }
.repo-welcome-stats-foot {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.10);
  font-size: 11px;
  color: #00ff41;
  letter-spacing: 0.04em;
}

/* Footer with dismiss */
.repo-welcome-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.repo-welcome-note {
  font-size: 11px;
  color: #75665a;
  letter-spacing: 0.04em;
}
.repo-welcome-dismiss {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  color: #fafafa;
  border: 0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 160ms, transform 160ms, box-shadow 160ms;
  box-shadow: 0 6px 18px rgba(20, 184, 166, 0.35);
}
.repo-welcome-dismiss:hover {
  filter: brightness(1.10);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(20, 184, 166, 0.5);
}
.repo-welcome-dismiss:active { transform: translateY(0) scale(0.98); }

/* TK-WELCOME-FIX: was missing the .is-open rule for the MODAL itself.
   Without this, the backdrop appears but the modal stays invisible
   (creating a "black film" that blocks the page).
   Use !important to win against any future CSS conflicts.
*/
.repo-welcome.is-open {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translate(-50%, -50%) scale(1) !important;
}

/* Safety net: if the modal's transition CSS conflicts, force the open state */
.repo-welcome[aria-hidden="false"] {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Make the backdrop cursor:pointer to make it obviously clickable */
.repo-welcome-backdrop {
  cursor: pointer;
}

@media (max-width: 640px) {
  .repo-welcome { padding: 32px 22px 22px; border-radius: 16px; }
  .repo-welcome-title { font-size: 26px; }
  .repo-welcome-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 12px 0;
  }
  .repo-welcome-row-label { font-size: 10px; }
  .repo-welcome-row-num { display: none; }
  .repo-welcome-row-check { display: none; }
  .repo-welcome-stats-grid { grid-template-columns: 1fr; }
  .repo-welcome-cta { flex-direction: column; align-items: stretch; }
  .repo-welcome-dismiss { width: 100%; }
}
