:root {
  --portal-ink: #182b3b;
  --portal-muted: #687986;
  --portal-border: #e1e7eb;
  --portal-accent: #176f77;
  --bs-primary: #176f77;
}

html { scrollbar-gutter: stable; }
@supports not (scrollbar-gutter: stable) {
  html { overflow-y: scroll; }
}
body, .portal-layout { background: #f7f9fa; color: var(--portal-ink); }
.portal-shell { max-width: 1380px; padding: 0 42px 50px; }
.portal-shell:has(~ .selection-bar) { padding-bottom: 260px; }
.portal-header-v2 { padding: 27px 0; margin-bottom: 30px; background: transparent; border: 0; border-bottom: 1px solid var(--portal-border); }
.header-brand { gap: 24px !important; }
.brand-logo-v2 { width: 102px; }
.header-text { border-left: 1px solid #d7dee3; padding-left: 24px; }
.portal-title { font-size: .94rem; font-weight: 650; color: var(--portal-ink); }
.portal-subtitle { font-size: .74rem; margin-top: 5px; color: var(--portal-muted); }
.portal-home-link { font-size: .82rem; font-weight: 550; color: var(--portal-muted); text-decoration: none; }
.portal-home-link span { margin-left: 14px; color: var(--portal-accent); }
.portal-home-link:hover { color: var(--portal-accent); }
.library-intro { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding: 50px 0 38px; }
.intro-eyebrow { font-size: .65rem; font-weight: 700; letter-spacing: .17em; color: var(--portal-accent); margin-bottom: 19px; }
.library-intro h1 { font-size: clamp(2rem, 3.4vw, 3rem); letter-spacing: -.055em; font-weight: 650; line-height: 1.17; margin-bottom: 17px; }
.library-intro h1 span { color: var(--portal-accent); }
.library-intro p { color: var(--portal-muted); font-size: .88rem; line-height: 1.8; margin: 0; }
.library-summary { display: flex; align-items: center; gap: 25px; padding: 26px 30px; background: #edf3f3; border: 1px solid #e0ebeb; border-radius: 16px; }
.library-summary strong { display: block; font-size: 1.7rem; font-weight: 600; letter-spacing: -.04em; }
.library-summary div > span { display: block; font-size: .71rem; color: #59747a; margin-top: 3px; }
.summary-symbol { font-size: 2.7rem; color: var(--portal-accent); font-weight: 300; }
.summary-divider { height: 44px; border-left: 1px solid #cedede; }
.library-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 7px; background: white; border: 1px solid var(--portal-border); border-radius: 13px; flex: 1; max-width: 620px; min-width: 0; }
.library-toolbar .search-wrap { flex: 1; min-width: 0; }
.view-switch { flex-shrink: 0; }
.library-toolbar .search-box { width: 100%; height: 43px; border: 0; border-radius: 8px; font-size: .87rem; background: transparent; }
.search-icon { left: 14px; color: #78909a; }
.search-box:focus { box-shadow: 0 0 0 3px #176f771c; }
.view-switch { display: flex; background: #f3f6f7; padding: 4px; border-radius: 8px; gap: 4px; }
.view-switch .btn { font-size: .79rem; color: var(--portal-muted); padding: 7px 13px; border: 0; }
.view-switch .btn span { margin-left: 5px; }
.view-switch .btn.active { background: white; color: var(--portal-accent); box-shadow: 0 1px 5px #182b3b12; }
.category-sidebar, .folder-tree { background: transparent; border-radius: 0; box-shadow: none !important; }
.category-sidebar .card-body, .folder-tree .card-body { padding: 6px 18px 16px 0 !important; }
.category-sidebar h6, .folder-tree h6 { font-size: .66rem; text-transform: uppercase; letter-spacing: .13em; font-weight: 700; margin-bottom: 19px !important; }
.category-pill { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 12px; font-size: .81rem; color: #596c7a; }
.category-pill.active { background: #e5efee; border-color: #e5efee; color: #155c63; font-weight: 650; }
.category-pill:hover { background: #edf2f3; }
.category-pill .badge { background: #eaf0f2 !important; color: #657884 !important; font-size: .67rem; font-weight: 550; }
.category-pill.active .badge { background: #d1e4e1 !important; color: #155c63 !important; }
.folder-tree { border-top: 1px solid var(--portal-border) !important; margin-right: 18px; padding-top: 23px; }
.tree-link { font-size: .77rem; line-height: 1.8; padding: 4px 2px; overflow-wrap: anywhere; }
.tree-link.active, .tree-link:hover { color: var(--portal-accent); }
.library-results-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 22px; }
.library-results-heading h2 { font-size: 1.03rem; font-weight: 650; margin: 0; }
.library-results-heading h2 span { font-size: .71rem; background: #e8edef; color: #617580; border-radius: 6px; padding: 4px 7px; margin-left: 8px; vertical-align: middle; }
.library-results-heading .small { font-size: .72rem; }
.file-card { border-radius: 13px; box-shadow: 0 3px 10px #182b3b03; overflow: hidden; cursor: pointer; }
.file-card .card-body { padding: 23px 21px 0; }
.file-card:hover { transform: translateY(-3px); border-color: #b7cece !important; box-shadow: 0 10px 25px #183c4710 !important; }
.file-card.is-selected { border-color: var(--portal-accent) !important; box-shadow: 0 0 0 1px var(--portal-accent); background: #fcfefe; }
.file-type-icon { width: 51px; height: 55px; border-radius: 12px; background: #eef1fb; color: #6372a7; display: grid; place-items: center; margin-bottom: 23px; }
.file-type-mobile { background: #e8f3ee; color: #32826a; }
.form-check-input { width: 19px; height: 19px; border-color: #c9d5db; cursor: pointer; flex-shrink: 0; }
.form-check-input:checked { background-color: var(--portal-accent); border-color: var(--portal-accent); }
.form-check-input:focus { border-color: var(--portal-accent); box-shadow: 0 0 0 3px #176f7725; }
.file-type-label { font-size: .64rem; font-weight: 650; color: var(--portal-accent); letter-spacing: .055em; margin-bottom: 9px; }
.file-type-label span { color: var(--portal-muted); letter-spacing: normal; font-weight: 400; }
.file-name { font-size: .89rem; line-height: 1.6; font-weight: 650; overflow-wrap: anywhere; margin: 0 0 8px; }
.file-path { font-size: .7rem; line-height: 1.7; color: var(--portal-muted); overflow-wrap: anywhere; margin-bottom: 22px; }
.file-metadata { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-bottom: 19px; font-size: .69rem; color: var(--portal-muted); }
.file-metadata span:first-child { color: #475d6b; font-weight: 550; }
.file-select-button { display: flex; justify-content: space-between; align-items: center; width: calc(100% + 42px); margin-left: -21px; padding: 13px 21px; background: #fafcfc; border: 0; border-top: 1px solid #edf1f3; color: #5d727d; font-size: .73rem; font-weight: 550; }
.file-select-button span:last-child { font-size: 1.1rem; }
.file-select-button:hover, .is-selected .file-select-button { color: var(--portal-accent); background: #edf5f3; }
.table-skin { border-radius: 12px; box-shadow: none !important; }
.table-skin .table { margin-bottom: 0; font-size: .8rem; }
.table-skin thead th { background: #eff4f5; font-size: .68rem; padding: 16px 12px; white-space: nowrap; }
.table-skin td { padding: 16px 12px; }
.library-footer { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--portal-border); margin-top: 50px; padding-top: 22px; color: #7b8b94; font-size: .7rem; }
.alert-info { background: #eaf3f3; border: 1px solid #d7e8e7; border-radius: 10px; color: #27676c; font-size: .83rem; }
.alert-info a { color: #176f77; }
.library-empty { border: 1px dashed #ccdadd; border-radius: 14px; padding: 36px 20px; text-align: center; margin-bottom: 20px; }
.library-empty > span { color: var(--portal-accent); font-size: 2.5rem; }
.library-empty h2 { font-size: 1rem; margin: 10px 0; }
.library-empty p { font-size: .8rem; color: var(--portal-muted); margin: 0; }
.selection-bar { left: 24px; right: 24px; bottom: 18px; width: auto; max-width: 1260px; margin: auto; border: 1px solid #d3e1e1; border-radius: 15px; box-shadow: 0 12px 50px #173d4620 !important; }
.selection-bar .btn { padding: 11px 18px; font-size: .82rem; border-radius: 8px; }
.btn-primary { --bs-btn-bg: #176f77; --bs-btn-border-color: #176f77; --bs-btn-hover-bg: #115961; --bs-btn-hover-border-color: #115961; --bs-btn-disabled-bg: #176f77; --bs-btn-disabled-border-color: #176f77; --bs-btn-active-bg: #115961; }
.btn-dark { --bs-btn-bg: #283e4a; --bs-btn-border-color: #283e4a; }
:focus-visible { outline: 3px solid #3b949b; outline-offset: 3px; }
.download-loading-spinner { border-color: #dfefee; border-top-color: var(--portal-accent); }

@media (max-width: 1199.98px) {
  .portal-shell { padding-left: 26px; padding-right: 26px; }
  .library-summary { gap: 18px; padding: 23px; }
}
@media (max-width: 991.98px) {
  .portal-header-v2 {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #f7f9fa;
    box-shadow: 0 8px 14px -14px #182b3b55;
  }
  .portal-header-v2 .library-toolbar { flex-basis: 100%; max-width: none; }
  .library-intro { padding-top: 36px; }
  .library-summary { gap: 16px; }
  .summary-symbol { display: none; }
  .mobile-nav-panel .category-sidebar .card-body { padding: 12px 0 !important; }
  .selection-bar { left: 12px; right: 12px; bottom: 12px; max-height: 48vh; }
  .portal-shell:has(~ .selection-bar) { padding-bottom: 49vh; }
}
@media (max-width: 575.98px) {
  .portal-shell { padding: 0 18px 28px; }
  .portal-header-v2 { padding: 20px 0; }
  .header-brand { display: flex !important; gap: 13px !important; }
  .brand-logo-v2 { width: 78px; }
  .header-text { padding-left: 13px; }
  .portal-title { font-size: .79rem; }
  .portal-subtitle { font-size: .64rem; }
  .portal-home-link { display: none; }
  .mobile-menu-btn { padding: 5px 8px; border-color: #d6e1e4; margin: 0; }
  .library-intro { align-items: stretch; flex-direction: column; padding: 30px 0 24px; gap: 24px; }
  .library-intro h1 { font-size: 2.15rem; }
  .intro-eyebrow { font-size: .58rem; margin-bottom: 14px; }
  .library-intro p { font-size: .8rem; }
  .library-summary { padding: 15px 22px; justify-content: space-between; border-radius: 10px; }
  .library-summary strong { font-size: 1.2rem; }
  .library-summary div > span { font-size: .67rem; }
  .summary-symbol { display: block; font-size: 2rem; }
  .summary-divider { height: 30px; }
  .library-toolbar { padding: 7px; gap: 5px; margin-bottom: 0; }
  .library-toolbar .search-box { font-size: .74rem; min-width: 0; }
  .view-switch .btn { padding: 7px 9px; }
  .view-switch .btn span { display: none; }
  .library-results-heading { flex-wrap: wrap; margin-bottom: 16px; }
  .library-results-heading .small { font-size: .68rem; }
  .library-footer { flex-direction: column; gap: 7px; margin-top: 30px; }
  .selection-bar .btn { flex: 1; }
  .selection-bar .container-fluid { padding-left: 0; padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .file-card:hover { transform: none; }
}
