.mental-quotes .site::before {
  background:
    linear-gradient(118deg, rgba(106, 167, 159, 0.09), transparent 34%, transparent 66%, rgba(176, 107, 85, 0.1)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.44), transparent 24%, transparent 76%, rgba(0, 0, 0, 0.56)),
    repeating-linear-gradient(90deg, transparent 0 86px, rgba(228, 215, 191, 0.024) 87px, transparent 88px);
}

.quote-lab {
  padding: 78px 0 136px;
}

.quote-randomizer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1.42fr);
  gap: 30px;
  padding: 34px;
  border: 1px solid rgba(228, 215, 191, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 244, 213, 0.065), transparent 42%),
    linear-gradient(180deg, rgba(17, 13, 10, 0.94), rgba(11, 9, 7, 0.82));
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.quote-randomizer::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--rust-soft), #6aa79f, transparent);
}

.quote-randomizer__intro {
  min-height: 310px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
}

.quote-randomizer__intro h2,
.quote-section-head h2 {
  margin: 12px 0 0;
  color: #eadcc5;
  font-family: var(--font-cond);
  font-size: 3rem;
  font-weight: 400;
  line-height: 0.98;
  text-transform: uppercase;
}

.quote-randomizer__intro p {
  max-width: 280px;
  margin: 0;
  color: #8f826f;
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 700;
}

.quote-spotlight {
  --quote-accent: var(--rust-soft);
  position: relative;
  min-height: 310px;
  margin: 0;
  padding: 44px 46px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 1px solid color-mix(in srgb, var(--quote-accent) 60%, rgba(228, 215, 191, 0.2));
  border-radius: 6px;
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--quote-accent) 16%, transparent), transparent 36%),
    rgba(25, 19, 15, 0.82);
  box-shadow: inset 0 0 0 1px rgba(228, 215, 191, 0.07);
}

.quote-spotlight::before {
  content: "”";
  position: absolute;
  right: 26px;
  top: 4px;
  color: color-mix(in srgb, var(--quote-accent) 36%, transparent);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 8rem;
  line-height: 1;
  pointer-events: none;
}

.quote-spotlight blockquote {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0;
  color: #eadbc4;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.55rem;
  font-weight: 600;
  line-height: 1.12;
}

.quote-spotlight figcaption {
  position: relative;
  z-index: 1;
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #958774;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 700;
}

.quote-spotlight cite {
  color: #c9baa1;
  font-style: normal;
}

.quote-spotlight figcaption span::before {
  content: "/";
  margin-right: 14px;
  color: color-mix(in srgb, var(--quote-accent) 72%, #c9baa1);
}

.quote-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid rgba(228, 215, 191, 0.1);
}

.quote-draw-button {
  min-height: 48px;
  padding: 0 18px 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(228, 215, 191, 0.28);
  border-radius: 6px;
  color: #f0e1c8;
  background:
    linear-gradient(180deg, rgba(176, 107, 85, 0.28), rgba(92, 49, 41, 0.34)),
    rgba(11, 9, 7, 0.72);
  font: inherit;
  font-family: var(--font-cond);
  font-size: 0.92rem;
  font-weight: 500;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
}

.quote-draw-button:hover,
.quote-draw-button:focus-visible {
  border-color: rgba(228, 215, 191, 0.48);
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.quote-draw-button:focus-visible,
.source-card:focus-visible,
.quote-item:focus-visible {
  outline: 2px solid #6aa79f;
  outline-offset: 4px;
}

.quote-draw-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(228, 215, 191, 0.18);
  border-radius: 4px;
  color: #6aa79f;
  font-size: 1.05rem;
}

.quote-counter {
  color: #827665;
  font-family: var(--font-cond);
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 500;
}

.quote-sources,
.quote-collection {
  margin-top: 72px;
}

.quote-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  padding-top: 26px;
  border-top: 1px solid rgba(228, 215, 191, 0.12);
}

.source-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.source-card {
  --source-accent: var(--rust-soft);
  position: relative;
  min-height: 168px;
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid rgba(228, 215, 191, 0.13);
  border-radius: 6px;
  color: inherit;
  text-align: left;
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--source-accent) 14%, transparent), transparent 42%),
    rgba(18, 14, 11, 0.76);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  animation: sourceEnter 620ms cubic-bezier(.18, .86, .25, 1) both;
  animation-delay: var(--delay, 0ms);
  transition: transform 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

.source-card::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--source-accent);
}

.source-card:hover,
.source-card:focus-visible {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--source-accent) 55%, rgba(228, 215, 191, 0.18));
}

.source-card.is-active {
  border-color: color-mix(in srgb, var(--source-accent) 74%, rgba(228, 215, 191, 0.24));
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--source-accent) 22%, transparent), transparent 42%),
    rgba(26, 20, 15, 0.92);
}

