/* P16: compact portal headings on EN/ES/FR/JA only.
 * Deliberately separate from active Codex typography work in locale-ui.css. */
:is(.syj-page-hero:has(#poet-portal-title),
    .syj-page-hero:has(#poetry-hub-title),
    .syj-page-hero:has(#home-hero-title)) .syj-hero__title {
 max-width: 100%;
 font-size: clamp(36px, 4.6vw, 66px);
 line-height: 1.14;
 letter-spacing: .045em;
 text-wrap: balance;
}
:is(.syj-page-hero:has(#poet-portal-title),
    .syj-page-hero:has(#poetry-hub-title),
    .syj-page-hero:has(#home-hero-title)) .syj-hero__tagline {
 letter-spacing: .07em;
 text-wrap: balance;
}
:is(.syj-page-hero:has(#poet-portal-title),
    .syj-page-hero:has(#poetry-hub-title),
    .syj-page-hero:has(#home-hero-title)) .syj-hero__subtext {
 letter-spacing: .04em;
 line-height: 1.55;
 max-width: 680px;
 margin-inline: auto;
 text-wrap: balance;
}
.syj-hub, .syj-poet-channel .syj-poet-portal, .cc-home-portal, .cc-theme-hub, .syj-comments-heading {
 --section-title-size: clamp(26px, 3vw, 38px);
}
:is(.syj-hub, .syj-poet-channel .syj-poet-portal, .cc-home-portal, .cc-theme-hub, .syj-comments-heading) :is(h1,h2).syj-section-title:not(#poet-daily-title):not(#poet-scene-title) {
 letter-spacing: .035em;
 text-wrap: balance;
 gap: 24px;
}
@media (max-width: 700px) {
 .syj-hub, .syj-poet-channel .syj-poet-portal, .cc-home-portal, .cc-theme-hub, .syj-comments-heading {
  --section-title-size: clamp(22px, 5.6vw, 29px);
 }
 :is(.syj-hub, .syj-poet-channel .syj-poet-portal, .cc-home-portal, .cc-theme-hub, .syj-comments-heading) :is(h1,h2).syj-section-title:not(#poet-daily-title):not(#poet-scene-title) {
  font-size: clamp(22px, 5.6vw, 29px);
  letter-spacing: .015em;
  line-height: 1.33;
  gap: 7px;
 }
 :is(.syj-hub, .syj-poet-channel .syj-poet-portal, .cc-home-portal, .cc-theme-hub, .syj-comments-heading) :is(h1,h2).syj-section-title:not(#poet-daily-title):not(#poet-scene-title)::before,
 :is(.syj-hub, .syj-poet-channel .syj-poet-portal, .cc-home-portal, .cc-theme-hub, .syj-comments-heading) :is(h1,h2).syj-section-title:not(#poet-daily-title):not(#poet-scene-title)::after {
  flex: 0 0 18px;
  width: 18px;
  height: 25px;
 }
 :is(.syj-page-hero:has(#poet-portal-title),
     .syj-page-hero:has(#poetry-hub-title),
     .syj-page-hero:has(#home-hero-title)) .syj-hero__content {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding-inline: 18px;
 }
 :is(.syj-page-hero:has(#poet-portal-title),
     .syj-page-hero:has(#poetry-hub-title),
     .syj-page-hero:has(#home-hero-title)) .syj-hero__copy-block {
  min-width: 0;
  max-width: 100%;
 }
 :is(.syj-page-hero:has(#poet-portal-title),
     .syj-page-hero:has(#poetry-hub-title),
     .syj-page-hero:has(#home-hero-title)) .syj-hero__title {
  font-size: clamp(28px, 7.5vw, 39px);
  letter-spacing: .018em;
  line-height: 1.18;
  max-width: 100%;
  overflow-wrap: break-word;
 }
 :is(.syj-page-hero:has(#poet-portal-title),
     .syj-page-hero:has(#poetry-hub-title),
     .syj-page-hero:has(#home-hero-title)) .syj-hero__tagline {
  font-size: .78rem;
  max-width: 100%;
  letter-spacing: .025em;
 }
 :is(.syj-page-hero:has(#poet-portal-title),
     .syj-page-hero:has(#poetry-hub-title),
     .syj-page-hero:has(#home-hero-title)) .syj-hero__subtext {
  font-size: .95rem;
  max-width: 100%;
  letter-spacing: .012em;
  overflow-wrap: break-word;
 }
 .syj-page-hero:has(#home-hero-title) .syj-hero__hotwords {
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 9px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
 }
 .syj-page-hero:has(#home-hero-title) .syj-hero__hotword {
  display: inline-block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
 }
 .syj-hub .syj-hub__themes h3,
 .syj-poet-portal .syj-poet-portal__family-cover h3 {
  overflow-wrap: break-word;
  letter-spacing: .012em;
 }
}


/* P20: foreign poet-universe cards only. Shrink unused illustration space,
   keep real author portraits and prevent 4 cards from occupying a 5-column grid. */
.syj-poet-channel #poet-families .syj-poet-portal__families {
 display: grid;
 grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
 gap: 16px;
 align-items: start;
}
.syj-poet-channel #poet-families .syj-poet-portal__family {
 width: 100%;
 max-width: 340px;
 min-width: 0;
 min-height: 310px;
 justify-self: center;
}
.syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-family-full-background {
 width: 100%;
 height: 100%;
 max-width: 100%;
 object-fit: cover;
 object-position: center top;
}
.syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-cover {
 min-height: 0;
 padding: 15px 14px 9px;
 background: linear-gradient(180deg, rgba(250,247,240,.83), rgba(250,247,240,.18));
}
.syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-cover h3 {
 font-size: clamp(17px, 1.45vw, 22px);
 line-height: 1.35;
 padding-right: 8px;
 overflow-wrap: normal;
 hyphens: auto;
}
.syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-cover p {
 font-size: 12px;
 line-height: 1.5;
 margin-top: 6px;
 min-height: 0;
 padding: 4px 5px;
 border-radius: 3px;
 background: rgba(250, 247, 240, .74);
}
.syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-people {
 min-height: 0;
 padding: 10px 10px 18px;
 gap: 12px 2px;
 grid-template-columns: repeat(2, minmax(0, 1fr));
}
.syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-member__portrait {
 width: 65px;
 height: 65px;
}
.syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-member__name {
 white-space: normal;
 overflow-wrap: anywhere;
 max-width: 110px;
 text-align: center;
 font-size: 12px;
 line-height: 1.35;
}
@container (max-width: 850px) {
 .syj-poet-channel #poet-families .syj-poet-portal__families {
  grid-template-columns: repeat(2, minmax(0,1fr));
 }
}
@container (max-width: 560px) {
 .syj-poet-channel #poet-families .syj-poet-portal__families {
  grid-template-columns: minmax(0,1fr);
 }
}
/* The original square-image editorial gate remains intact. Where no approved
   square portrait exists, use the person's own initial, never a borrowed photo. */
.syj-poet-channel .syj-poet-member__portrait .syj-poet-member__initial {
 writing-mode: horizontal-tb;
 letter-spacing: 0;
 font-family: Georgia, 'Times New Roman', serif;
 font-size: clamp(21px, 2vw, 29px);
 line-height: 1;
 font-weight: 500;
 color: #66533a;
 text-align: center;
}


/* P20: a multilingual poet-groups directory is not an empty taxonomy shell.
   Display only validated published poet profiles while formal term translations
   are reviewed, with no dead individual-group links. */
.syj-poet-portal--groups .syj-poet-portal__families {
 grid-template-columns: repeat(auto-fit, minmax(min(240px,100%), 1fr));
 gap: 18px;
 align-items: start;
}
.syj-poet-portal--groups .syj-poet-portal__family {
 width: 100%;
 max-width: 370px;
 min-width: 0;
 justify-self: center;
}
.syj-poet-portal--groups .syj-poet-portal__family-cover h3 {
 display: block;
 font-size: clamp(20px, 1.9vw, 27px);
 line-height: 1.35;
 overflow-wrap: break-word;
}
.syj-poet-portal--groups .syj-poet-portal__family-people {
 display: grid;
 grid-template-columns: repeat(2, minmax(0, 1fr));
 gap: 14px 10px;
 min-height: 0;
}
@media (max-width: 680px) {
 .syj-poet-portal--groups .syj-poet-portal__families { grid-template-columns: 1fr; }
}

/* P43: equal-height family cards per grid row, with decorative missing-avatar asset. */
.syj-poet-channel #poet-families .syj-poet-portal__families { align-items: stretch; }
.syj-poet-channel #poet-families .syj-poet-portal__family--painted {
 display: flex;
 flex-direction: column;
}
.syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-art { flex: none; }
.syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-cover { flex: none; }
.syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-people { flex: 1 0 auto; align-content: start; }
.syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-more { margin-top: auto; }
.syj-poet-channel .syj-poet-member__portrait--default img {
 object-fit: cover;
 object-position: center;
}

/* P44: title-only poet family cards; reserve a real arrow column, never overlap text. */
.syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-cover {
 display: grid;
 grid-template-columns: minmax(0, 1fr) 25px;
 align-items: center;
 column-gap: 10px;
 padding: 14px 14px 9px;
 min-height: 88px;
 box-sizing: border-box;
}
.syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-cover:not(:has(.syj-poet-portal__family-arrow)) {
 grid-template-columns: minmax(0,1fr);
}
.syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-cover h3 {
 grid-column: 1;
 min-width: 0;
 max-width: 100%;
 margin: 0;
 padding: 0;
 white-space: normal;
 overflow-wrap: anywhere;
 hyphens: auto;
 line-height: 1.35;
}
.syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-cover p {
 display: none;
}
.syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-arrow {
 grid-column: 2;
 position: static;
 inset: auto;
 align-self: center;
 justify-self: end;
 flex: none;
 box-sizing: border-box;
 margin: 0;
}
.syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-cover:focus-visible {
 outline: 2px solid #315b68;
 outline-offset: -3px;
}
@container (max-width: 560px) {
 .syj-poet-channel #poet-families .syj-poet-portal__family--painted .syj-poet-portal__family-cover {
  min-height: 66px;
 }
}
