/* Quiet ink edges and structural character perches. No effect on card sizing. */
.picturebooks-site :is(.pb-story-panel, .node--type-book.node--view-mode-card, .editorial-collections__card, .editorial-collection__pick, .featured-collections__item) {
  position: relative;
  isolation: isolate;
  border-color: transparent !important;
  border-radius: 0;
  box-shadow: none;
}
.picturebooks-site :is(.pb-story-panel, .node--type-book.node--view-mode-card, .editorial-collections__card, .editorial-collection__pick, .featured-collections__item)::before {
  content: "";
  position: absolute;
  display: block;
  inset: -4px;
  z-index: 1;
  margin: 0;
  border: 8px solid transparent;
  border-image-source: url("../images/structural/ink-frame.svg");
  border-image-slice: 8;
  border-image-width: 8px;
  border-image-repeat: stretch;
  background: transparent;
  pointer-events: none;
}
/* Add these modifiers to section panels, rather than individual grid cards. */
.picturebooks-site .pb-story-panel--with-top-perch {
  margin-block-start: 96px;
}
.picturebooks-site .pb-story-panel--with-side-perch {
  padding-inline-end: max(var(--pb-panel-padding, 24px), 108px);
}
.picturebooks-site .pb-perch-top,
.picturebooks-site .pb-perch-side {
  position: absolute;
  display: block;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: 0;
  line-height: 0;
  pointer-events: none;
  user-select: none;
}
/* The sheep's feet sit above the panel edge; its approved frame is unaltered. */
.picturebooks-site .pb-perch-top {
  inset-inline-start: 28px;
  inset-block-end: calc(100% - 24px);
  width: 188px;
  max-width: calc(100% - 56px);
}
.picturebooks-site .pb-perch-top::after {
  content: "";
  position: absolute;
  inset-inline: -16px;
  inset-block-end: 23px;
  height: 20px;
  background: url("../images/structural/grass-strip.svg") repeat-x left bottom / 96px 20px;
  pointer-events: none;
}
.picturebooks-site .pb-perch-side {
  inset-inline-end: -20px;
  inset-block-start: 32px;
  width: 88px;
  max-width: 25%;
}
.picturebooks-site .pb-perch-top img,
.picturebooks-site .pb-perch-top canvas,
.picturebooks-site .pb-perch-side img,
.picturebooks-site .pb-perch-side canvas {
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
  border: 0;
  mix-blend-mode: multiply;
}
/* A side perch stays inside the narrower page gutter on tablets. */
@media (max-width: 1000px) {
  .picturebooks-site .pb-perch-side {
    inset-inline-end: 0;
    width: 76px;
  }
  .picturebooks-site .pb-story-panel--with-side-perch {
    padding-inline-end: max(var(--pb-panel-padding, 24px), 92px);
  }
}
@media (max-width: 640px) {
  .picturebooks-site .pb-story-panel--with-top-perch {
    margin-block-start: 76px;
  }
  .picturebooks-site .pb-perch-top {
    inset-inline-start: 18px;
    inset-block-end: calc(100% - 18px);
    width: 144px;
    max-width: calc(100% - 36px);
  }
  .picturebooks-site .pb-perch-top::after {
    inset-inline: -10px;
    inset-block-end: 17px;
  }
  .picturebooks-site .pb-perch-side {
    display: none;
  }
  .picturebooks-site .pb-story-panel--with-side-perch {
    padding-inline-end: var(--pb-panel-padding, 24px);
  }
}
@media (forced-colors: active) {
  .picturebooks-site :is(.pb-story-panel, .node--type-book.node--view-mode-card, .editorial-collections__card, .editorial-collection__pick, .featured-collections__item) {
    border: 1px solid CanvasText !important;
  }
  .picturebooks-site :is(.pb-story-panel, .node--type-book.node--view-mode-card, .editorial-collections__card, .editorial-collection__pick, .featured-collections__item)::before {
    display: none;
  }
}
/* Descriptions use unmistakable editorial links throughout the catalog. */
.picturebooks-site .field--name-body a,
.picturebooks-site .field--name-body a:visited {
  color: #20598b;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.picturebooks-site .field--name-body a:hover { color: #173f63; text-decoration-thickness: 2px; }
.picturebooks-site .pb-book-purchase { margin: 28px 0; }
.picturebooks-site .pb-buy-book {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px; border: 1px solid #893b2a;
  border-radius: 0; background: #893b2a; color: #fff8e9;
  font-family: 'Dosis', sans-serif; font-size: 19px; font-weight: 600;
  line-height: 1.35; text-decoration: none;
}
.picturebooks-site .pb-buy-book:hover { background: #682b1f; }
.picturebooks-site .home-discovery__form.pb-story-panel { padding: 28px; background: #edf1e7; }
.picturebooks-site .pb-woodpecker-panel { width: calc(100% - 96px); margin-inline-end: 96px; }
.picturebooks-site .pb-woodpecker-panel > .pb-perch-side { inset-inline-end: -84px; inset-block-start: 26px; width: 88px; max-width: none; }
.picturebooks-site .pb-footer-navigation { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; padding-block: 24px 32px; border-bottom: 1px solid #b7b9aa; }
.picturebooks-site .pb-footer-navigation__group { min-width: 0; }
.picturebooks-site .pb-footer-navigation__title { margin: 0 0 18px; font-family: 'Literata', Georgia, serif; font-size: 19px; font-weight: 400; line-height: 1.4; color: #29291f; }
.picturebooks-site .pb-footer-navigation__list { margin: 0; padding: 0; list-style: none; }
.picturebooks-site .pb-footer-navigation__list li { margin: 0 0 10px; padding: 0; }
.picturebooks-site .pb-footer-navigation__list a { color: #343d32; font-family: 'Dosis', sans-serif; font-size: 17px; line-height: 1.5; text-decoration: underline; text-decoration-color: #9aab94; text-underline-offset: 3px; }
.picturebooks-site .pb-footer-navigation__list a:hover { color: #20598b; text-decoration-color: currentColor; }
@media (max-width: 960px) { .picturebooks-site .pb-footer-navigation { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
 .picturebooks-site .pb-woodpecker-panel { width: 100%; margin-inline-end: 0; }
 .picturebooks-site .home-discovery__form.pb-story-panel { padding: 22px; }
 .picturebooks-site .pb-footer-navigation { gap: 26px 20px; }
}
@media (max-width: 380px) { .picturebooks-site .pb-footer-navigation { grid-template-columns: minmax(0,1fr); } }
.picturebooks-site .pb-home-guides-panel { padding: 28px; background: #fffdf7; }

.picturebooks-site .site-footer { background: #e1e5da; color: #233b33; border-top: 1px solid #bfc7b7; }
.picturebooks-site .site-footer a { color: #233b33; }
