/* Bounded homepage previews. Full poem/article pages retain their complete text. */
#homepage {
  --home-classic-height: 232px;
  --home-quote-height: 176px;
}

#homepage .new-works .poem-card,
#homepage #poem-columns .poem-card {
  display: grid;
  grid-template-rows: 64px 20px 90px 26px;
  gap: 8px;
  align-content: start;
  min-width: 0;
}
#homepage .poem-card > .result-title { min-width: 0; }
#homepage .poem-card h3 {
  font-size: 20px;
  line-height: 32px;
  height: 64px;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}
#homepage .poem-card > .byline {
  line-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#homepage .poem-card > p {
  height: 90px;
  margin: 0;
  line-height: 30px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  overflow-wrap: anywhere;
}
#homepage .poem-card > .tags { margin: 0; flex-wrap: nowrap; align-items: center; overflow: hidden; }
#homepage .poem-card > .tags a { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#homepage #poem-columns .poem-row { height: 62px; min-width: 0; }
#homepage #poem-columns .poem-row .poem-row-title {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  font: inherit;
  color: inherit;
  text-align: left;
  line-height: 22px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
#homepage #poem-columns .poem-row .poem-row-author {
  flex: 0 1 auto;
  max-width: 30%;
  line-height: 18px;
  max-height: 36px;
  overflow: hidden;
}

#homepage #reading-classics { flex: none; align-items: stretch; }
#homepage #reading-classics > a {
  display: grid;
  grid-template-rows: 18px 60px 52px 20px;
  align-content: space-between;
  gap: 8px;
  height: var(--home-classic-height);
  min-height: 0;
  padding: 18px 20px;
}
#homepage #reading-classics > a > span { line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#homepage #reading-classics h3 {
  height: 60px;
  font-size: 20px;
  line-height: 30px;
  margin: 0;
  -webkit-line-clamp: 2;
}
#homepage #reading-classics p { height: 52px; line-height: 26px; margin: 0; overflow-wrap: anywhere; }
#homepage #reading-classics small { line-height: 20px; margin: 0; }

#homepage .reading-quotes { align-items: stretch; }
#homepage .reading-quote {
  display: grid;
  grid-template-rows: 16px 56px 34px 18px;
  align-content: space-between;
  gap: 6px;
  height: var(--home-quote-height);
  padding: 16px 20px;
}
#homepage .reading-quote > span { line-height: 16px; }
#homepage .reading-quote blockquote,
#homepage .reading-quote p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  margin: 0;
}
#homepage .reading-quote blockquote { height: 56px; font-size: 20px; line-height: 28px; }
#homepage .reading-quote p { height: 34px; line-height: 17px; }
#homepage .reading-quote small { line-height: 18px; margin: 0; }

@media (min-width: 651px) {
  #homepage .home-classics-section { align-self: start; }
  #homepage #daily-reading { align-self: start; }
  #homepage #daily-reading .daily-carousel { height: var(--home-classic-height); display: flex; flex-direction: column; }
  #homepage #daily-reading .daily-slides { flex: 1; min-height: 0; }
  #homepage #daily-reading .daily-reading-card { padding: 14px 10px; }
  #homepage #daily-reading .daily-dots { flex: 0 0 29px; }
  #homepage .home-side-column > .small-note {
    height: var(--home-quote-height);
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px 18px;
  }
  #homepage .small-note > a { line-height: 18px; }
}
@media (max-width: 900px) {
  #homepage #reading-classics > a { padding-inline: 14px; }
  #homepage #reading-classics h3 { font-size: 18px; }
  #homepage .reading-quote { padding-inline: 16px; }
  #homepage .reading-quote blockquote { font-size: 18px; }
}
@media (max-width: 650px) {
  #homepage .poem-card h3 { font-size: 19px; }
  #homepage #reading-classics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #homepage .reading-quotes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #homepage .reading-quote { padding-inline: 14px; }
  #homepage .reading-quote blockquote { font-size: 17px; }
  #homepage .small-note { margin-top: 20px; }
}
@media (max-width: 359px) {
  #homepage #reading-classics, #homepage .reading-quotes { grid-template-columns: minmax(0, 1fr); }
}
