:root {
    --heritage: rgb(0 15 70);
    --heritage-dark: rgb(0 11 52);
    --heritage-75: rgb(64 75 116);
    --heritage-25: rgb(191 195 209);
    --blue-light: rgb(70 200 240);
    --blue-light-25: rgb(209 241 251);
    --sage: rgb(171 193 167);
    --sage-25: rgb(234 239 233);
    --grey-25: rgb(241 241 241);
    --grey-50: rgb(228 228 228);
    --grey-100: rgb(45 45 45);
    --green: rgb(44 66 29);
    --yellow: rgb(255 214 41);
    --red: rgb(120 0 13);
    --maroon: rgb(115 35 75);
    --white: #fff;
    --shadow: 0 22px 60px rgb(0 11 52 / 12%);
    --radius: 8px;
    --body-font: "Source Sans 3", "Gill Sans", "Trebuchet MS", Arial, sans-serif;
    --title-font: "Fraunces", Georgia, serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--grey-25);
    color: var(--heritage);
    font-family: var(--body-font);
    font-size: 16px;
    line-height: 1.55;
}

a {
    color: var(--heritage);
    font-weight: 700;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    background: var(--blue-light);
    color: var(--heritage);
    padding: .75rem 1rem;
    z-index: 20;
}

.skip-link:focus {
    top: 1rem;
}

.site-header {
    background: var(--heritage);
    color: var(--white);
}

.brand-bar,
.page-shell,
.site-footer {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.brand-bar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand {
    color: var(--white);
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 2px solid var(--blue-light);
    color: var(--blue-light);
    font-weight: 800;
    letter-spacing: 0;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--blue-light-25);
    font-weight: 500;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .5rem;
}

.main-nav a {
    color: var(--white);
    text-decoration: none;
    padding: .55rem .8rem;
    border-bottom: 3px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
    border-color: var(--blue-light);
    color: var(--blue-light);
}

.page-shell {
    padding: 2rem 0 4rem;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
    gap: 2rem;
    align-items: stretch;
    background: var(--heritage);
    color: var(--white);
    padding: clamp(2rem, 5vw, 4.5rem);
    border-bottom: 8px solid var(--blue-light);
}

.hero h1,
.section-heading h1 {
    margin: 0;
    max-width: 850px;
    font-family: var(--title-font);
    font-size: clamp(2.3rem, 5vw, 4.8rem);
    line-height: 1.02;
    letter-spacing: 0;
}

.hero .lead,
.section-heading p {
    max-width: 760px;
    font-size: 1.18rem;
}

.eyebrow {
    margin: 0 0 .75rem;
    color: var(--blue-light);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: 2rem;
}

.button,
button {
    border: 0;
    border-radius: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .72rem 1rem;
    font: 700 1rem/1 var(--body-font);
    text-decoration: none;
}

.button.primary {
    background: var(--blue-light);
    color: var(--heritage);
}

.button.secondary {
    background: var(--sage);
    color: var(--heritage);
}

.button.ghost,
.button.compact {
    background: var(--grey-50);
    color: var(--heritage);
}

.button.compact {
    min-height: 36px;
    padding: .45rem .75rem;
}

.button.full {
    width: 100%;
}

.login-panel,
.form-card {
    background: var(--white);
    color: var(--heritage);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.login-panel h2,
.form-card h2,
.course-card h2 {
    margin-top: 0;
}

label {
    display: grid;
    gap: .35rem;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--heritage-25);
    border-radius: 0;
    color: var(--heritage);
    font: 500 1rem/1.3 var(--body-font);
    min-height: 44px;
    padding: .65rem .75rem;
    background: var(--white);
}

textarea {
    resize: vertical;
}

form {
    display: grid;
    gap: 1rem;
}

.form-note,
.empty {
    color: var(--grey-100);
    margin-bottom: 0;
}

.section-heading {
    margin-bottom: 2rem;
}

.narrow {
    width: min(520px, 100%);
    margin: 0 auto;
}

