body.aij-theme-active.aij-article-pages,
body.aij-article-pages #aij-home {
  background: #f2e7d8;
}

#aij-home .aij-interior {
  background: linear-gradient(124deg, #efe1cd, #f2e7d8 55%, #ead9c0);
  color: #33251b;
  font: 400 17px/1.7 var(--sans);
}

#aij-home .aij-interior > .aij-editorial {
  background: transparent;
}

#aij-home .aij-page > .aij-editorial { display: flow-root; }

#aij-home .aij-interior-heading {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-height: 230px;
  overflow: hidden;
  padding: clamp(28px, 6cqw, 76px) max(5.7%, calc((100% - 1120px) / 2));
  border-bottom: 2px solid #b17b37;
  background: #2a1d14;
  color: var(--light);
}

#aij-home .aij-article-heading {
  align-items: center;
  gap: clamp(20px, 4cqw, 48px);
}

body.aij-article-pages #aij-home .aij-interior-heading,
#aij-home .aij-page-heading {
  background: #fcf3e5;
  color: inherit;
}

#aij-home .aij-interior-heading.aij-page-heading {
  min-height: 0;
  width: 88.6%;
  max-width: 1150px;
  margin: clamp(18px, 4cqw, 48px) auto 0;
  padding: clamp(23px, 4.6cqw, 58px) clamp(18px, 5cqw, 70px);
}

@media (min-width: 681px) {
  #aij-home .aij-article-heading:has(.aij-interior-image) {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }
}

#aij-home .aij-interior-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center 45%;
}

#aij-home .aij-interior-heading h1 {
  max-width: 24ch;
  margin: 0;
  font-size: clamp(31px, 4.8cqw, 61px) !important;
  line-height: 1.08;
}

#aij-home .aij-interior-heading .aij-kicker {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--gold);
}

#aij-home .aij-interior-heading time,
#aij-home .aij-archive-description {
  display: block;
  max-width: 66ch;
  margin-top: 14px;
  color: #efdfc8;
  font-size: 15px;
}

#aij-home .aij-article-heading h1 {
  color: inherit;
  text-align: start;
  overflow-wrap: anywhere;
}

#aij-home .aij-page-heading h1 {
  max-width: 32ch;
  text-align: start !important;
  overflow-wrap: anywhere;
}

body.aij-article-pages #aij-home .aij-interior-heading :is(.aij-kicker, time, .aij-archive-description) {
  color: #795015;
}

#aij-home .aij-article-heading .aij-kicker:hover { text-decoration: underline; }

#aij-home .aij-editorial-shell,
#aij-home .aij-listing-shell {
  margin-inline: auto;
  padding: clamp(28px, 4.4cqw, 60px) 5.7%;
}

#aij-home .aij-editorial-shell { max-width: 1150px; }
#aij-home .aij-listing-shell { max-width: 1150px; }

#aij-home .aij-prose {
  padding: clamp(21px, 4.4cqw, 58px);
  border-left: 1px solid #b17b37;
  background: #fcf3e5;
  overflow-wrap: break-word;
}

#aij-home .aij-prose :where(p, ul, ol, blockquote, figure, table, pre) {
  margin-block: 0 1.1em;
}

#aij-home .aij-prose :where(h1, h2, h3, h4) {
  margin: 1.05em 0 .45em;
  text-align: start;
  text-wrap: pretty;
}

#aij-home .aij-prose > :first-child { margin-top: 0; }

#aij-home .aij-prose h1 { font-size: clamp(32px, 5cqw, 54px) !important; }
#aij-home .aij-prose h2 { font-size: clamp(26px, 3.85cqw, 41px) !important; }
#aij-home .aij-prose h3 { font-size: clamp(21px, 2.8cqw, 29px) !important; }

#aij-home .aij-page .aij-prose h1 {
  padding: clamp(14px, 3cqw, 32px);
  border-bottom: 2px solid #b17b37;
  background: #f2e7d8;
}

