/* Loaded only on the redesigned portal pages; exam and certificate layouts are isolated. */
.portal-header.header-wrapper { padding: 24px 20px 22px; }
.portal-header .site-name h1 a { font: 700 30px/1.2 Arial, sans-serif; letter-spacing: 3px; }
.portal-header .site-name h2 { color: #5b6f80; font: 14px/1.5 Arial, sans-serif; margin-top: 7px; }
.portal-menu.menu { height: auto; min-height: 54px; background: #00608b; }
.portal-menu .navbar-nav > li > a { padding: 17px 22px; font-size: 13px; letter-spacing: .25px; }
.portal-menu .navbar-nav > li > a:hover, .portal-menu .navbar-nav > li > a:focus { color: #fff; background: #004e73; transition: none; }
.portal-menu .navbar-toggle { color: white; border: 1px solid #7fbbd0; }
.portal-menu.menu .navbar { display: block !important; }
.portal-menu .navbar-toggle .portal-icon { width: 17px; height: 17px; margin-left: 8px; }
.portal { color: #20394b; background: #f4f7fa; font: 15px/1.6 Arial, sans-serif; padding: 36px 0 60px; min-height: 65vh; }
.portal *, .portal *::before, .portal *::after { box-sizing: border-box; }
.portal [hidden] { display: none !important; }
.portal .container { width: calc(100% - 48px); max-width: 1180px; padding: 0; }
.portal h1, .portal h2, .portal h3, .portal p { margin: 0; padding: 0; }
.portal a { color: #00608b; }
.portal a:hover { text-decoration: none; }
.portal nav a { margin: 0; text-transform: none; letter-spacing: normal; text-shadow: none; font-size: inherit; font-weight: inherit; }
.portal .container > header { padding: 0; text-align: left; color: #20394b; font-family: Arial, sans-serif; margin: 0 0 25px; }
.portal .container > header h1 { font-size: clamp(25px, 3vw, 34px); line-height: 1.25; font-weight: 700; }
.portal .container > header .portal-eyebrow { font-size: 11px; color: #00608b; padding: 0; }
.portal .container > section { padding: 0; text-align: left; margin: 42px 0 0; }
.portal .container > .portal-library-only { margin-top: 0; }
.portal a:focus-visible, .portal button:focus-visible, .portal input:focus-visible, .portal summary:focus-visible { outline: 3px solid #e3a02c; outline-offset: 4px; }
.portal-icon { display: inline-block; flex: 0 0 auto; vertical-align: middle; }
.portal-eyebrow { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1.7px; color: #00608b; text-transform: uppercase; margin-bottom: 7px; }
.portal-page-heading { margin-bottom: 25px; }
.portal-page-heading h1 { font-size: clamp(25px, 3vw, 34px); line-height: 1.25; font-weight: 700; letter-spacing: -.7px; max-width: 830px; }
.portal-page-heading > p { color: #5b6f80; margin-top: 9px; max-width: 730px; }
.portal-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 23px; font-size: 12px; color: #5b6f80; }
.portal-breadcrumb .portal-icon { width: 13px; height: 13px; }
.portal-breadcrumb a:hover { text-decoration: underline; }
.portal-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.portal-card { display: flex; flex-direction: column; min-width: 0; padding: 24px; background: white; color: #20394b !important; border: 1px solid #dce5ec; border-radius: 12px; box-shadow: 0 3px 8px #173b5010; transition: border-color .15s, box-shadow .15s, transform .15s; }
.portal-card:hover { border-color: #72a9bf; box-shadow: 0 8px 20px #173b5018; transform: translateY(-2px); }
.portal-card-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 22px; }
.portal-icon-tile { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 11px; color: #00608b; background: #eaf3f8; }
.portal-card h2 { font-size: 18px; line-height: 1.35; font-weight: 700; margin-bottom: 10px; overflow-wrap: break-word; }
.portal-card p { font-size: 13px; line-height: 1.65; color: #5b6f80; margin-bottom: 24px; }
.portal-card-action { margin-top: auto; padding-top: 17px; border-top: 1px solid #e7edf2; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 700; color: #00608b; }
.portal-card-action .portal-icon { width: 18px; height: 18px; }
.portal-card-primary { background: #00608b; border-color: #00608b; color: #fff !important; }
.portal-card-primary .portal-icon-tile { background: #ffffff20; color: #fff; }
.portal-card-primary p { color: #e0eef5; }
.portal-card-primary .portal-card-action { border-color: #ffffff40; color: #fff; }
.portal-badge { border: 1px solid #dce5ec; border-radius: 5px; padding: 3px 7px; font-size: 11px; color: #5b6f80; white-space: nowrap; }
.portal-course-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.portal-course-grid .portal-card { padding: 22px; }
.portal-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.portal-section-heading h2 { font-size: 24px; line-height: 1.3; font-weight: 700; letter-spacing: -.4px; }
.portal-section-heading p { color: #5b6f80; font-size: 13px; margin-top: 5px; }
.portal-library { margin-top: 42px; }
.portal-library-only { margin-top: 0; }
.portal-search { width: 250px; flex: 0 0 auto; }
.portal-search-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.portal-search-field { position: relative; display: flex; align-items: center; }
.portal-search-field > .portal-icon { position: absolute; top: 50%; left: 12px; transform: translateY(-50%); width: 16px; height: 16px; color: #688295; pointer-events: none; }
.portal-search input { box-sizing: border-box; width: 100%; height: 36px; border: 1px solid #cad9e4; border-radius: 18px; padding: 6px 30px 6px 34px; color: #20394b; background: #fff; font: 13px Arial, sans-serif; transition: border-color .15s, box-shadow .15s; }
.portal-search input:focus { border-color: #00608b; box-shadow: 0 0 0 3px rgba(0, 96, 139, 0.15); outline: none; }
.portal-search input::-webkit-search-cancel-button { display: none; }
.portal-search button { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); height: 24px; width: 24px; border: 0; border-radius: 50%; background: transparent; color: #688295; font-size: 18px; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.portal-search button:hover { background: #eaf0f4; color: #20394b; }
.portal-resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: start; }
.portal-resource-group { min-width: 0; background: #fff; border: 1px solid #dce5ec; border-radius: 10px; overflow: hidden; }
.portal-group-heading { display: flex; align-items: center; gap: 12px; padding: 20px 18px; border-bottom: 1px solid #e7edf2; }
.portal-group-heading > div { flex: 1; min-width: 0; }
.portal-group-heading .portal-icon-tile { width: 36px; height: 36px; border-radius: 8px; }
.portal-group-heading .portal-icon { width: 20px; height: 20px; }
.portal-group-heading h3 { font-size: 15px; font-weight: 700; line-height: 1.45; }
.portal-group-heading p { font-size: 11px; color: #5b6f80; margin-top: 3px; }
.portal-count { font-size: 11px; border-radius: 20px; background: #f0f4f7; color: #526b7d; padding: 2px 8px; }
.portal-resource-list { list-style: none; padding: 0; margin: 0; }
.portal-resource-list li + li { border-top: 1px solid #edf1f5; }
.portal-resource-link { display: flex; align-items: center; gap: 12px; padding: 17px 18px; min-height: 78px; }
.portal-resource-link:hover { background: #f0f7fb; }
.portal-resource-link:focus-visible { outline-offset: -3px; }
.portal-file-icon { color: #8b6982; background: #f7f0f4; width: 30px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 5px; flex: 0 0 auto; }
.portal-file-icon .portal-icon { width: 18px; height: 18px; }
.portal-resource-copy { min-width: 0; flex: 1; }
.portal-resource-title { display: block; font-size: 13px; line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
.portal-meta { display: block; font-size: 10px; color: #637889; margin-top: 5px; letter-spacing: .3px; }
.portal-open { flex: 0 0 auto; color: #6c8799; }
.portal-open .portal-icon { width: 15px; height: 15px; }
.portal-search-status { margin: -8px 0 16px !important; color: #5b6f80; font-size: 13px; }
.portal-empty, .portal-empty-group { padding: 26px !important; color: #5b6f80; font-size: 13px; }
.portal-empty { text-align: center; background: white; border: 1px dashed #cad9e4; border-radius: 10px; }
.portal-empty h3 { font-size: 18px; margin: 12px 0 6px; }
.portal-notice { border: 1px solid #c5dde9; background: #eaf4fa; border-radius: 10px; margin-bottom: 30px; }
.portal-notice summary { display: flex; align-items: center; gap: 14px; padding: 18px 22px; cursor: pointer; list-style: none; }
.portal-notice summary::-webkit-details-marker { display: none; }
.portal-notice summary > .portal-icon:first-child { color: #00608b; }
.portal-notice-copy { flex: 1; min-width: 0; }
.portal-notice-copy strong { display: block; font-size: 14px; }
.portal-notice-copy span { display: block; font-size: 12px; color: #516e83; margin-top: 2px; }
.portal-notice-action { font-size: 12px; font-weight: 700; color: #00608b; }
.portal-notice summary > .portal-icon:last-child { width: 17px; height: 17px; }
.portal-notice[open] summary > .portal-icon:last-child { transform: rotate(180deg); }
.portal-notice-body { border-top: 1px solid #c5dde9; padding: 22px 60px; font-size: 14px; }
.portal-notice-body p + p { margin-top: 14px; }
.portal-footnote { margin-top: 22px !important; color: #637889; font-size: 12px; }

/* Buttons */
.portal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 700;
    font-family: Arial, sans-serif;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none !important;
    transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.portal-btn .portal-icon { width: 16px; height: 16px; }
.portal-btn-primary { background: #00608b; color: #fff !important; border-color: #00608b; }
.portal-btn-primary:hover { background: #004e73; border-color: #004e73; }
.portal-btn-secondary { background: #fff; color: #20394b !important; border-color: #cad9e4; }
.portal-btn-secondary:hover { background: #f0f5f9; border-color: #b3c8d7; }
.portal-btn-lg { padding: 13px 26px; font-size: 15px; border-radius: 8px; }
.portal-btn-link { background: transparent; color: #00608b !important; padding: 9px 12px; }
.portal-btn-link:hover { text-decoration: underline !important; }

/* Test Sticky Toolbar */
.portal-test-toolbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    border: 1px solid #dce5ec;
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 24px;
    box-shadow: 0 4px 14px rgba(23, 59, 80, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.portal-test-toolbar-left, .portal-test-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.portal-test-progress {
    font-size: 13px;
    color: #4a6375;
    background: #f0f5f9;
    padding: 6px 12px;
    border-radius: 20px;
}
.portal-test-progress strong {
    color: #00608b;
}
.portal-test-section-heading {
    margin: 36px 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #00608b22;
}
.portal-test-section-heading h2 {
    font-size: 20px;
    font-weight: 700;
    color: #20394b;
    margin-bottom: 4px;
}
.portal-test-section-heading p {
    font-size: 13px;
    color: #5b6f80;
    margin: 0;
}

/* Question Cards */
.portal-test-question {
    background: #fff;
    border: 1px solid #dce5ec;
    border-radius: 10px;
    padding: 22px 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(23, 59, 80, 0.04);
    transition: border-color .15s;
}
.portal-test-question:focus-within {
    border-color: #8bbad0;
}
.portal-question-header {
    margin-bottom: 16px;
}
.portal-question-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.portal-question-num {
    font-size: 12px;
    font-weight: 700;
    color: #00608b;
    background: #eaf3f8;
    padding: 3px 8px;
    border-radius: 4px;
}
.portal-question-id {
    font-size: 11px;
    color: #7b909f;
}
.portal-badge-single {
    background: #f0f7f4;
    color: #2e6b4e;
    border: 1px solid #c9e6d7;
}
.portal-badge-multi {
    background: #fcf4ea;
    color: #925816;
    border: 1px solid #f3dcbe;
}
.portal-question-text {
    font-size: 15px;
    line-height: 1.5;
    font-weight: 600;
    color: #20394b;
    margin: 0;
}
.portal-choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.portal-choice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid #e5edf2;
    border-radius: 8px;
    background: #fbfdfe;
    cursor: pointer;
    transition: background-color .12s, border-color .12s;
    margin: 0;
    font-weight: normal;
}
.portal-choice:hover {
    background: #f0f6fa;
    border-color: #b7d3e3;
}
.portal-choice input {
    margin-top: 3px !important;
    cursor: pointer;
    flex: 0 0 auto;
}
.portal-choice input:checked ~ .portal-choice-label {
    font-weight: 600;
    color: #164058;
}
.portal-choice-label {
    flex: 1;
    font-size: 13.5px;
    line-height: 1.45;
    color: #334e61;
}
.portal-choice-correct {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e6f6ec;
    color: #1e7040;
    border: 1px solid #bce6ca;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    flex: 0 0 auto;
    align-self: center;
}
.portal-choice-correct .portal-icon {
    width: 14px;
    height: 14px;
}

/* Case Study Blocks */
.portal-case-study {
    background: #f6fafc;
    border: 1px solid #c9e0ed;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 28px;
}
.portal-case-study-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #00608b;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}
.portal-case-study-badge .portal-icon {
    width: 15px;
    height: 15px;
}
.portal-case-study-text {
    font-size: 14.5px;
    line-height: 1.65;
    color: #1f3747;
    background: #fff;
    border: 1px solid #dce5ec;
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 20px;
}
.portal-case-study-questions .portal-test-question {
    background: #fff;
    border-left: 3px solid #00608b;
}

.portal-test-footer-actions {
    background: #fff;
    border: 1px solid #dce5ec;
    border-radius: 10px;
    padding: 24px;
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Submission Loader */
.portal-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 39, 54, 0.72);
    backdrop-filter: blur(3px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.portal-modal-content {
    background: #fff;
    padding: 36px 42px;
    border-radius: 14px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.25);
    text-align: center;
    max-width: 420px;
    width: 90%;
}
.portal-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #dce8ef;
    border-top-color: #00608b;
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: portalSpin .8s linear infinite;
}
@keyframes portalSpin {
    to { transform: rotate(360deg); }
}
.portal-modal-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: #20394b;
    margin-bottom: 8px;
}
.portal-modal-content p {
    font-size: 13px;
    color: #617b8d;
    margin: 0;
}

/* Evaluation Results Styles */
.portal-result-banner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px 28px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid transparent;
}
.portal-result-pass {
    background: #edf8f2;
    border-color: #a8dfbd;
    color: #185a33;
}
.portal-result-fail {
    background: #fdf1f1;
    border-color: #f2bcbc;
    color: #8c2525;
}
.portal-result-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    flex: 0 0 auto;
}
.portal-result-pass .portal-result-icon {
    background: #28a745;
    color: #fff;
}
.portal-result-fail .portal-result-icon {
    background: #dc3545;
    color: #fff;
}
.portal-result-banner h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}
.portal-result-banner p {
    font-size: 14px;
    margin: 0;
    opacity: .92;
}

.portal-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}
.portal-metric-card {
    background: #fff;
    border: 1px solid #dce5ec;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}
.portal-metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.portal-metric-title {
    font-size: 13px;
    font-weight: 700;
    color: #5b6f80;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.portal-metric-status {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
}
.portal-metric-pass { background: #e6f6ec; color: #1e7040; }
.portal-metric-fail { background: #fbebee; color: #a42c3b; }
.portal-metric-value {
    font-size: 28px;
    font-weight: 700;
    color: #20394b;
    line-height: 1.1;
    margin-bottom: 4px;
}
.portal-metric-percent {
    font-size: 14px;
    font-weight: 600;
    color: #00608b;
    margin-bottom: 8px;
}
.portal-metric-note {
    font-size: 11px;
    color: #7b909f;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #edf1f5;
}

.portal-results-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid #dce5ec;
}

.portal-review-legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 12px 18px;
    background: #fff;
    border: 1px solid #dce5ec;
    border-radius: 8px;
    font-size: 12px;
}
.portal-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.portal-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.portal-dot-correct { background: #28a745; }
.portal-dot-custom { background: #dc3545; }
.portal-dot-explain { background: #00608b; }

.portal-wrong-question-card {
    background: #fff;
    border: 1px solid #dce5ec;
    border-left: 4px solid #dc3545;
    border-radius: 8px;
    padding: 20px 22px;
    margin-bottom: 18px;
}
.portal-wrong-question-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #20394b;
    margin-bottom: 14px;
    line-height: 1.45;
}
.portal-answer-row {
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.5;
}
.portal-answer-label {
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
    display: block;
    margin-bottom: 3px;
}
.portal-answer-correct .portal-answer-label { color: #1e7040; }
.portal-answer-correct {
    background: #f0f9f3;
    border: 1px solid #c8ebd5;
    border-radius: 6px;
    padding: 8px 12px;
    color: #175a32;
}
.portal-answer-custom .portal-answer-label { color: #9c2727; }
.portal-answer-custom {
    background: #fdf2f2;
    border: 1px solid #f6caca;
    border-radius: 6px;
    padding: 8px 12px;
    color: #8c2525;
}
.portal-answer-explain {
    background: #f2f7fb;
    border: 1px solid #c9e0ed;
    border-radius: 6px;
    padding: 10px 14px;
    color: #18435d;
    font-size: 12.5px;
    line-height: 1.55;
    margin-top: 12px;
}
.portal-answer-explain strong {
    color: #00608b;
}

/* Site Footer */
.site-footer.footer-wrapper {
    background: #eef3f7;
    border-top: 1px solid #d8e2ea;
    color: #4a6375;
    padding: 36px 0 28px;
    font-family: Arial, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    margin-top: 50px;
    clear: both;
}
.site-footer .site-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    flex-wrap: wrap;
}
.site-footer-brand {
    max-width: 520px;
}
.site-footer-title {
    font-size: 16px;
    font-weight: 700;
    color: #00608b;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}
.site-footer-desc {
    color: #5c7282;
    font-size: 12px;
    line-height: 1.6;
    margin: 0;
}
.site-footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}
.site-footer-links a {
    color: #00608b;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: color .15s;
}
.site-footer-links a:hover {
    color: #004564;
    text-decoration: underline;
}
.site-footer-divider {
    height: 1px;
    background: #d8e2ea;
    margin: 22px 0 18px;
}
.site-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #6c8291;
}
.site-footer-copy {
    font-weight: 500;
}
.site-footer-address {
    font-size: 11px;
    color: #7b909f;
}
@media (max-width: 1000px) {
    .portal-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .portal-menu .navbar-header { padding: 5px 0; }
    .portal-menu .navbar-collapse .navbar-nav { float: none !important; text-align: left !important; }
    .portal-menu.menu .nav > li { background: transparent !important; }
    .portal-menu.menu .nav > li > a:hover, .portal-menu.menu .nav > li > a:focus { color: #fff !important; background: #004e73; }
}
@media (max-width: 600px) {
    .portal { padding: 25px 0 38px; }
    .portal .container { width: calc(100% - 32px); }
    .portal-header.header-wrapper { padding: 18px 16px; }
    .portal-header .site-name h1 a { font-size: 25px; }
    .portal-header .site-name h2 { font-size: 12px; }
    .portal-card-grid, .portal-resource-grid { grid-template-columns: 1fr; gap: 14px; }
    .portal-card { padding: 20px; }
    .portal-card-top { margin-bottom: 16px; }
    .portal-card p { margin-bottom: 18px; }
    .portal-section-heading { align-items: stretch; flex-direction: column; gap: 16px; }
    .portal-search { width: 100%; }
    .portal-notice summary { padding: 16px; gap: 10px; flex-wrap: wrap; }
    .portal-notice-action { display: none; }
    .portal-notice-body { padding: 18px; }
    .portal-menu .navbar-nav > li > a { padding: 13px 16px; }
    .portal-metrics-grid { grid-template-columns: 1fr; }
    .portal-test-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
    .portal-test-toolbar-left, .portal-test-toolbar-right { justify-content: space-between; width: 100%; }
    .portal-test-question { padding: 16px; }
    .portal-case-study { padding: 16px; }
    .portal-result-banner { flex-direction: column; text-align: center; padding: 20px 16px; }
    .site-footer .site-footer-row { flex-direction: column; gap: 20px; }
    .site-footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
    .portal-filter-bar { flex-direction: column; align-items: stretch; }
    .portal-table th, .portal-table td { padding: 10px 12px; font-size: 12px; }
}

/* Portal Table Styles */
.portal-table-container {
    background: #fff;
    border: 1px solid #dce5ec;
    border-radius: 10px;
    overflow-x: auto;
    box-shadow: 0 2px 6px rgba(23, 59, 80, 0.04);
    margin-bottom: 24px;
}
.portal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    color: #20394b;
    margin: 0;
}
.portal-table th {
    background: #f6fafc;
    border-bottom: 1px solid #dce5ec;
    padding: 13px 16px;
    font-weight: 700;
    font-size: 12px;
    color: #486581;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: .4px;
    white-space: nowrap;
}
.portal-table td {
    padding: 13px 16px;
    border-bottom: 1px solid #edf1f5;
    vertical-align: middle;
}
.portal-table tbody tr:last-child td {
    border-bottom: none;
}
.portal-table tbody tr:hover {
    background: #f8fbfe;
}
.portal-table th.sortable {
    cursor: pointer;
    user-select: none;
}
.portal-table th.sortable:hover {
    color: #00608b;
    background: #eef5f9;
}

/* Filter Bar & Pills */
.portal-filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 18px;
}
.portal-pills {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}
.portal-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 20px;
    border: 1px solid #cad9e4;
    background: #fff;
    color: #486581;
    cursor: pointer;
    text-decoration: none !important;
    transition: all .15s;
    user-select: none;
}
.portal-pill:hover {
    background: #f0f6fa;
    color: #00608b;
    border-color: #a4c7dc;
}
.portal-pill.active {
    background: #00608b;
    color: #fff;
    border-color: #00608b;
}
.portal-select {
    padding: 7px 12px;
    border: 1px solid #cad9e4;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    color: #20394b;
}

/* Pagination */
.portal-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 18px 0;
    font-size: 13px;
    color: #627d98;
}
.portal-pagination-pages {
    display: flex;
    gap: 4px;
    align-items: center;
}
.portal-page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid #cad9e4;
    background: #fff;
    color: #20394b;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}
.portal-page-btn:hover {
    background: #f0f6fa;
    border-color: #00608b;
    color: #00608b;
}
.portal-page-btn.active {
    background: #00608b;
    border-color: #00608b;
    color: #fff;
}
.portal-page-btn[disabled] {
    opacity: .45;
    cursor: not-allowed;
}

/* Capacity Badges */
.portal-badge-capacity {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}
.portal-capacity-open {
    background: #e6f6ec;
    color: #1e7040;
    border: 1px solid #bce6ca;
}
.portal-capacity-full {
    background: #fbebee;
    color: #a42c3b;
    border: 1px solid #f2c0c7;
}

@media (prefers-reduced-motion: reduce) {
    .portal-card { transition: none; }
    .portal-card:hover { transform: none; }
}
