.portal-app {
  --blue: #096cb5;
  --deep: #092c50;
  --pink: #0d78bd;
  --sky: #eaf5fc;
  --paper: #f3f8fc;
  --line: #d9e6ef;
  color: #18364d;
  background: var(--paper);
}

.portal-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.portal-sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding: 25px 17px 18px; color: #eaf5ff; background: #082a4b; }
.portal-brand { display: flex; align-items: center; gap: 11px; min-height: 69px; padding: 4px 8px 17px; color: #fff; border-bottom: 1px solid #ffffff20; }
.portal-brand:hover { text-decoration: none; }
.portal-brand img { width: 54px; height: 54px; flex: none; object-fit: contain; filter: drop-shadow(0 3px 5px #001b3699); }
.portal-brand strong { display: block; max-width: 158px; font-size: 14px; line-height: 1.2; }
.portal-brand small { display: block; margin-top: 3px; color: #a9cce6; font-size: 11px; }
.portal-menu-toggle { display: none; }
.sidebar-label { margin: 25px 12px 9px; color: #7eacd0; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.portal-app .portal-nav { display: grid; gap: 4px; padding: 0; background: transparent; border: 0; }
.portal-nav-link { min-height: 43px; display: flex; align-items: center; gap: 11px; padding: 7px 11px; border-radius: 9px; color: #d2e4f3; font-size: 13px; font-weight: 650; }
.portal-nav-link:hover { color: #fff; background: #ffffff13; text-decoration: none; }
.portal-nav-link.is-active { color: #fff; background: #166ba8; box-shadow: inset 3px 0 #73caff; }
.nav-icon { width: 25px; height: 25px; flex: none; display: grid; place-items: center; border-radius: 7px; color: #a8d6f5; background: #ffffff12; font-size: 14px; font-weight: 800; line-height: 1; }
.is-active .nav-icon { color: #fff; background: #ffffff22; }
.sidebar-person { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 17px 8px 0; border-top: 1px solid #ffffff20; font-size: 12px; }
.sidebar-person strong { display: block; max-width: 155px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-person small { color: #a9cce6; font-size: 11px; margin: 2px 0 0; }
.person-avatar { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #1681c5; font-weight: 800; }

.portal-app .portal-main { min-width: 0; width: 100%; max-width: none; margin: 0; padding: 0; }
.portal-topbar { display: flex; justify-content: space-between; align-items: center; min-height: 68px; padding: 10px clamp(22px, 3vw, 48px); border-bottom: 1px solid var(--line); background: #fff; color: #526c80; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.portal-topbar form { margin: 0; }
.portal-app .portal-signout { min-height: 34px; padding: 7px 13px; border: 1px solid #cadeec; border-radius: 8px; color: #17496c; background: #f5fbff; font-size: 12px; }
.portal-inner { max-width: 1450px; margin: 0 auto; padding: 33px clamp(22px, 3vw, 48px) 70px; }
.portal-app .page-title { margin-bottom: 24px; }
.portal-app h1 { color: #0a3156; font-size: clamp(27px, 2.5vw, 34px); letter-spacing: -.025em; }
.portal-app h2 { color: #123d60; }
.portal-app .eyebrow { color: #357fae; font-size: 11px; letter-spacing: .14em; }
.portal-app .panel { border-color: #dce9f2; border-radius: 14px; box-shadow: 0 8px 25px #113b5a0a; }
.portal-app .tabs .active { background: #0b73b8; border-color: #0b73b8; }
.portal-app .metrics div { background: #e5f3fc; }
.portal-app .button:focus-visible, .portal-app button:focus-visible, .portal-app a:focus-visible, .portal-app summary:focus-visible { outline: 3px solid #69bcea; outline-offset: 3px; }

.home-intro { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 31px 34px; border: 1px solid #c8e2f4; border-radius: 18px; background: linear-gradient(110deg, #e0f2ff, #f9fdff 74%); }
.home-kicker { margin: 0 0 10px; color: #287cae; font-size: 10px; font-weight: 800; letter-spacing: .17em; }
.home-intro h2 { margin: 0 0 7px; font-size: clamp(22px, 2.2vw, 29px); letter-spacing: -.025em; }
.home-intro p:last-child { margin: 0; color: #5d7384; font-size: 14px; }
.home-term { min-width: 215px; padding: 16px 18px; border: 1px solid #cce1f0; border-radius: 12px; background: #fff; }
.home-term span, .home-term strong { display: block; }
.home-term span { color: #6b8799; font-size: 11px; }
.home-term strong { margin-top: 5px; color: #124c76; font-size: 15px; }
.home-overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 19px 0 32px; }
.home-overview > div { min-height: 96px; padding: 19px 21px; border: 1px solid #dce9f2; border-radius: 13px; background: #fff; }
.home-overview strong { display: block; color: #0a426d; font-size: 23px; line-height: 1.15; }
.home-overview span { display: block; margin-top: 7px; color: #718697; font-size: 12px; }
.home-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.home-section-title h2 { margin: 0; font-size: 20px; }
.home-section-title p { margin: 0; color: #718697; font-size: 12px; }
.hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 17px; }
.portal-app .hub-card { margin: 0; padding: 0; border: 1px solid #d6e6f1; border-radius: 15px; background: #fff; box-shadow: 0 7px 22px #143e600b; overflow: hidden; }
.portal-app .hub-card:first-child { border: 1px solid #d6e6f1; padding: 0; }
.portal-app .hub-card[open] { border-color: #98cdeb; box-shadow: 0 10px 27px #0b6da416; }
.portal-app .hub-card summary { display: flex; align-items: center; gap: 15px; min-height: 98px; margin: 0; padding: 20px 22px; color: #113b5d; list-style: none; cursor: pointer; }
.portal-app .hub-card summary::-webkit-details-marker { display: none; }
.portal-app .hub-card summary:hover { background: #f8fcff; }
.hub-icon { width: 49px; height: 49px; flex: none; display: grid; place-items: center; border-radius: 12px; color: #086dab; background: #e4f4fd; font-size: 22px; font-weight: 750; }
.hub-title { flex: 1; min-width: 0; }
.hub-title strong, .hub-title small { display: block; }
.hub-title strong { font-size: 16px; }
.hub-title small { margin-top: 4px; color: #718697; font-size: 12px; }
.hub-chevron { flex: none; color: #5092b9; font-size: 25px; line-height: 1; transition: transform .2s; }
.hub-card[open] .hub-chevron { transform: rotate(180deg); }
.subcard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 20px 20px; border-top: 1px solid #e8f1f7; padding-top: 17px; }
.subcard, .portal-app button.subcard { display: block; width: 100%; min-height: 75px; padding: 13px 14px; border: 1px solid #dcebf4; border-radius: 10px; background: #f7fbfe; color: #1c5177; text-align: left; font: inherit; }
.subcard:hover, .portal-app button.subcard:hover { border-color: #83c5eb; background: #edf8ff; text-decoration: none; }
.subcard strong, .subcard span { display: block; }
.subcard strong { font-size: 12px; line-height: 1.35; }
.subcard span { margin-top: 5px; color: #758b9b; font-size: 11px; line-height: 1.35; }
.subcard-form { margin: 0; }
.hub-empty { grid-column: 1 / -1; margin: 0; color: #6d8495; font-size: 13px; }
.report-back { display: flex; align-items: center; gap: 17px; margin: -4px 0 22px; font-size: 13px; }
.report-back a { font-weight: 750; }
.report-back p { margin: 0; color: #748898; }
.portal-app .filters form { flex-wrap: wrap; }
.portal-app .filters label { min-width: 145px; }
.portal-app .filters > label { min-width: 205px; }
.portal-app .metrics { gap: 13px; }
.portal-app .metrics div { border-left-color: #1387c8; }

.access-fieldset { min-width: 0; padding: 18px; border: 1px solid #d8e8f2; border-radius: 10px; }
.access-fieldset legend { padding: 0 7px; color: #19496c; font-size: 13px; font-weight: 750; }
.access-fieldset p { margin: 0 0 13px; color: #718697; font-size: 12px; }
.access-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.portal-app .access-choice { display: flex; align-items: center; gap: 9px; min-height: 41px; padding: 8px 10px; border: 1px solid #dceaf3; border-radius: 8px; background: #f8fcff; color: #224f70; cursor: pointer; }
.access-choice input { width: 17px; height: 17px; min-height: 17px; margin: 0; padding: 0; flex: none; accent-color: #0b73b8; }
.access-choice span { font-size: 12px; }
.access-choice.is-unavailable { opacity: .43; cursor: not-allowed; }
.portal-app .permissions-panel { border-color: #a8d4ec; }
.portal-app .permissions-panel .stack button { justify-self: start; }

@media (max-width: 1080px) {
  .portal-shell { grid-template-columns: 225px minmax(0, 1fr); }
  .portal-sidebar { padding-inline: 12px; }
  .hub-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .portal-shell { display: block; }
  .portal-sidebar { position: static; height: auto; overflow: visible; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 9px 15px; }
  .portal-brand { min-height: 50px; padding: 0 3px 8px; border: 0; }
  .portal-brand img { width: 42px; height: 42px; }
  .portal-brand strong { max-width: none; }
  .portal-menu-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 35px; padding: 7px 10px; border: 1px solid #ffffff55; border-radius: 8px; color: #fff; background: #ffffff12; font-size: 12px; }
  .portal-app .portal-menu-toggle:hover, .portal-app .portal-menu-toggle:focus { color: #fff; background: #145780; }
  .sidebar-navigation { display: none; grid-column: 1 / -1; padding: 6px 0 9px; }
  .portal-sidebar.is-open .sidebar-navigation { display: block; }
  .portal-sidebar .sidebar-label { margin: 13px 4px 5px; }
  .sidebar-person { display: none; }
  .portal-app .portal-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; overflow: visible; padding: 4px 0; }
  .portal-nav-link { min-height: 35px; padding: 6px 9px; font-size: 11px; }
  .nav-icon { width: 20px; height: 20px; font-size: 11px; }
  .portal-topbar { min-height: 48px; padding: 7px 20px; }
  .portal-inner { padding: 23px 18px 55px; }
  .home-intro { padding: 24px; }
  .home-term { min-width: 170px; }
}
@media (max-width: 560px) {
  .home-intro { display: block; }
  .home-term { margin-top: 20px; }
  .home-overview { gap: 7px; }
  .home-overview > div { min-height: 80px; padding: 13px 10px; }
  .home-overview strong { font-size: 16px; }
  .home-overview span { font-size: 10px; }
  .home-section-title { display: block; }
  .home-section-title p { margin-top: 3px; }
  .subcard-grid, .access-grid { grid-template-columns: 1fr; }
  .report-back { display: block; }
  .report-back p { margin-top: 5px; }
  .portal-app .filters > label { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .hub-chevron { transition: none; } }
