/* The five reading/personal entries share the homepage's cream, navy and village art. */
body:is([data-view="stream"],[data-view="discover"],[data-view="feed_following"],[data-view="bookmarks"],[data-view="user"]) {
  isolation: isolate;
  background-color: #f5f3ef;
}
body:is([data-view="stream"],[data-view="discover"],[data-view="feed_following"],[data-view="bookmarks"],[data-view="user"])::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(#f8f4ebcf,#f8f4ebcf), url('/assets/backgrounds/home.webp') center / cover no-repeat;
}
.portal-page-banner {
  position: relative; isolation: isolate; overflow: hidden; box-sizing: border-box;
  display: flex; align-items: center; min-height: 210px; margin-bottom: 12px;
  padding: 27px clamp(22px,3vw,38px); border: 1px solid #e8ddca; border-radius: 16px;
  background: #f7edd8; box-shadow: 0 4px 14px #34395910;
}
.portal-page-art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 54%; pointer-events: none; }
.portal-page-banner::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,#fffaf2 0%,#fffaf2f5 26%,#fffaf2da 45%,#fffaf245 72%,transparent); }
/* Dedicated panoramic discovery artwork fills the banner edge to edge. */
body[data-view="discover"] .portal-page-art { object-position: 60% 56%; }
body[data-view="discover"] .portal-page-banner::before { background: linear-gradient(90deg,#fffaf2eb 0%,#fffaf2d1 25%,#fffaf280 43%,transparent 70%); }
.portal-page-copy { min-width: 0; max-width: 88%; }
.portal-page-kicker { display: flex; align-items: center; gap: 7px; color: #987234; font-size: .66rem; font-weight: 800; letter-spacing: .1em; }
.portal-page-kicker .ui-icon { width: 16px; height: 16px; }
.portal-page-copy h1 { margin: 9px 0; color: #252945; font-size: clamp(1.4rem,2.1vw,2.15rem); line-height: 1.4; letter-spacing: -.035em; text-wrap: balance; }
.portal-page-copy p { margin: 0; max-width: 390px; color: #51576c; font-size: .82rem; line-height: 1.8; text-wrap: pretty; }
.portal-page-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.portal-page-actions a { display: inline-flex; align-items: center; gap: 12px; min-height: 36px; box-sizing: border-box; padding: 8px 13px; border: 1px solid #dacba9; border-radius: 9px; background: #fffdf7eb; color: #51536a; font-size: .74rem; font-weight: 700; text-decoration: none; box-shadow: 0 2px 7px #3b354010; }
.portal-page-actions a.portal-page-primary { background: #252945; color: #fff7dc; border-color: #252945; }
.portal-page-actions a:hover { filter: brightness(1.08); }
.portal-page-actions a[hidden] { display: none; }
.portal-page-actions a:focus-visible { outline: 3px solid #d9a735; outline-offset: 3px; }
/* Quiet headings and paper surfaces give the content the same rhythm as home. */
.portal-content-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 17px 20px; border-bottom: 1px solid #e9e0d2; background: #fff8eb; }
.portal-content-heading h2 { display: flex; align-items: center; gap: 8px; margin: 0; color: #34394c; font-size: 1rem; }
.portal-content-heading h2 .ui-icon { width: 19px; height: 19px; color: #ad8040; }
.portal-content-heading > span { color: #817663; font-size: .72rem; }
.portal-bookmarks, .profile-content { overflow: hidden; border: 1px solid #e8ddca; border-radius: 16px; background: #fffdf9; box-shadow: 0 4px 14px #34395910; }
body[data-view] #app-shell .col-main :is(.portal-bookmarks,.profile-content) .result-list { display: grid; gap: 10px; margin: 0; padding: 14px; list-style: none; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
body[data-view] #app-shell .col-main :is(.portal-bookmarks,.profile-content) .result-list > li.card.result-item { margin: 0; padding: 0; border: 1px solid #e9e0d2; border-radius: 11px; background: #fffdf9; box-shadow: none; }
.portal-bookmarks .result-link, .profile-content .result-link { display: flex; align-items: flex-start; flex-direction: column; gap: 9px; padding: 17px; overflow-wrap: anywhere; text-decoration: none; }
.portal-bookmarks .result-item:hover, .profile-content .result-item:hover { border-color: #c8b47e!important; background: #fff9ec!important; }
.portal-bookmarks .result-link strong, .profile-content .result-link strong { color: #34394c; font-size: .9rem; line-height: 1.65; }
.bookmark-read-more { display: flex; justify-content: space-between; align-self: stretch; padding-top: 10px; border-top: 1px solid #eee7dc; color: #927137; font-size: .72rem; }
.portal-bookmarks .empty-state, .profile-content .empty-state { margin: 14px; padding: 34px 18px; border: 1px dashed #e4d8c0; border-radius: 12px; background: #fffaf0; text-align: center; }
.portal-empty-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; margin-bottom: 10px; border-radius: 14px; color: #a37c2d; background: #f8ebc7; font-size: 1.7rem; }
.portal-empty-icon .ui-icon { width: 24px; height: 24px; }
.portal-bookmarks .empty-state .btn { margin-top: 14px; }
#app-shell .portal-profile .profile-card { padding: 24px; border: 1px solid #e8ddca; border-top: 4px solid #f2ce50; border-radius: 16px; background: linear-gradient(120deg,#fffdf9,#fff9eb); box-shadow: 0 4px 14px #34395910; }
#app-shell .portal-profile .profile-head .level-avatar-profile { flex: none; margin-top: 0; }
.portal-profile .profile-head { align-items: center; gap: 20px; }
.portal-profile .profile-eyebrow { color: #987234; font-size: .68rem; letter-spacing: .07em; }
.portal-profile .profile-name { margin: 6px 0; color: #252945; font-size: 1.65rem; line-height: 1.35; }
.portal-profile .profile-head .small { font-size: .68rem; overflow-wrap: anywhere; }
.portal-profile .profile-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 20px 0; }
.portal-profile .profile-tags .chip { margin: 0; padding: 5px 9px; border: 1px solid #ded6bc; background: #f6f0dc; color: #756339; font-size: .72rem; }
.portal-profile .profile-tags .chip:nth-child(3n+2) { background: #eaf3ed; color: #4c705e; border-color: #d2e5d8; }
.portal-profile .profile-tags .chip:nth-child(3n) { background: #efecf7; color: #73618b; border-color: #e1d9ef; }
.portal-profile .post-actions { padding-top: 16px; border-top: 1px solid #e9e0d2; gap: 8px; }
.portal-profile .profile-content { margin-top: 12px; }
#app-shell .portal-profile .profile-content .feed-tabs { display: flex; width: 100%; box-sizing: border-box; margin: 0; padding: 7px 12px; border: 0; border-bottom: 1px solid #e9e0d2; border-radius: 0; box-shadow: none; }
.portal-profile .profile-content .feed-tabs button { flex: 1; justify-content: center; }
.portal-profile .published-time { align-self: flex-end; }
@media(min-width:1181px) {
  .portal-bookmarks .result-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .portal-bookmarks .result-link { height: 100%; box-sizing: border-box; }
  .bookmark-read-more { margin-top: auto; }
}
@media(max-width:720px) {
  body[data-view="discover"] .portal-page-banner::before { background: linear-gradient(90deg,#fffaf2ed,#fffaf2c9 45%,#fffaf266); }
  .portal-page-banner { min-height: 205px; padding: 23px 20px; margin: 0 0 12px; border-radius: 14px; }
  .portal-page-copy { max-width: 100%; }
  .portal-page-art { object-position: 64% center; }
  .portal-page-banner::before { background: linear-gradient(90deg,#fffaf2f7,#fffaf2e8 40%,#fffaf28c 80%,#fffaf244); }
  .portal-page-copy h1 { font-size: 1.45rem; }
  .portal-page-copy p { max-width: 265px; font-size: .77rem; }
  .portal-page-actions { margin-top: 15px; }
  .portal-page-actions a { min-height: 40px; font-size: .71rem; padding-inline: 11px; }
  #app-shell .portal-profile .profile-card { padding: 20px 16px; }
  .portal-profile .profile-head { gap: 16px; }
  .portal-profile .profile-head > div:last-child { flex: 1; }
  .portal-profile .profile-name { font-size: 1.4rem; }
  .portal-content-heading { padding: 15px 16px; }
  .portal-content-heading > span { font-size: .68rem; }
  .portal-profile .post-actions .btn { min-height: 40px; }
}
@media(prefers-contrast:more) {
  .portal-page-banner::before { background: #fffaf2ed; }
  .portal-page-kicker, .portal-content-heading > span { color: #72541d; }
}
