/* Snug reply card: what a post replies to (an article, a post from another site, a picture, video or
   sound). Theme::head() links this file on pages that show one, whatever the theme.
   It stands out by tone, not by an outline: a flat tinted surface made from the text colour, so it follows
   light and dark and any theme. Variables it uses when the theme has them: --ink, --ink-2, --accent.
   To set it by hand, give .quote its own --q-ink, --q-ink2, --q-fill (the card) and --q-fill2 (insets). */
.quote{
  --q-ink:var(--ink,currentColor);
  --q-ink2:var(--ink-2,color-mix(in srgb,currentColor 62%,transparent));
  --q-fill:color-mix(in srgb,var(--q-ink) 5%,transparent);
  --q-fill2:color-mix(in srgb,var(--q-ink) 9%,transparent);
  max-width:560px;margin:0 0 1em;padding:0;border:0;font-style:normal;text-align:left;
}
.quote *,.quote *::after{box-sizing:border-box}
.quote-label{display:flex;align-items:center;gap:6px;margin:0 0 7px;font-size:.78rem;font-weight:600;letter-spacing:.02em;color:var(--q-ink2)}
.quote-card{display:flex;flex-direction:column;overflow:hidden;border-radius:18px;background:var(--q-fill);color:var(--q-ink)}
.quote-body{display:grid;gap:8px;min-width:0;padding:14px 16px 16px}

/* who */
.quote-head{display:flex;align-items:center;gap:10px;min-width:0}
.quote-avatar{flex:none;width:36px;height:36px;border-radius:50%;object-fit:cover;background:var(--q-fill2)}
.quote-avatar.is-blank{display:grid;place-items:center;font-size:.9rem;font-weight:700;color:var(--q-ink2)}
.quote-who{flex:1;min-width:0;display:grid;line-height:1.25}
.quote-name{overflow:hidden;font-size:.95rem;font-weight:650;color:var(--q-ink);text-decoration:none;text-overflow:ellipsis;white-space:nowrap}
.quote-name:hover{text-decoration:underline;text-underline-offset:.18em}
.quote-sub{overflow:hidden;font-size:.8rem;color:var(--q-ink2);text-overflow:ellipsis;white-space:nowrap}
.quote-open{flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;color:var(--q-ink2);transition:background-color .15s,color .15s}
.quote-open:hover{background:var(--q-fill2);color:var(--q-ink)}

/* what */
.quote-title{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:3;font-size:1.06rem;font-weight:680;line-height:1.3;letter-spacing:-.005em;color:var(--q-ink);text-decoration:none}
.quote-title:hover{text-decoration:underline;text-underline-offset:.18em}
.quote-text{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:6;margin:0;font-size:.95rem;line-height:1.5;color:color-mix(in srgb,var(--q-ink) 86%,transparent);overflow-wrap:anywhere}

/* up to four pictures or videos */
.quote-media{display:grid;gap:3px;overflow:hidden;margin:0 16px 16px;border-radius:12px}
.quote-pic{position:relative;display:block;overflow:hidden;min-height:0;background:var(--q-fill2)}
.quote-pic img,.quote-pic video{display:block;width:100%;height:100%;object-fit:cover}
.quote-media.n-1 .quote-pic{aspect-ratio:var(--ar,16/9);max-height:380px}
.quote-media.n-2{grid-template-columns:1fr 1fr}
.quote-media.n-2 .quote-pic{aspect-ratio:1}
.quote-media.n-3{grid-template-columns:2fr 1fr;grid-template-rows:1fr 1fr;aspect-ratio:16/9}
.quote-media.n-3 .quote-pic:first-child{grid-row:1/3}
.quote-media.n-4{grid-template-columns:1fr 1fr}
.quote-media.n-4 .quote-pic{aspect-ratio:16/10}
.quote-pic.is-video{aspect-ratio:16/9;background:#000}
.quote-pic.is-video video{object-fit:contain}
.quote-pic.has-play::after{content:"";position:absolute;inset:0;width:56px;height:56px;margin:auto;border-radius:50%;
  background:rgba(0,0,0,.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5.14v13.72a1 1 0 0 0 1.51.86l11.43-6.86a1 1 0 0 0 0-1.72L9.51 4.28A1 1 0 0 0 8 5.14z'/%3E%3C/svg%3E") 54% 50%/24px no-repeat}
/* one picture on an article is its cover, edge to edge above the text */
.quote-card.has-cover .quote-media{margin:0;border-radius:0}
.quote-card.has-cover .quote-pic{aspect-ratio:1.91;max-height:none}
.quote-sound{display:grid;gap:8px;margin:0 16px 16px}
.quote-sound audio{width:100%}

/* in lists of posts: shorter, and an article's cover sits beside the text */
.quote.is-compact{max-width:480px}
.quote.is-compact .quote-title{-webkit-line-clamp:2;font-size:1rem}
.quote.is-compact .quote-text{-webkit-line-clamp:3}
.quote.is-compact .quote-media.n-1 .quote-pic{max-height:220px}
.quote.is-compact .quote-card.has-cover{flex-direction:row-reverse}
.quote.is-compact .quote-card.has-cover .quote-body{flex:1}
.quote.is-compact .quote-card.has-cover .quote-media{flex:none;width:32%;max-width:150px}
.quote.is-compact .quote-card.has-cover .quote-pic{aspect-ratio:auto;height:100%}
@media (max-width:520px){
  .quote-body{padding:12px 14px 14px}
  .quote-media,.quote-sound{margin:0 14px 14px}
  .quote.is-compact .quote-card.has-cover .quote-media{width:30%}
}
/* a phone held sideways has little height: the cover sits beside the text, as in lists */
@media (orientation:landscape) and (max-height:520px){
  .quote .quote-title{-webkit-line-clamp:2}
  .quote .quote-text{-webkit-line-clamp:3}
  .quote .quote-media.n-1 .quote-pic{max-height:56vh}
  .quote .quote-card.has-cover{flex-direction:row-reverse}
  .quote .quote-card.has-cover .quote-body{flex:1}
  .quote .quote-card.has-cover .quote-media{flex:none;width:32%;max-width:190px}
  .quote .quote-card.has-cover .quote-pic{aspect-ratio:auto;height:100%}
}
