.mental-affirmations .site::before {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(200, 162, 94, 0.13), transparent 34%),
    radial-gradient(circle at 22% 72%, rgba(111, 131, 112, 0.16), transparent 26%),
    radial-gradient(circle at 78% 68%, rgba(143, 78, 63, 0.13), transparent 24%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.54), transparent 24%, transparent 76%, rgba(0, 0, 0, 0.62));
}

.mental-affirmations .shell {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
  padding: 0;
}

.mental-affirmations .subhero {
  max-width: 900px;
  margin: 0;
  text-align: left;
}

.mental-affirmations .subhero::after {
  left: 0;
  transform: none;
}

.mental-affirmations .subhero p {
  margin-left: 0;
  margin-right: 0;
}

.mental-affirmations .section-nav {
  justify-content: flex-start;
}

.affirmation-tools {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 0 0;
}

.affirmation-search {
  display: grid;
  width: min(100%, 420px);
  gap: 8px;
  color: var(--dim);
  font-family: var(--font-cond);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
}

.affirmation-search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(234, 220, 197, 0.16);
  border-radius: 6px;
  background:
    linear-gradient(145deg, rgba(255, 244, 213, 0.045), transparent 46%),
    rgba(12, 10, 8, 0.74);
  color: var(--cream);
  outline: none;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.affirmation-search input:focus {
  border-color: rgba(106, 167, 159, 0.58);
  box-shadow: 0 0 0 3px rgba(106, 167, 159, 0.08);
}

.affirmation-search input::placeholder {
  color: rgba(170, 156, 135, 0.72);
}

.affirmation-tool-meta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--dim);
  font-family: var(--font-cond);
  font-size: 0.74rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.affirmation-room {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 20px;
  max-width: none;
  margin: 0;
  padding: 42px 0 132px;
}

.affirmation-room::before {
  content: "";
  position: absolute;
  inset: 24px -2% 76px;
  z-index: -1;
  pointer-events: none;
  border-top: 1px solid rgba(234, 220, 197, 0.09);
  border-bottom: 1px solid rgba(234, 220, 197, 0.07);
  background:
    radial-gradient(ellipse at 50% 8%, rgba(234, 220, 197, 0.1), transparent 34%),
    linear-gradient(90deg, transparent, rgba(106, 167, 159, 0.045) 50%, transparent);
}

.affirmation-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: flex-start;
  min-height: 286px;
  height: 100%;
  padding: 30px;
  gap: 18px;
  border: 1px solid rgba(234, 220, 197, 0.13);
  border-radius: 6px;
  background:
    radial-gradient(circle at 18% 0%, rgba(200, 162, 94, 0.12), transparent 36%),
    linear-gradient(145deg, rgba(255, 244, 213, 0.04), transparent 42%),
    #15110e;
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.3);
  text-align: left;
  outline: 0;
  transition: opacity 0.24s ease, transform 0.24s ease, border-color 0.24s ease, filter 0.24s ease;
}

.affirmation-card:not(.is-active) {
  opacity: 0.72;
}

.affirmation-card:hover,
.affirmation-card:focus-visible,
.affirmation-card.is-active {
  opacity: 1;
  transform: translateY(-4px);
  filter: brightness(1.04);
  border-color: rgba(200, 162, 94, 0.38);
}

.affirmation-card:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: -12px;
}

.affirmation-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rust-soft);
  box-shadow:
    0 0 18px rgba(182, 111, 89, 0.72),
    0 0 42px rgba(106, 167, 159, 0.18);
}

.affirmation-line {
  max-width: none;
  margin: 0;
  color: #eadcc5;
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.5vw, 2.12rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.2;
  text-shadow: 0 16px 38px rgba(0, 0, 0, 0.52);
}

.affirmation-note {
  max-width: 36ch;
  margin: 0;
  color: var(--dim);
  font-size: 0.98rem;
  line-height: 1.7;
}

.affirmation-card:nth-child(even) .affirmation-line {
  color: #eadcc5;
}

.affirmation-card:nth-child(3n) .affirmation-dot {
  background: var(--rust-soft);
  box-shadow:
    0 0 18px rgba(182, 111, 89, 0.72),
    0 0 42px rgba(106, 167, 159, 0.18);
}

.affirmation-empty {
  grid-column: 1 / -1;
  display: none;
  margin: 0;
  padding: 34px;
  border: 1px solid rgba(234, 220, 197, 0.13);
  border-radius: 6px;
  color: var(--dim);
  font-family: var(--font-serif);
  font-size: 1.2rem;
  text-align: center;
}

.affirmation-empty.is-visible {
  display: block;
}

@media (max-width: 760px) {
  .mental-affirmations .shell {
    width: min(calc(100% - 28px), var(--max));
  }

  .affirmation-room {
    grid-template-columns: 1fr;
    padding: 54px 0 104px;
  }

  .affirmation-room::before {
    inset: 30px 0 64px;
  }

  .affirmation-card {
    min-height: 236px;
    padding: 26px;
  }

  .affirmation-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .affirmation-tool-meta {
    justify-content: space-between;
    width: 100%;
  }
}