.source-card__type,
.source-card__count {
  color: #8b7d69;
  font-family: var(--font-cond);
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 500;
}

.source-card__title {
  color: #ecdcc2;
  font-family: var(--font-cond);
  font-size: 1.65rem;
  font-weight: 400;
  line-height: 1;
}

.source-card__tone {
  min-height: 38px;
  color: #a89a85;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.08rem;
  line-height: 1.28;
}

.source-card__count {
  margin-top: auto;
  color: color-mix(in srgb, var(--source-accent) 72%, #cab99c);
}

.quote-ledger {
  position: relative;
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 26px;
}

.quote-ledger::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -6px;
  bottom: 10px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(228, 215, 191, 0.18), transparent);
}

.quote-item {
  --quote-accent: var(--rust-soft);
  position: relative;
  min-height: 220px;
  padding: 32px 34px 30px;
  border: 1px solid rgba(228, 215, 191, 0.1);
  border-left-color: color-mix(in srgb, var(--quote-accent) 62%, rgba(228, 215, 191, 0.16));
  border-radius: 6px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--quote-accent) 12%, transparent), transparent 40%),
    rgba(19, 15, 11, 0.68);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  animation: quoteCardIn 700ms cubic-bezier(.18, .86, .25, 1) both;
  animation-delay: var(--delay, 0ms);
  transition: transform 0.22s ease, filter 0.22s ease, border-color 0.22s ease;
}

.quote-item:hover,
.quote-item:focus-visible {
  transform: translateY(-5px);
  filter: brightness(1.06);
  border-color: color-mix(in srgb, var(--quote-accent) 54%, rgba(228, 215, 191, 0.18));
}

.quote-item.is-active {
  border-color: color-mix(in srgb, var(--quote-accent) 78%, rgba(228, 215, 191, 0.24));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--quote-accent) 16%, transparent),
    0 24px 60px rgba(0, 0, 0, 0.28);
}

.quote-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 30px;
  width: 38px;
  height: 1px;
  background: color-mix(in srgb, var(--quote-accent) 84%, rgba(228, 215, 191, 0.3));
}

.quote-item blockquote {
  margin: 0;
  color: #e1d0b8;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.18;
}

.quote-item cite {
  display: block;
  margin-top: 22px;
  color: #8f826f;
  font-family: var(--font-cond);
  font-style: normal;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 500;
}

.quote-large {
  grid-column: span 7;
}

.quote-small {
  grid-column: span 5;
  align-self: end;
}

.quote-offset {
  grid-column: 4 / span 7;
}

.quote-wide {
  grid-column: 2 / span 10;
}

.quote-red {
  grid-column: span 4;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--quote-accent) 18%, transparent), transparent 44%),
    rgba(65, 38, 36, 0.84);
}

.quote-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 34px;
  border: 1px solid rgba(228, 215, 191, 0.12);
  border-radius: 6px;
  color: #9f917b;
  background: rgba(17, 13, 10, 0.72);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
}

@keyframes quoteCardIn {
  from {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    filter: blur(5px);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@keyframes sourceEnter {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (max-width: 1080px) {
  .quote-randomizer {
    grid-template-columns: 1fr;
  }

  .quote-randomizer__intro {
    min-height: auto;
  }

  .quote-randomizer__intro p {
    max-width: none;
  }

  .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-ledger {
    grid-template-columns: repeat(6, 1fr);
  }

  .quote-large,
  .quote-small,
  .quote-offset,
  .quote-wide,
  .quote-red {
    grid-column: span 6;
  }
}

@media (max-width: 760px) {
  .quote-lab {
    padding: 58px 0 104px;
  }

  .quote-randomizer {
    gap: 22px;
    padding: 24px;
  }

  .quote-randomizer__intro h2,
  .quote-section-head h2 {
    font-size: 2.25rem;
  }

  .quote-spotlight {
    min-height: 300px;
    padding: 32px 24px 28px;
  }

  .quote-spotlight::before {
    right: 18px;
    font-size: 5rem;
  }

  .quote-spotlight blockquote {
    font-size: 1.72rem;
  }

  .quote-spotlight figcaption {
    flex-direction: column;
    gap: 6px;
  }

  .quote-spotlight figcaption span::before {
    content: "";
    margin-right: 0;
  }

  .quote-actions,
  .quote-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .quote-draw-button {
    width: 100%;
    justify-content: center;
  }

  .source-grid,
  .quote-ledger {
    grid-template-columns: 1fr;
  }

  .quote-ledger::before {
    display: none;
  }

  .quote-large,
  .quote-small,
  .quote-offset,
  .quote-wide,
  .quote-red {
    grid-column: auto;
  }

  .quote-item {
    min-height: 190px;
    padding: 28px 26px 26px;
  }

  .quote-item blockquote {
    font-size: 1.45rem;
  }
}
