/* Latin text uses the brand's regular-width Source Han outlines. The existing
   Chinese display and body faces continue to handle Han characters elsewhere. */
@font-face {
  font-family: "LXJ Home Latin";
  src: url("fonts/home-latin-regular.woff2") format("woff2");
  font-weight: 100 549;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF;
}
@font-face {
  font-family: "LXJ Home Latin";
  src: url("fonts/home-latin-bold.woff2") format("woff2");
  font-weight: 550 849;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF;
}
@font-face {
  font-family: "LXJ Home Latin";
  src: url("fonts/home-latin-heavy.woff2") format("woff2");
  font-weight: 850 1000;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF;
}
@font-face {
  font-family: "LXJ Home Data";
  src: url("fonts/home-data.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0030-0039;
}
@font-face {
  font-family: "LXJ Book Head";
  src: url("fonts/book-title.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: "LXJ Book Type";
  src: local("SourceHanSerifCN-SemiBold"), local("SourceHanSerifSC-SemiBold"), url("fonts/book-quotes.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

body.home {
  --sans: "LXJ Home Latin", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --lxj-display: "LXJ Home Latin", "LXJ Han Display", "LXJ Han Common", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "LXJ Home Data", "LXJ Home Latin", "SFMono-Regular", Consolas, monospace;
  font-family: var(--sans);
}
.home .front .credential-title a {
  font-family: "LXJ Home Data", var(--lxj-display);
}
.home :is(.journal-card-meta time, .review-navigation span, .footer-base small) {
  font-family: "LXJ Home Data", var(--sans);
  font-variant-numeric: tabular-nums;
}

/* Use the bookshelf block's existing heading, description, links and cover.
   The writing, images, book selection and recommendations remain CMS fields. */
.home .front #book {
  padding-block: clamp(48px, 5vw, 76px);
  background: var(--brand-paper);
}
.home .front #book .book-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(0, .92fr);
  grid-template-rows: 1fr auto auto auto 1fr auto;
  grid-template-areas:
    "label art"
    "title art"
    "subtitle art"
    "description art"
    "actions art"
    "companion companion";
  gap: 0 clamp(32px, 5vw, 84px);
  background: transparent;
}
.home .front #book .volume-copy {
  display: contents;
}
.home .front #book .volume-copy .kicker {
  grid-area: label;
  align-self: end;
  margin: 0 0 16px;
  color: var(--brand-wine);
  font: 700 13px/1.5 var(--sans);
  letter-spacing: .1em;
}
.home .front #book .volume-copy h2 {
  grid-area: title;
  margin: 0;
  font: 900 clamp(32px, 4.35vw, 67px)/1.12 "LXJ Home Latin", "LXJ Book Head", "Source Han Sans SC", var(--lxj-display);
  letter-spacing: -.025em;
  text-autospace: ideograph-alpha;
  text-wrap: balance;
  color: var(--brand-ink);
}
.home .front #book .volume-initials {
  margin-inline-end: .15em;
  color: var(--brand-wine);
  letter-spacing: -.02em;
}
.home .front #book .volume-copy .volume-subtitle {
  grid-area: subtitle;
  margin: 16px 0 0;
  color: var(--brand-ink);
  font: 700 clamp(19px, 1.55vw, 24px)/1.45 var(--sans);
}
.home .front #book .volume-copy .volume-description {
  grid-area: description;
  max-width: 30em;
  margin: 14px 0 0;
  font: 400 clamp(16px, 1.18vw, 18px)/1.75 var(--sans);
  color: var(--brand-slate);
}
.home .front #book .book-action-row {
  grid-area: actions;
  align-self: start;
  gap: 12px 26px;
  margin: 24px 0 0;
}
.home .front #book .volume-art {
  grid-area: art;
  align-self: stretch;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  border-radius: 3px;
  background: var(--brand-rose);
}
.home .front #book .volume-art figure {
  display: grid;
  place-items: center;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  width: 100%;
  height: clamp(322px, 30.3vw, 450px);
  margin: 0;
}
.home .front #book .volume-art figure a {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.home .front #book .volume-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.home .front #book .volume-art figure a:focus-visible {
  outline-offset: -4px;
}

