/* ========================================
   Tech Stack Guide Page
   ======================================== */
.ts {
  min-height: 100vh;
  padding: calc(var(--nav-height) + var(--space-2xl)) var(--space-lg) var(--space-3xl);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.ts__inner {
  max-width: 680px;
  width: 100%;
}

.ts__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.ts__title {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
  color: var(--color-text-dark);
}

.ts__subtitle {
  font-size: 17px;
  color: var(--color-text-muted-dark);
  line-height: 1.5;
  max-width: 520px;
  margin: 0 auto;
}

/* --- Form --- */
.ts__group {
  margin-bottom: var(--space-xl);
}

.ts__label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--color-text-dark);
}

.ts__pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.ts__pill {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ts__pill:hover {
  border-color: rgba(0, 0, 0, 0.3);
}

.ts__pill.active {
  background: var(--color-bg-dark);
  color: var(--color-text-light);
  border-color: var(--color-bg-dark);
}

.ts__generate {
  width: 100%;
  margin-top: var(--space-md);
}

/* --- Results --- */
.ts__results {
  animation: fadeInUp 0.4s ease;
}

.ts__results-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  margin-bottom: var(--space-xl);
  text-align: center;
  color: var(--color-text-dark);
}

.ts__stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xs);
  margin-bottom: var(--space-xl);
}

.ts__stack-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.ts__stack-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent-orange);
  margin-bottom: 4px;
}

.ts__stack-value {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--color-text-dark);
}

.ts__stack-note {
  font-size: 13px;
  color: var(--color-text-muted-dark);
  margin-top: 4px;
}

/* --- Reasoning --- */
.ts__reasoning {
  background: var(--color-bg-dark);
  color: var(--color-text-light);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  font-size: 15px;
  line-height: 1.6;
}

.ts__reasoning p {
  margin-bottom: var(--space-md);
}

.ts__reasoning p:last-child {
  margin-bottom: 0;
}

/* --- Email Gate --- */
.ts__gate {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.ts__gate-text {
  font-size: 15px;
  color: var(--color-text-muted-dark);
  margin-bottom: var(--space-md);
}

.ts__gate-form {
  display: flex;
  gap: var(--space-xs);
  max-width: 400px;
  margin: 0 auto;
}

.ts__input {
  flex: 1;
  font-family: var(--font-primary);
  font-size: 15px;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-sm);
  background: var(--color-bg-card);
  color: var(--color-text-dark);
  outline: none;
}

.ts__input:focus {
  border-color: var(--color-accent-orange);
}

.ts__gate-btn {
  white-space: nowrap;
}

.ts__gate-saved {
  font-size: 14px;
  color: var(--color-accent-orange);
  font-weight: 600;
  margin-top: var(--space-sm);
}

.ts__restart {
  display: block;
  margin: 0 auto;
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-muted-dark);
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 500;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.btn--ghost:hover {
  border-color: rgba(0, 0, 0, 0.3);
}

/* --- Mobile --- */
@media (max-width: 810px) {
  .ts__title {
    font-size: 28px;
  }

  .ts__stack {
    grid-template-columns: 1fr;
  }

  .ts__gate-form {
    flex-direction: column;
  }
}
