/* The home page's "In their words" mosaic (lib/quotes.php). */
.qm { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.qm-card { margin: 0; display: grid; grid-template-rows: 1fr auto; gap: 24px; min-width: 0; padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); position: relative; }
/* The quote sits in the middle of its card, the name at the foot: a short line never leaves a hole under it. */
.qm-card blockquote { margin: 0; align-self: center; font-weight: 500; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.qm-card:not(.qm-feat) blockquote::before { content: "\201C"; color: var(--accent); font-weight: 800; }
.qm-card:not(.qm-feat) blockquote::after { content: "\201D"; color: var(--accent); font-weight: 800; }
.qm-card:not(.qm-feat) .q-s { font-size: 1.35rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; }
.qm-card:not(.qm-feat) .q-m { font-size: 1.05rem; }
.qm-card:not(.qm-feat) .q-l { font-size: .95rem; }
.qm-card figcaption { display: flex; align-items: center; gap: 12px; }
.qm-card figcaption a { display: block; font-weight: 700; color: var(--ink); text-decoration: none; }
.qm-card figcaption a:hover { color: var(--accent); }

.qm-feat { padding: clamp(26px, 4vw, 44px); background: var(--indigo-deep); border-color: transparent; }
.qm-feat blockquote { color: #fff; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; }
.qm-feat blockquote::before { content: "\201C"; display: block; font-size: 4.5rem; line-height: .6; margin-bottom: 18px; color: #c9c4ef; }
.qm-feat .q-s { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
.qm-feat .q-m { font-size: clamp(1.4rem, 2.5vw, 2rem); }
.qm-feat .q-l { font-size: clamp(1.15rem, 1.8vw, 1.45rem); line-height: 1.4; }
.qm-feat figcaption a, .qm-feat figcaption a:hover { color: #fff; }
.qm-feat .quote-role { color: #c9c4ef; }
.qm-feat .avatar { width: 52px; height: 52px; font-size: 16px; box-shadow: 0 0 0 2px var(--indigo-deep), 0 0 0 4px #c9c4ef; }
:root[data-theme="dark"] .qm-feat { background: #2a2366; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .qm-feat { background: #2a2366; } }

/* The grid's shape by count (3 columns). */
.qm-2 .qm-feat, .qm-5 .qm-feat { grid-column: span 2; }
.qm-3 .qm-feat, .qm-6 .qm-feat { grid-column: span 2; grid-row: span 2; }
.qm-4 .qm-feat { grid-column: span 3; }
.qm-4 .qm-feat blockquote { max-width: 38ch; }

@media (max-width: 860px) {
  .qm { grid-template-columns: 1fr; }
  .qm .qm-feat { grid-column: auto; grid-row: auto; }
}
