/* My Favourite Quotes */
.qts { display: grid; gap: 1.25rem; }
.qts figure { margin: 0; }
.qts [hidden] { display: none !important; }
.qts .row > div:not(:has(> :not([hidden]))) { display: none; }   /* featured card filtered out by search: drop its empty column */
.qts blockquote { margin: 0; }

/* featured quote with photo */
.q-hero { display: grid; grid-template-columns: 1fr minmax(0, 40%); align-items: stretch; border-radius: 1.1rem; overflow: hidden;
  background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; box-shadow: var(--shadow); }
.q-hero-text { position: relative; padding: 2rem 2rem 1.75rem; display: flex; flex-direction: column; justify-content: center; }
.q-mark { font-size: 3.2rem; line-height: 1; color: #ffd27a; margin-bottom: .25rem; }
.q-hero blockquote { font-family: "Poppins", sans-serif; font-weight: 600; font-size: clamp(1.15rem, 2.1vw, 1.5rem); line-height: 1.45; }
.q-hero figcaption { margin-top: 1rem; color: #ffd27a; font-weight: 600; }
.q-hero figcaption::before, .q-feature figcaption::before { content: "— "; }
.q-hero-img { display: grid; place-items: center; padding: 1.25rem; background: rgba(255, 255, 255, .06); }
.q-hero-img img { width: 100%; max-width: 360px; height: auto; border-radius: .8rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }

/* two feature cards */
.q-feature { height: 100%; padding: 1.4rem 1.5rem; border-radius: 1rem; background: #fff; border: 1px solid var(--line); position: relative; }
.q-feature > i { position: absolute; top: 1.2rem; right: 1.3rem; font-size: 1.6rem; color: #e11d48; opacity: .9; }
.q-feature blockquote { font-size: 1.08rem; line-height: 1.6; color: var(--ink); padding-right: 2rem; }
.q-feature figcaption { margin-top: .8rem; font-weight: 700; color: var(--navy); }
.q-proverb { background: linear-gradient(180deg, #f0fdf4, #fff); border-color: #bbf7d0; }
.q-proverb > i { color: #16a34a; }
.q-label { font-weight: 700; color: var(--navy); margin: 0 2rem .8rem 0; line-height: 1.4; }
.q-proverb ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.q-proverb li { display: flex; align-items: baseline; gap: .6rem; line-height: 1.5; color: var(--ink); }
.q-proverb li span { flex-shrink: 0; min-width: 4.6rem; text-align: center; font-size: .78rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px;
  background: #dcfce7; color: #15803d; }
.q-proverb li:last-child { font-weight: 600; }
.q-proverb li:last-child span { background: #16a34a; color: #fff; }

/* toolbar + chips */
.q-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .5rem; }
.q-h2 { display: flex; align-items: center; gap: .5rem; font-family: "Poppins", sans-serif; font-weight: 700; color: var(--navy); font-size: 1.2rem; margin: 0; }
.q-count { background: var(--sky); color: var(--blue); font-family: "Inter", sans-serif; font-size: .8rem; font-weight: 700; padding: .1rem .55rem; border-radius: 999px; }
.q-search { position: relative; flex: 0 1 18rem; margin: 0; }
.q-search i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.q-search input { width: 100%; padding: .55rem 1rem .55rem 2.4rem; border: 1px solid var(--line); border-radius: 999px; font-size: .95rem; background: #fff; }
.q-search input:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .15); }
.q-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: -.25rem; }
.q-chip { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); background: #fff; color: var(--navy); font-weight: 600; font-size: .86rem;
  padding: .3rem .8rem; border-radius: 999px; transition: background .2s, color .2s, border-color .2s; }
.q-chip span { font-size: .74rem; background: var(--sky); color: var(--blue); padding: 0 .4rem; border-radius: 999px; }
.q-chip:hover { border-color: var(--blue); }
.q-chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.q-chip.active span { background: rgba(255, 255, 255, .2); color: #fff; }

/* quote wall (masonry columns) */
.q-wall { columns: 2 17rem; column-gap: 1rem; }
.q-card { break-inside: avoid; margin: 0 0 1rem !important; padding: 1.1rem 1.2rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 1rem;
  position: relative; transition: border-color .2s, box-shadow .2s, transform .2s; }
.q-card[hidden] { display: none; }
.q-card::before { content: "\201C"; position: absolute; top: -.1rem; right: .9rem; font-family: Georgia, serif; font-size: 3.4rem; line-height: 1; color: var(--sky); }
.q-card:hover { border-color: #b9c8ea; box-shadow: var(--shadow); transform: translateY(-2px); }
.q-card blockquote { position: relative; font-size: 1rem; line-height: 1.6; color: var(--ink); }
.q-card figcaption { display: flex; align-items: center; gap: .55rem; margin-top: .8rem; font-weight: 600; font-size: .9rem; color: var(--navy); }
.q-avatar { width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .72rem; font-weight: 700; flex-shrink: 0; }
.q-empty { text-align: center; color: var(--muted); padding: 2rem 0; margin: 0; }

@media (max-width: 767.98px) {
  .q-hero { grid-template-columns: 1fr; }
  .q-hero-img { padding: 0 1.25rem 1.25rem; background: none; }
  .q-hero-text { padding: 1.4rem 1.3rem; }
  .q-search { flex: 1 1 100%; }
}