.wide-form {
    width: min(900px, 100%);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.feature-grid,
.stat-grid,
.course-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.feature-grid article,
.stat-grid article,
.course-card,
.request-list article {
    background: var(--white);
    padding: 1.25rem;
    box-shadow: 0 1px 0 var(--grey-50);
}

.feature-grid article {
    border-top: 5px solid var(--sage);
}

.stat-grid article {
    border-top: 5px solid var(--blue-light);
}

.stat-grid span {
    display: block;
    font-family: var(--title-font);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.stat-grid p {
    margin: .5rem 0 0;
    font-weight: 700;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 1.5rem;
    align-items: start;
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.table-wrap {
    overflow-x: auto;
    background: var(--white);
    box-shadow: 0 1px 0 var(--grey-50);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

th,
td {
    padding: .8rem;
    text-align: left;
    border-bottom: 1px solid var(--grey-50);
    vertical-align: top;
}

th {
    background: var(--heritage);
    color: var(--white);
}

.course-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.course-card {
    display: grid;
    gap: 1rem;
    border-top: 5px solid var(--heritage);
}

.course-card form {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.course-code {
    color: var(--maroon);
    font-weight: 800;
}

.capacity {
    display: grid;
    gap: .35rem;
    font-weight: 700;
}

meter {
    width: 100%;
    height: 12px;
}

.status {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: .25rem .55rem;
    background: var(--grey-50);
    color: var(--heritage);
    font-weight: 800;
    text-transform: capitalize;
}

.status.enrolled,
.status.active,
.status.approved,
.status.completed {
    background: var(--sage-25);
    color: var(--green);
}

.status.waitlisted,
.status.in_review,
.status.submitted {
    background: var(--blue-light-25);
    color: var(--heritage);
}

.status.closed,
.status.inactive,
.status.declined,
.status.dropped {
    background: rgb(255 202 206);
    color: var(--red);
}

.request-list {
    display: grid;
    gap: 1rem;
}

.request-list article {
    border-left: 5px solid var(--blue-light);
}

.admin-note {
    background: var(--sage-25);
    padding: .8rem;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.5rem;
}

.tabs a {
    background: var(--white);
    color: var(--heritage);
    padding: .7rem 1rem;
    text-decoration: none;
    border-bottom: 4px solid transparent;
}

.tabs a.active {
    border-color: var(--blue-light);
    background: var(--heritage);
    color: var(--white);
}

.inline-form {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.admin-request-form {
    grid-template-columns: minmax(160px, .25fr) minmax(240px, 1fr) auto;
    align-items: end;
    margin-top: 1rem;
}

.flash {
    padding: .8rem 1rem;
    margin-bottom: 1rem;
    background: var(--blue-light-25);
    border-left: 5px solid var(--blue-light);
    font-weight: 700;
}

.flash-success {
    background: var(--sage-25);
    border-color: var(--sage);
}

.flash-danger {
    background: rgb(255 202 206);
    border-color: var(--red);
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 2rem 0;
    color: var(--white);
}

footer.site-footer {
    width: 100%;
    max-width: none;
    padding-left: max(16px, calc((100vw - 1180px) / 2));
    padding-right: max(16px, calc((100vw - 1180px) / 2));
    background: var(--heritage-dark);
}

.site-footer div {
    display: grid;
}

@media (max-width: 820px) {
    .brand-bar,
    .site-footer,
    .section-title-row,
    .inline-form,
    .admin-request-form {
        align-items: stretch;
        flex-direction: column;
    }

    .brand-bar,
    .site-footer {
        padding: 1rem 0;
    }

    .main-nav {
        justify-content: flex-start;
    }

    .hero,
    .two-column,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .feature-grid,
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .admin-request-form {
        grid-template-columns: 1fr;
    }
}

.portal-body {
    background: #f3f3f3;
    color: #586574;
    font-family: Arial, "Source Sans 3", sans-serif;
    overflow: hidden;
}

.portal-topbar {
    height: 52px;
    background: #202d3a;
    color: #c9d8e9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
}

.portal-logo {
    color: #9bc9ef;
    text-decoration: none;
    display: grid;
    line-height: 1.1;
}

.portal-logo strong {
    color: #ffb400;
    font-size: 20px;
    letter-spacing: 0;
}

.portal-logo span {
    font-size: 11px;
    font-weight: 400;
}

.portal-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.portal-tools a {
    color: #c9d8e9;
    text-decoration: none;
}

.notification-dot {
    min-width: 16px;
    height: 16px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: #fb6b5b;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.portal-avatar {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border: 2px solid #b6c8da;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
}

.portal-layout {
    height: calc(100vh - 52px);
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
}

.student-sidenav {
    background: #405b73;
    color: #bed5ee;
    min-height: 0;
    overflow-y: auto;
    position: relative;
}

.term-box {
    min-height: 50px;
    background: #87ca92;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
}

.term-box strong,
.term-box small {
    display: block;
}

.term-box small {
    opacity: .9;
    font-size: 11px;
}

.term-icon {
    font-size: 24px;
}

.student-sidenav nav {
    padding-bottom: 64px;
}

.side-home,
.side-group summary,
.side-group a {
    color: #bed5ee;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.side-home,
.side-group summary {
    padding-right: 16px;
    border-bottom: 1px solid rgb(255 255 255 / 5%);
}

.side-group summary {
    cursor: pointer;
    list-style: none;
}

.side-group summary::-webkit-details-marker {
    display: none;
}

.side-group summary::after {
    content: "⌄";
    margin-left: auto;
    color: #b7d6f0;
}

.side-group[open] summary::after {
    content: "⌃";
}

.side-icon {
    width: 43px;
    align-self: stretch;
    display: grid;
    place-items: center;
    color: #c8d8ea;
    border-left: 3px solid var(--item-color);
    border-right: 1px solid rgb(255 255 255 / 5%);
    flex: 0 0 auto;
}

.side-home.is-active,
.side-group a.is-active {
    background: rgb(0 0 0 / 13%);
    color: #fff;
}

.side-group ul {
    margin: 0;
    padding: 6px 0 8px 43px;
    background: rgb(0 0 0 / 11%);
}

.side-group li {
    list-style: none;
}

.side-group a {
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 600;
}

.side-group a span {
    font-size: 20px;
    line-height: 1;
}

.side-badge {
    background: #fb6b5b;
    color: #fff;
    border-radius: 12px;
    padding: 2px 7px;
    font-size: 11px;
}

.collapse-control {
    position: fixed;
    left: 205px;
    bottom: 8px;
    width: 30px;
    height: 30px;
    min-height: 30px;
    padding: 0;
    background: #293c51;
    color: #fff;
    border-radius: 2px;
}

.portal-main {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: 34px minmax(0, 1fr);
}

.portal-crumb {
    background: #fff;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: #596a7a;
    font-size: 13px;
}

.portal-content {
    min-height: 0;
    overflow: auto;
    padding: 20px 24px 32px;
}

.portal-content-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.portal-content-header h1 {
    margin: 0;
    color: #4f5f6f;
    font: 600 28px/1.15 Arial, sans-serif;
}

.portal-content-header p {
    margin: 4px 0 0;
}

.portal-content .eyebrow {
    color: #48b84f;
    font-size: 12px;
    margin: 0 0 4px;
}

.empty-page {
    background: #fff;
    border: 1px dashed #bfc7cf;
    padding: 32px;
}

.empty-page h2 {
    margin-top: 0;
    color: #4f5f6f;
}

.portal-panel,
.student-profile-card,
.portal-welcome {
    background: #fff;
    border: 1px solid #d7d7d7;
    box-shadow: 0 1px 2px rgb(0 0 0 / 4%);
}

.portal-panel {
    padding: 18px;
    margin-bottom: 18px;
}

.portal-panel h2,
.student-profile-card h2,
.portal-welcome h2 {
    margin: 0 0 12px;
    color: #536576;
    font: 600 20px/1.25 Arial, sans-serif;
}

.portal-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: start;
}

.portal-welcome {
    min-height: 170px;
    padding: 22px;
}

.portal-welcome h2 {
    color: #48b84f;
    font-size: 24px;
    margin-bottom: 4px;
}

.portal-welcome strong {
    display: block;
    color: #9a9a9a;
    font-size: 18px;
    margin-bottom: 18px;
}

.student-profile-card {
    padding: 18px;
}

.profile-avatar {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    border: 4px solid #e8e8e8;
    display: grid;
    place-items: center;
    background: #5cc6c6;
    color: #fff;
    font-weight: 800;
    font-size: 28px;
    margin-bottom: 10px;
}

.student-profile-card p {
    margin: 0 0 14px;
}

.mini-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #4cc0c1;
    color: #fff;
    text-align: center;
    margin: 14px 0 22px;
}

.mini-stats span {
    display: grid;
    gap: 2px;
    padding: 12px 6px;
    font-size: 12px;
    text-transform: uppercase;
}

.mini-stats span + span {
    border-left: 1px solid rgb(255 255 255 / 45%);
}

.mini-stats strong {
    font-size: 18px;
}

.student-profile-card dl {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 10px;
    margin: 0;
    font-size: 13px;
}

.student-profile-card dt {
    color: #9a9a9a;
    text-transform: uppercase;
}

.student-profile-card dd {
    margin: 0;
}

.portal-tabs-panel {
    margin-top: 18px;
}

.portal-stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.portal-stat-row article {
    background: #fff;
    border-top: 4px solid #4cc0c1;
    padding: 14px;
}

.portal-stat-row strong {
    display: block;
    color: #4cc0c1;
    font-size: 28px;
    line-height: 1;
}

.portal-stat-row span {
    color: #637384;
    font-weight: 700;
}

.portal-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.portal-table-wrap {
    background: #fff;
    border: 1px solid #d7d7d7;
    overflow-x: auto;
    margin-bottom: 18px;
}

.portal-table-wrap table {
    min-width: 620px;
}

.portal-table-wrap th {
    background: #e8e8e8;
    color: #22303d;
    font-size: 13px;
}

.portal-table-wrap td {
    color: #536576;
    background: #fff;
}

.portal-form {
    max-width: 820px;
}

.portal-form.wide-form {
    max-width: 980px;
}

.portal-form button {
    justify-self: start;
}

.compact-list {
    display: grid;
    gap: 10px;
}

.compact-list article {
    padding: 12px;
    border-left: 4px solid #4cc0c1;
    background: #f8f8f8;
}

.compact-list strong,
.compact-list span {
    display: block;
}

.compact-list span {
    color: #7d8791;
    font-size: 13px;
}

.portal-course-list,
.portal-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.portal-course-card {
    background: #fff;
    border: 1px solid #d7d7d7;
    border-top: 4px solid #4cc0c1;
    padding: 16px;
    display: grid;
    gap: 14px;
}

.portal-course-card h2 {
    margin: 5px 0;
    color: #536576;
    font-size: 18px;
}

.portal-course-card p {
    margin: 0 0 10px;
}

.portal-course-card form {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.portal-course-card meter,
.gpa-bars meter {
    width: 100%;
    height: 14px;
}

.program-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.program-chart article {
    border: 1px solid #d7d7d7;
    padding: 16px;
    background: #f8f8f8;
}

.program-chart article.done {
    border-color: #62bd6d;
    background: #eaf7ec;
}

.program-chart strong,
.program-chart span {
    display: block;
}

.gpa-bars {
    display: grid;
    gap: 12px;
}

.gpa-bars label {
    display: grid;
    grid-template-columns: 140px 42px 1fr;
    align-items: center;
}

.finance-total {
    border-top: 4px solid #4cc0c1;
}

.finance-total strong {
    display: block;
    color: #4cc0c1;
    font-size: 42px;
    line-height: 1;
}

.announcement-list {
    max-width: 760px;
}

@media (max-width: 900px) {
    .portal-body {
        overflow: auto;
    }

    .portal-layout {
        height: auto;
        grid-template-columns: 1fr;
    }

    .student-sidenav {
        max-height: 55vh;
    }

    .portal-main {
        display: block;
    }

    .collapse-control {
        display: none;
    }

    .portal-topbar,
    .portal-content-header {
        flex-direction: column;
        align-items: stretch;
        height: auto;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .portal-dashboard,
    .portal-grid-2,
    .portal-stat-row,
    .gpa-bars label {
        grid-template-columns: 1fr;
    }
}