#aij-home .aij-prose :where(img, video, iframe) { max-width: 100%; }
#aij-home .aij-prose :where(img, video) { height: auto; }

#aij-home .aij-prose a:not(.aij-button, .wp-block-button__link, .wp-element-button),
#aij-home .aij-listing-shell .page-numbers:not(.current) {
  color: #795015;
  text-decoration: underline;
  text-underline-offset: .16em;
}

#aij-home .aij-references .references-table { width: 100%; }
#aij-home .aij-references .references-table :is(th, td, a) {
  white-space: normal;
  overflow-wrap: anywhere;
}

#aij-home .aij-story-return {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #dcc8a8;
}

#aij-home .aij-listing-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

#aij-home .aij-listing-card {
  display: flex;
  min-width: 0;
  border-left: 1px solid #b17b37;
  background: #fcf3e5;
}

#aij-home .aij-listing-thumbnail {
  position: relative;
  display: block;
  flex: 0 0 clamp(128px, 24vw, 236px);
  min-height: 132px;
  overflow: hidden;
}

#aij-home .aij-listing-thumbnail img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#aij-home .aij-listing-text { flex: 1; align-self: center; min-width: 0; padding: 16px clamp(13px, 2.4vw, 28px); }
#aij-home .aij-listing-text time { color: #795015; font-size: 14px; }
#aij-home .aij-listing-text h2 { margin: .3em 0; font-size: clamp(19px, 2.3vw, 26px) !important; line-height: 1.2; overflow-wrap: anywhere; }
#aij-home .aij-listing-text h2 a:hover { text-decoration: underline; }
#aij-home .aij-listing-excerpt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 16px;
  line-height: 1.45;
}

#aij-home .aij-listing-shell .pagination { margin: 28px 0 0; }
#aij-home .aij-listing-shell .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
#aij-home .aij-listing-shell .page-numbers { padding: 4px 9px; }
#aij-home .aij-listing-shell .page-numbers.current { background: var(--gold); color: #201a14; }

@media (min-width: 681px) and (max-width: 1100px), (min-width: 681px) and (pointer: coarse) {
  #aij-home :is(.aij-interior-heading, .aij-prose) h1 { font-size: clamp(34px, 4.2vw, 46px) !important; }
}

@media (max-width: 680px) {
  #aij-home .aij-interior { font-size: 16px; }
  #aij-home .aij-interior-heading { min-height: 155px; padding-block: 26px; }
  #aij-home :is(.aij-interior-heading, .aij-prose) h1 { font-size: clamp(28px, 7.5vw, 34px) !important; line-height: 1.12; }
  #aij-home .aij-prose h2 { font-size: clamp(23px, 5.7vw, 28px) !important; }
  #aij-home .aij-prose h3 { font-size: clamp(19px, 4.8vw, 23px) !important; }
  #aij-home .aij-references .aij-editorial-shell { padding-inline: 12px; }
  #aij-home .aij-references .aij-prose { padding-inline: 12px; }
  #aij-home .aij-references .references-table {
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.4;
  }
  #aij-home .aij-references .references-table :is(th, td) {
    padding: 8px 5px;
    text-align: start;
    vertical-align: top;
  }
  #aij-home .aij-references .references-table th:first-child { width: 40%; }
  #aij-home .aij-references .references-table th:nth-child(2) { width: 29%; }
  #aij-home .aij-references .references-table td:nth-child(3) { display: table-cell; }
  #aij-home .aij-listing-list { gap: 12px; }
  #aij-home .aij-listing-thumbnail { flex-basis: clamp(76px, 23vw, 145px); min-height: 94px; }
  #aij-home .aij-listing-text h2 { font-size: clamp(18px, 4.6vw, 22px) !important; }
}

@media (max-width: 420px) {
  #aij-home .aij-listing-excerpt { display: none; }
}
