/*
 * Purpose: Extend the personal homepage with public project directory pages.
 * Expected result: Accessible cream and forest-green layouts at mobile and desktop sizes.
 * Usage: Load after styles.css on the homepage directory and portal pages.
 */
.portal-header { min-height: 110px; height: auto; padding-block: 20px; }
.portal-header .wordmark { flex-shrink: 0; min-height: 44px; }
.portal-header .wordmark > span { line-height: 1.35; }
.portal-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px 8px; min-width: 0; }
.portal-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 12px; border-radius: 5px; font-size: 14px; line-height: 1.5; white-space: nowrap; }
.portal-nav a:hover { background: #e9ecdf; }
.portal-nav a[aria-current="page"] { background: #e1e7d7; color: #263c30; font-weight: 650; }
.portal-main { min-height: calc(100svh - 221px); padding-block: 28px 64px; font-size: 14px; line-height: 1.8; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 25px; color: #626d5a; font-size: 14px; overflow-wrap: anywhere; }
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; }
.breadcrumbs a:hover { color: #263c30; }
.page-intro { max-width: 820px; margin-bottom: 34px; }
.page-intro .eyebrow { margin: 0 0 16px; color: #536249; font-size: 12px; letter-spacing: 1.45px; }
.page-intro h1 { margin: 0; font-size: clamp(30px, 3.3vw, 43px); font-weight: 550; letter-spacing: -1.4px; line-height: 1.35; word-break: keep-all; overflow-wrap: anywhere; }
.page-intro > p:not(.eyebrow) { max-width: 670px; margin-top: 18px; color: #596653; font-size: 15px; line-height: 1.9; word-break: keep-all; overflow-wrap: anywhere; }
.page-intro > .status-badge { margin-top: 18px; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 29px; padding: 3px 9px; border: 1px solid #cbd3bd; border-radius: 4px; color: #485940; background: #e8eddf; font-size: 12px; font-weight: 500; line-height: 1.6; overflow-wrap: anywhere; }
.portal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.portal-card { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 29px; border: 1px solid #d3dac7; border-radius: 9px; background: #fafaf4; }
.portal-card > p { flex-grow: 1; }
.portal-card:focus-within { border-color: #869b70; }
.card-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; margin-bottom: 17px; border: 1px solid #d7ddcc; border-radius: 9px; color: #46613c; background: #edf0e5; flex-shrink: 0; }
.card-icon svg { width: 23px; height: 23px; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; color: #5c6b50; font-size: 12px; line-height: 1.6; letter-spacing: .6px; }
.portal-card h2, .portal-card h3 { margin: 0; color: #263c30; font-size: 23px; font-weight: 550; line-height: 1.5; letter-spacing: -.5px; overflow-wrap: anywhere; }
.portal-card p { max-width: 64ch; margin: 12px 0 0; color: #596653; font-size: 14px; line-height: 1.9; word-break: keep-all; overflow-wrap: anywhere; }
.portal-card > .status-badge, .card-body > .status-badge { margin-top: 18px; }
.card-link { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 44px; max-width: 100%; margin-top: 23px; padding: 10px 14px; border: 1px solid #abb99b; border-radius: 4px; color: #2f4a30; background: transparent; font-size: 14px; line-height: 1.5; font-weight: 550; overflow-wrap: anywhere; transition: background-color .15s; }
.card-link svg { width: 17px; height: 17px; flex-shrink: 0; }
.card-link:hover { background: #e7ecdd; }
.portal-card > .card-link { margin-top: 23px; }
.portal-card > p + .card-link, .portal-card > .status-badge + .card-link { margin-top: 23px; }
.card-featured { grid-column: 1 / -1; position: relative; padding: 34px; border-color: #253f32; background: #253f32; color: #f5f4ed; }
.card-featured .card-body { width: 100%; min-width: 0; }
.card-featured .card-icon { border-color: #75856d; background: #3b5340; color: #dae4c5; }
.card-featured .card-meta { color: #c4d0b8; }
.card-featured h2, .card-featured h3 { color: #f5f4ed; }
.card-featured p { color: #d0d9c8; }
.card-featured .status-badge { border-color: #75876b; background: #3a5140; color: #e6edda; }
.card-featured .card-link { border-color: #e2e8c9; background: #e2e8c9; color: #2c4231; }
.card-featured .card-link:hover { background: #f1f3df; }
.card-featured a:focus-visible { outline-color: #e7edc9; }
.empty-state { display: flex; flex-direction: column; align-items: flex-start; padding: 32px; margin-bottom: 34px; border: 1px solid #ced7bf; border-radius: 7px; background: #edf0e5; }
.empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 43px; height: 43px; margin-bottom: 18px; border: 1px solid #c3ceb2; border-radius: 50%; color: #526c42; }
.empty-icon svg { width: 22px; height: 22px; }
.empty-state h2 { margin: 0; font-size: 23px; line-height: 1.5; font-weight: 550; letter-spacing: -.5px; overflow-wrap: anywhere; }
.empty-state p { max-width: 72ch; margin-top: 12px; color: #536249; font-size: 14px; line-height: 1.9; word-break: keep-all; overflow-wrap: anywhere; }
.outline-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 25px; margin-top: 24px; }
.outline-item { min-width: 0; padding: 22px 0 24px; border-top: 1px solid #cfd7c1; }
.outline-index { display: block; margin-bottom: 12px; color: #62764e; font-size: 12px; font-variant-numeric: tabular-nums; letter-spacing: .7px; }
.outline-item h3 { color: #2e4432; font-size: 16px; line-height: 1.6; font-weight: 550; letter-spacing: -.2px; overflow-wrap: anywhere; }
.outline-item p { margin-top: 9px; color: #596653; font-size: 14px; line-height: 1.9; word-break: keep-all; overflow-wrap: anywhere; }
.portal-main > section + section { margin-top: 38px; }
.portal-main > section > h2:not(.eyebrow) { font-size: 24px; font-weight: 550; line-height: 1.5; letter-spacing: -.5px; overflow-wrap: anywhere; }
.scope-note { margin-top: 27px; padding: 16px 18px; border-left: 2px solid #8e9f79; color: #526048; background: #edf0e5; font-size: 14px; line-height: 1.9; word-break: keep-all; overflow-wrap: anywhere; }
.scope-note p { margin: 0; font-size: inherit; line-height: inherit; }
.related-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 23px; margin-top: 31px; padding-top: 18px; border-top: 1px solid #d3dac7; font-size: 14px; color: #536249; }
.related-links a { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding-block: 9px; color: #345034; text-decoration: underline; text-underline-offset: 4px; }
.related-links svg { width: 16px; height: 16px; flex-shrink: 0; }
.related-label { flex-basis: 100%; margin-bottom: 3px; color: #637159; font-size: 12px; }
.portal-footer { min-height: 91px; font-size: 14px; color: #596653; }
.portal-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.portal-footer > a:first-child, .portal-footer > a:first-child span, .portal-footer > span { font-size: 14px; color: #596653; }
.portal-footer .back-to-top { font-size: 14px; }
.section-directory { padding-block: 64px 0; }
.section-directory > h2 { margin: 0 0 24px; color: #263c30; font-size: 29px; line-height: 1.5; font-weight: 550; letter-spacing: -.7px; }
.section-directory > p { max-width: 64ch; margin: -10px 0 24px; color: #596653; font-size: 14px; line-height: 1.9; }
.section-directory .section-heading h2 { font-size: 12px; color: #536249; }
.section-directory .section-heading > span { font-size: 14px; color: #596653; }
.section-directory .card-link { justify-content: space-between; }
.hero-directory-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding-block: 10px; font-size: 13px; color: #405d37; text-decoration: underline; text-underline-offset: 5px; }
.hero-directory-link:hover { color: #263c30; }
.private-preview { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; margin: 0 0 28px; padding: 23px 25px; border: 1px solid #bbc8ac; border-radius: 8px; background: #e8eddf; }
.private-preview > div { flex: 1 1 300px; min-width: 0; }
.private-preview .preview-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 9px; font-size: 18px; line-height: 1.5; font-weight: 600; color: #263c30; }
.private-preview p { margin: 0; color: #536249; font-size: 14px; line-height: 1.8; word-break: keep-all; overflow-wrap: anywhere; }
.private-preview .card-link { flex-shrink: 0; margin: 0; background: #253f32; border-color: #253f32; color: #f5f4ed; }
.private-preview .card-link:hover { background: #3c5743; }
.hero-signature { flex-basis: 100%; margin-top: -8px; }
.portal-footer .back-to-top { flex-shrink: 0; }

@media (max-width: 1000px) {
  .portal-header { gap: 16px; }
  .portal-nav { gap: 3px; }
  .portal-nav a { padding-inline: 9px; font-size: 13px; }
  .portal-card { padding: 25px; }
  .outline-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .portal-header { align-items: flex-start; flex-direction: column; gap: 13px; padding-block: 21px 12px; }
  .portal-header .wordmark { min-height: 36px; }
  .portal-nav { justify-content: flex-start; width: 100%; gap: 3px 4px; }
  .portal-nav a { min-height: 44px; padding: 9px 10px; font-size: 14px; }
  .portal-main { padding-block: 20px 46px; }
  .breadcrumbs { margin-bottom: 22px; font-size: 13px; }
  .page-intro { margin-bottom: 28px; }
  .page-intro h1 { font-size: 33px; letter-spacing: -1px; }
  .page-intro > p:not(.eyebrow) { font-size: 14px; }
  .portal-grid { gap: 14px; }
  .portal-card { padding: 23px; }
  .portal-card h2, .portal-card h3 { font-size: 21px; }
  .card-featured { padding: 27px; }
  .empty-state { padding: 26px; }
  .section-directory { padding-top: 49px; }
  .section-directory > h2 { font-size: 26px; }
  .hero-signature { margin-top: -6px; }
}

@media (max-width: 540px) {
  .portal-grid, .outline-grid { grid-template-columns: minmax(0, 1fr); }
  .portal-header .wordmark { font-size: 15px; }
  .portal-header .wordmark-domain { font-size: 10px; letter-spacing: .5px; }
  .portal-header .brand-symbol { width: 27px; height: 27px; }
  .portal-nav a { font-size: 13px; padding-inline: 9px; }
  .page-intro h1 { font-size: 30px; line-height: 1.45; }
  .page-intro .eyebrow { font-size: 11px; letter-spacing: 1.2px; }
  .portal-card, .card-featured { padding: 23px; }
  .card-icon { margin-bottom: 15px; }
  .empty-state { padding: 24px 21px; }
  .empty-state h2 { font-size: 21px; }
  .outline-grid { gap: 0; }
  .outline-item { padding-block: 20px 22px; }
  .scope-note { padding: 14px 15px; }
  .related-links { gap: 4px 19px; }
  .portal-footer { padding-block: 17px; gap: 4px 12px; }
  .portal-footer > a:first-child, .portal-footer > a:first-child span, .portal-footer > span, .portal-footer .back-to-top { font-size: 12px; }
  .portal-footer > span { overflow-wrap: anywhere; }
  .section-directory .section-heading { align-items: flex-start; flex-direction: column; gap: 9px; }
  .section-directory .section-heading > span { font-size: 14px; }
  .portal-footer .back-to-top { width: auto; margin-left: auto; }
  .portal-footer > span { flex-basis: 100%; order: 3; margin: 0; padding-top: 2px; font-size: 11px; }
  .hero-directory-link { font-size: 12px; }
  .private-preview { padding: 20px; gap: 17px; }
  .private-preview .preview-title { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .card-link { transition: none; }
}