/* The second book is a single shelf below the feature. */
.home .front #book .book-companion {
  grid-area: companion;
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: none;
  margin: clamp(28px, 3.3vw, 46px) 0 0;
  padding: 19px 0;
  border-block: 1px solid #d7cdd0;
}
.home .front #book .companion-cover {
  flex: 0 0 51px;
}
.home .front #book .companion-cover img {
  display: block;
  width: 100%;
  height: auto;
}
.home .front #book .book-companion > div {
  display: grid;
  flex: 1;
  min-width: 0;
  grid-template-columns: minmax(175px, .72fr) minmax(0, 1.25fr) auto;
  grid-template-areas: "label intro link" "name intro link";
  column-gap: clamp(18px, 3.2vw, 48px);
  align-items: center;
}
.home .front #book .companion-label {
  grid-area: label;
  align-self: end;
  margin: 0 0 4px;
  color: var(--brand-wine);
  font: 700 12px/1.45 var(--sans);
  letter-spacing: .08em;
}
.home .front #book .book-companion h3 {
  grid-area: name;
  align-self: start;
  margin: 0;
  font: 700 clamp(19px, 1.5vw, 23px)/1.35 var(--sans);
  color: var(--brand-ink);
}
.home .front #book .companion-intro {
  grid-area: intro;
  max-width: 33em;
  margin: 0;
  color: var(--brand-slate);
  font: 400 15px/1.65 var(--sans);
}
.home .front #book .book-companion .book-text-action {
  grid-area: link;
  justify-self: start;
  min-height: 44px;
}

/* Typeset the two published forewords as quotations. */
.home .front #book .book-endorsements {
  margin-top: clamp(32px, 3.6vw, 52px);
}
.home .front #book .book-endorsements h2 {
  margin: 0 0 22px;
  font-size: clamp(24px, 2.1vw, 32px);
  letter-spacing: -.035em;
}
.home .front #book .endorsement-grid {
  gap: clamp(22px, 4vw, 64px);
}
.home .front #book .book-endorsement {
  padding: 0;
  border: 0;
  background: transparent;
}
.home .front #book .book-endorsement blockquote {
  max-width: 33em;
  margin: 0 0 20px;
  color: var(--brand-ink);
  font: 600 clamp(17px, 1.28vw, 20px)/1.8 "LXJ Book Type", "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "STSong", serif;
}
.home .front #book .book-credit .endorser-photo {
  flex-basis: 40px;
  width: 40px;
  height: 40px;
}

@media (max-width: 720px) {
  .home .front #book {
    padding: 40px max(20px, var(--gutter));
  }
  .home .front #book .book-feature {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "label" "title" "subtitle" "art" "description" "actions" "companion";
  }
  .home .front #book .volume-copy .kicker { margin-bottom: 10px; }
  .home .front #book .volume-copy h2 { font-size: clamp(29px, 8.8vw, 44px); }
  .home .front #book .volume-copy .volume-subtitle { margin-top: 10px; }
  .home .front #book .volume-art { margin-top: 18px; }
  .home .front #book .volume-art figure { height: clamp(228px, 68vw, 312px); }
  .home .front #book .volume-copy .volume-description { margin-top: 18px; }
  .home .front #book .book-action-row { margin-top: 18px; }
  .home .front #book .book-companion { align-items: start; gap: 16px; margin-top: 30px; }
  .home .front #book .companion-cover { flex-basis: 54px; }
  .home .front #book .book-companion > div {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "label" "name" "intro" "link";
  }
  .home .front #book .companion-intro { margin-top: 6px; }
  .home .front #book .book-companion .book-text-action { margin-top: 2px; }
  .home .front #book .endorsement-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .home .front #book .book-endorsements h2 { margin-bottom: 18px; }
  .home .front #book .book-endorsement + .book-endorsement { padding-top: 22px; border-top: 1px solid #d7cdd0; }
  .home .front #book .book-endorsement blockquote { margin-bottom: 14px; }
}

.home .front #book .book-feature:not(:has(.volume-art img)) {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto;
  grid-template-areas: "label" "title" "subtitle" "description" "actions" "companion";
}
.home .front #book .volume-art:not(:has(img)) { display: none; }
