/* BBBS portal homepage V2: keep the community navigation, use one compact editorial surface. */
body[data-layout="portal"] #app-shell.shell {
  display:grid;
  grid-template-columns:clamp(172px,12vw,202px) minmax(0,1fr);
  gap:10px;
  align-items:start;
  box-sizing:border-box;
  max-width:1680px;
  margin:10px auto 0;
  padding:9px;
  border:1px solid #fffaf0d9;
  border-radius:19px;
  background:#fff9f0ac;
  box-shadow:0 8px 30px #403d3410;
}
body[data-layout="portal"] #app-shell > .col-main {min-width:0;width:auto;padding:0;border:0;background:transparent;}
body[data-layout="portal"] #app-shell > .col-right {display:none;}
@media(min-width:721px){
  body[data-layout="portal"] #app-shell #community-navigation.col-left {
    display:flex;
    flex-direction:column;
    position:sticky;
    top:75px;
    max-height:calc(100dvh - 89px);
    margin:0;
    padding:12px 10px 14px;
    overflow-y:auto;
    border:1px solid #4d536c;
    border-radius:13px;
    background:#343d56;
    box-shadow:0 4px 13px #17203416;
  }
  body[data-layout="portal"] #app-shell #community-navigation > .sidebar-primary {display:flex;gap:2px;padding-bottom:10px;}

  /* Ensure readable navigation at both tablet and desktop widths. */
  body[data-layout="portal"] #app-shell #community-navigation > .sidebar-primary a,
  body[data-layout="portal"] #app-shell #community-navigation .sidebar-links a {color:#f5f3fa;}
  body[data-layout="portal"] #app-shell #community-navigation .sidebar-primary .ui-icon {color:#f3e9d7;}
  body[data-layout="portal"] #app-shell #community-navigation .sidebar-group > summary {color:#eee3ca;}
  body[data-layout="portal"] #app-shell #community-navigation :is(.sidebar-primary,.sidebar-links) a:hover {background:#ffffff20;color:white;}
  body[data-layout="portal"] #app-shell #community-navigation .sidebar-links a[aria-current="page"] {background:#ffe6a9;color:#30384b;}
  body[data-layout="portal"] #app-shell #community-navigation > .sidebar-primary a[aria-current="page"] .ui-icon {color:#303647;}

  body[data-layout="portal"] #app-shell #community-navigation .sidenav a,
  body[data-layout="portal"] #app-shell #community-navigation .sidebar-links a {
    min-height:34px;
    padding:7px 8px;
    border-radius:9px;
    font-size:.78rem;
  }
  body[data-layout="portal"] #app-shell #community-navigation .sidenav a[aria-current="page"] {background:#f7db95;color:#303647;font-weight:800;}
  body[data-layout="portal"] #app-shell #community-navigation .sidebar-group {padding-block:6px;}
  body[data-layout="portal"] #app-shell #community-navigation .sidebar-group > summary {padding:6px 5px;font-size:.73rem;}
  body[data-layout="portal"] #app-shell #community-navigation .sidebar-links .category-icon {width:25px;height:25px;padding:4px;}
}

.portal-home {--portal-ink:#343949;--portal-muted:#777c87;--portal-line:#eee8dd;min-width:0;color:var(--portal-ink);}
.portal-home *, .portal-home *::before, .portal-home *::after {box-sizing:border-box;}
.portal-home a {text-decoration:none;}
.portal-home :is(a,button):focus-visible {outline:3px solid #dba53b;outline-offset:2px;}
.portal-dashboard {overflow:hidden;border:1px solid #fcf8ee;border-radius:16px;background:#fffdf9f7;box-shadow:0 3px 15px #393b4810;}
.portal-intro {position:relative;isolation:isolate;display:flex;align-items:center;min-height:228px;gap:20px;padding:27px clamp(24px,3vw,40px);overflow:hidden;background:#ecede5;border-bottom:1px solid #e2d9ca;}
.portal-intro-art {position:absolute;z-index:-2;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 53%;pointer-events:none;}
.portal-intro::before {content:'';position:absolute;z-index:-1;inset:0;background:linear-gradient(90deg,#fffaf0f7 0%,#fff9edee 29%,#fff9eac7 43%,#fff9e748 63%,transparent 87%);pointer-events:none;}
.portal-intro::after {content:'';position:absolute;z-index:-1;inset:0;background:linear-gradient(0deg,#ffe3bc31,transparent 45%);pointer-events:none;}
.portal-intro-copy {position:relative;z-index:1;max-width:780px;min-width:0;}
.portal-kicker,.portal-eyebrow {display:block;color:#ad8041;font-size:.67rem;font-weight:800;letter-spacing:.12em;}
.portal-intro h1 {margin:7px 0 7px;color:#303649;font-size:clamp(1.35rem,2.15vw,1.95rem);line-height:1.35;letter-spacing:-.035em;}
.portal-intro p {margin:0;font-size:.83rem;line-height:1.65;color:#666979;}
.portal-intro-actions {display:flex;flex-wrap:wrap;gap:9px;margin-top:17px;}
.portal-intro-actions a {display:inline-flex;align-items:center;gap:7px;min-height:35px;padding:7px 13px;border:1px solid #e8d5b1;border-radius:10px;font-size:.76rem;font-weight:800;}
.portal-intro-actions .ui-icon {width:16px;height:16px;}
.portal-intro-primary {color:#fff8e8;background:#3b445f;border-color:#3b445f!important;}
.portal-intro-primary:hover {color:#fff;background:#505875;}
.portal-intro-secondary {color:#48485b;background:#fffdf8cd;}
.portal-intro-secondary:hover {background:#fff;}
/* Individually colored introductory actions; specificity also overrides portal theme refinements. */
body[data-layout="portal"] #app-shell .portal-intro-actions a.portal-intro-about {
  color: #fff;
  background: #b12f43;
  border-color: #9a2334 !important;
}
body[data-layout="portal"] #app-shell .portal-intro-actions a.portal-intro-about:hover {
  color: #fff;
  background: #9a2334;
}
body[data-layout="portal"] #app-shell .portal-intro-actions a.portal-intro-guide {
  color: #fff;
  background: #265ba8;
  border-color: #1e4785 !important;
}
body[data-layout="portal"] #app-shell .portal-intro-actions a.portal-intro-guide:hover {
  color: #fff;
  background: #1e4785;
}
.portal-livebar {display:flex;align-items:center;flex-wrap:wrap;gap:14px;min-height:56px;padding:11px clamp(20px,3vw,39px);background:#fff9ef;border-bottom:1px solid var(--portal-line);}
.portal-livebar-label {display:inline-flex;align-items:center;gap:7px;flex:none;font-size:.75rem;font-weight:800;color:#575a69;}
.portal-live-dot {width:8px;height:8px;border-radius:50%;background:#e5b756;box-shadow:0 0 0 3px #fbeacc;}
.portal-live-stats {display:flex;align-items:center;flex-wrap:wrap;gap:6px clamp(12px,2vw,24px);}
.portal-live-stats > span {font-size:.72rem;color:#777681;white-space:nowrap;}
.portal-live-stats strong {margin-right:4px;font-size:.97rem;font-weight:850;color:#34394d;font-variant-numeric:tabular-nums;}
.portal-live-note {font-size:.73rem;color:#8b7b5f;}
.portal-live-more {margin-left:auto;font-size:.73rem;font-weight:800;white-space:nowrap;color:#98723c;}
.portal-live-more:hover {color:#b57e25;}
.portal-editorial {display:grid;grid-template-columns:minmax(0,1.22fr) minmax(315px,.86fr);gap:0;border-bottom:1px solid var(--portal-line);}
.portal-editorial > section {min-width:0;padding:24px clamp(20px,2.65vw,34px) 13px;}
.portal-editorial .portal-latest {border-right:1px solid var(--portal-line);}
.portal-section-head {display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:0 0 15px;}
.portal-section-head h2 {margin:4px 0 4px;color:#2e374c;font-size:1.25rem;font-weight:850;line-height:1.25;letter-spacing:-.025em;}
.portal-section-head p {margin:0;color:var(--portal-muted);font-size:.74rem;line-height:1.5;}
.portal-more {flex:none;margin-bottom:3px;color:#8c6835;font-size:.73rem;font-weight:850;white-space:nowrap;}
.portal-more:hover {color:#c18427;}
.portal-message {margin:12px 0;font-size:.77rem;line-height:1.7;color:var(--portal-muted);}
.portal-error {color:#ac5060;}
.portal-error button {border:0;padding:0;color:inherit;background:transparent;font:inherit;text-decoration:underline;cursor:pointer;}
.portal-timeline,.portal-ranking {border-top:1px solid var(--portal-line);}
.portal-timeline-row {display:flex;align-items:center;gap:10px;min-width:0;padding:11px 0;border-bottom:1px solid #f0ece6;color:#363d50;}
.portal-timeline-row:hover,.portal-rank-row:hover {background:#fff8ed;}
.portal-timeline-row:last-child,.portal-rank-row:last-child {border-bottom:0;}
.portal-avatar {flex:0 0 38px;width:38px;height:38px;border:1px solid #f3ecdf;border-radius:12px;background:#eee9e1;object-fit:cover;}
.portal-timeline-content {flex:1;display:block;min-width:0;}
.portal-timeline-meta {display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px;color:#88878e;font-size:.68rem;line-height:1.45;}
.portal-timeline-meta strong {color:#535c69;font-size:.73rem;}
.portal-timeline-meta time {margin-left:auto;white-space:nowrap;}
.portal-timeline-title {display:block;margin-top:3px;font-size:.82rem;font-weight:750;line-height:1.5;overflow-wrap:anywhere;}
.portal-timeline-board {flex:none;max-width:70px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#a58050;font-size:.69rem;}
.portal-link-arrow {flex:none;color:#b8a382;font-size:1.2rem;line-height:1;}
.portal-bottom-link {display:flex;align-items:center;justify-content:space-between;padding:12px 0 1px;color:#93713e;font-size:.75rem;font-weight:800;}
.portal-bottom-link:hover {color:#b87c29;}
.portal-ranking {padding-top:1px;}
.portal-rank-row {display:flex;align-items:flex-start;gap:11px;padding:13px 0;border-bottom:1px solid #f0ece6;color:#333a4e;}
.portal-rank-number {flex:0 0 28px;padding-top:3px;color:#d1ae73;font-size:1.2rem;font-weight:900;line-height:1.1;font-variant-numeric:tabular-nums;}
.portal-rank-row:nth-child(-n+3) .portal-rank-number {color:#ba8435;}
.portal-rank-content {flex:1;min-width:0;}
.portal-rank-board {display:block;margin-bottom:3px;color:#a17948;font-size:.67rem;font-weight:750;}
.portal-rank-content strong {display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;font-size:.83rem;font-weight:800;line-height:1.5;overflow-wrap:anywhere;}
.portal-rank-content small {display:flex;flex-wrap:wrap;gap:5px;margin-top:5px;color:#878b94;font-size:.68rem;}
.portal-sep {color:#bdad96;}
.portal-boards {padding:25px clamp(20px,2.65vw,34px) 26px;}
.portal-boards-head {margin-bottom:17px;}
.portal-board-features {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;}
.portal-board-feature {min-width:0;padding:13px 15px;border:1px solid #eee8e0;border-radius:13px;background:#fffdf8;}
.portal-board-top {display:flex;align-items:center;gap:9px;color:#323b4c;}
.portal-board-icon {flex:0 0 36px;display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:#f6e9cb;}
.portal-board-feature:nth-child(4n+2) .portal-board-icon {background:#dce9ef;}
.portal-board-feature:nth-child(4n+3) .portal-board-icon {background:#e8e1f3;}
.portal-board-icon .ui-icon {width:22px;height:22px;}
.portal-board-name {flex:1;min-width:0;}
.portal-board-name strong {display:block;font-size:.83rem;}
.portal-board-name small {display:block;margin-top:2px;color:#7e8090;font-size:.67rem;line-height:1.4;overflow-wrap:anywhere;}
.portal-board-posts {margin:10px 0 0;padding-top:3px;border-top:1px solid #eee8e0;}
.portal-board-posts a {display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 0;color:#414859;font-size:.75rem;line-height:1.45;}
.portal-board-posts a + a {border-top:1px solid #f1ece6;}
.portal-board-posts a:hover {color:#b27c38;}
.portal-board-posts a > span {min-width:0;overflow-wrap:anywhere;}
.portal-board-posts small {flex:none;color:#96919a;font-size:.66rem;white-space:nowrap;}
.portal-directory {margin-top:14px;padding-top:13px;border-top:1px solid #eee9df;}
.portal-directory-title {margin-bottom:10px;color:#4c5060;font-size:.79rem;font-weight:850;}
.portal-directory-title span {margin-left:9px;color:#93909a;font-size:.69rem;font-weight:400;}
.portal-directory-links {display:flex;flex-wrap:wrap;gap:8px;}
.portal-directory-links a {display:inline-flex;align-items:center;gap:7px;min-height:34px;padding:6px 10px;border:1px solid #ebe4d9;border-radius:9px;background:#faf8f4;color:#575968;font-size:.73rem;}
.portal-directory-links a:hover {border-color:#d7bc87;background:#fff3d9;color:#564e48;}
.portal-directory-links .ui-icon {flex:none;width:20px;height:20px;}
.portal-directory-links a > span:last-child {margin-left:3px;color:#ac9e8d;}
.portal-noscript {padding:15px;font-size:.83rem;background:#fff9e8;}

@media(max-width:1179px) and (min-width:721px) {
  body[data-layout="portal"] #app-shell.shell {grid-template-columns:176px minmax(0,1fr);padding:8px;gap:8px;}
  .portal-editorial {grid-template-columns:minmax(0,1fr) minmax(270px,.84fr);}
  .portal-editorial > section {padding-inline:18px;}
  .portal-boards {padding-inline:18px;}
  .portal-timeline-board {display:none;}
}
@media(max-width:940px) and (min-width:721px) {
  .portal-editorial {grid-template-columns:1fr;}
  .portal-editorial .portal-latest {border-right:0;border-bottom:1px solid var(--portal-line);}
  .portal-board-features {grid-template-columns:1fr;}
}
@media(max-width:720px) {
  body[data-layout="portal"] #app-shell.shell {display:grid;grid-template-columns:minmax(0,1fr);margin:10px auto 0;padding:0 11px;background:transparent;border:0;border-radius:0;box-shadow:none;}
  body[data-layout="portal"] #app-shell > .col-main {width:100%;padding:0;}
  .portal-dashboard {border-radius:14px;}
  .portal-intro {min-height:190px;padding:20px 17px;gap:12px;}
  .portal-intro-art {object-position:62% center;}
  .portal-intro::before {background:linear-gradient(90deg,#fffaf0fa 0%,#fff9edf4 33%,#fff9edd7 67%,#fff9ed71 100%);}
  .portal-intro h1 {font-size:1.34rem;}
  .portal-intro p {font-size:.76rem;}
  .portal-intro-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:14px;}
  .portal-intro-actions a {justify-content:center;min-width:0;font-size:.71rem;min-height:34px;padding:6px 9px;}
  .portal-livebar {gap:9px;padding:11px 16px;}
  .portal-livebar-label {width:100%;}
  .portal-live-stats {gap:6px 15px;}
  .portal-live-more {font-size:.7rem;}
  .portal-editorial {grid-template-columns:1fr;}
  .portal-editorial .portal-latest {border-right:0;border-bottom:1px solid var(--portal-line);}
  .portal-editorial > section {padding:20px 16px 12px;}
  .portal-boards {padding:19px 16px 24px;}
  .portal-board-features {grid-template-columns:1fr;}
  .portal-timeline-board {display:none;}
  .portal-section-head h2 {font-size:1.14rem;}
  .portal-timeline-meta time {margin-left:0;}
}
@media(max-width:380px){
  .portal-intro-actions {flex-wrap:wrap;}
  .portal-timeline-row {gap:8px;}
  .portal-timeline-title {font-size:.79rem;}
  .portal-more {font-size:.69rem;}
}
@media(prefers-reduced-motion:reduce){
  .portal-home :is(a,button) {scroll-behavior:auto;}
}
