.portal-auth-tabs li { padding-bottom: 0; }
.portal-auth-tabs li::after { pointer-events: none; }
.portal-auth-tabs a {
    display: block;
    width: 100%;
    padding: 4px 12px 14px;
    color: #4b5d72;
    text-decoration: none;
}
.portal-auth-tabs a[aria-current="page"] { color: #172033; }
.portal-auth-tabs a:hover { color: #124fae; }

.exam-registration {
    width: 100%;
    max-width: 1180px;
    margin-inline: auto;
    padding: clamp(16px, 4vw, 38px) clamp(12px, 3vw, 26px);
}
.applicant-actions, .exam-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
}
.exam-hero {
    justify-content: space-between;
    gap: 18px 28px;
    padding: clamp(20px, 4vw, 38px);
    margin-block-end: 20px;
    border: 1px solid #264974;
    border-radius: 22px;
    background: radial-gradient(ellipse at 0% 100%, #146779 0%, transparent 56%),
        linear-gradient(115deg, #172f51, #111d39 72%);
    color: #fff;
}
.exam-hero h1, .app-shell .page-area .exam-hero h1 {
    margin: 0;
    color: inherit;
    font-size: clamp(1.35rem, 3.5vw, 2rem);
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.exam-hero p { margin: 4px 0 0; color: #d5e6f7; overflow-wrap: anywhere; }
.exam-hero .ghost-button {
    background: #f4faff;
    border-color: #f4faff;
    color: #173c62;
}
.exam-hero .ghost-button:hover { background: #d8f5fa; border-color: #d8f5fa; }
.exam-hero .text-link { color: #dbfaff; text-decoration: underline; }
.exam-registration :focus-visible, .exam-case :focus-visible {
    outline: 2px solid #2177d6;
    outline-offset: 3px;
}
.exam-hero :focus-visible { outline-color: #a8f5f1; }

[data-tone="personal"] { --tone: #20559a; --tone-soft: #edf5ff; --tone-edge: #c4ddfb; }
[data-tone="education"] { --tone: #146450; --tone-soft: #e8f8f0; --tone-edge: #b4e2cf; }
[data-tone="support"] { --tone: #644394; --tone-soft: #f5efff; --tone-edge: #dfd0f4; }
[data-tone="employment"] { --tone: #80500c; --tone-soft: #fff5e5; --tone-edge: #edd4a8; }

.applicant-profile__identity, .exam-case__identity {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
}
.applicant-profile__avatar, .exam-case__identity img {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    overflow: hidden;
    border: 1px solid #aee5e9;
    border-radius: 18px;
    background: #d7f5f5;
    color: #154969;
    font-size: 1.55rem;
    font-weight: 800;
}
.applicant-profile__avatar img { width: 100%; height: 100%; object-fit: cover; }
.exam-case__identity img { object-fit: cover; }
.applicant-profile__status { display: grid; gap: 12px; }
.applicant-profile__progress { display: grid; gap: 5px; color: #e3f0fc; font-size: .83rem; }
.applicant-profile__progress progress { width: 100%; height: 9px; accent-color: #76e2d3; }
.applicant-profile__workspace, .exam-dashboard__layout, .exam-case__layout {
    display: grid;
    align-items: start;
    gap: 16px;
}
.applicant-profile__workspace { grid-template-columns: minmax(180px, .34fr) minmax(0, 1fr); }
.applicant-profile__steps, .exam-case__review, .exam-case__details { display: grid; gap: 10px; }
.applicant-profile__content { min-width: 0; }
.applicant-profile__steps a, .exam-case__sections a {
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 12px 15px;
    border: 1px solid var(--tone-edge);
    border-radius: 14px;
    background: var(--tone-soft);
    color: var(--tone);
    text-decoration: none;
    font-weight: 750;
    line-height: 1.6;
}
.applicant-profile__steps a { min-height: 65px; }
.applicant-profile__steps a:hover, .exam-case__sections a:hover { border-color: var(--tone); }
.applicant-profile__steps a[aria-current="page"] { border-color: var(--tone); background: var(--tone); color: #fff; }
.applicant-profile__steps small { font-weight: 500; }
.applicant-profile__panel, .exam-data-panel, .exam-board {
    min-width: 0;
    overflow: hidden;
    padding: clamp(16px, 3vw, 26px);
    border: 1px solid #d9e3ee;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px #17354a09;
}
.applicant-profile__panel > header, .exam-data-panel > h2 {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-inline-start: 4px solid var(--tone);
    border-radius: 9px;
    background: var(--tone-soft);
    color: var(--tone);
}
.applicant-profile__panel h2, .exam-data-panel h2, .exam-board h2 { font-size: 1.14rem; }
.applicant-profile__panel h2 { margin: 0; color: inherit; }
.applicant-profile__panel header p { margin: 5px 0 0; }
.applicant-profile__fields { padding: 0; }
.applicant-profile__fields input:not([type="checkbox"]), .applicant-profile__fields select,
.applicant-profile__fields textarea { background-color: #f7fafe; }
.applicant-profile__fields [hidden] { display: none; }
.applicant-document {
    min-width: 0;
    padding: 12px;
    border: 1px dashed var(--tone-edge);
    border-radius: 12px;
    background: var(--tone-soft);
}
.applicant-document input { max-width: 100%; }
.applicant-document .check-field { margin-top: 6px; }
.applicant-profile__date { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.applicant-profile__date legend { margin-bottom: 6px; font-weight: 700; }
.applicant-profile__date > div { display: grid; grid-template-columns: .8fr 1.35fr 1fr; gap: 6px; }
.applicant-profile__date select { min-width: 0; width: 100%; }
.applicant-profile__footer { margin-top: 20px; }

.exam-dashboard__layout { grid-template-columns: minmax(0, 1fr) minmax(230px, .4fr); }
.exam-board__heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 16px;
}
.exam-board__heading h2 { margin: 0; color: #183a61; }
.exam-board__count, .exam-state {
    display: inline-block;
    width: fit-content;
    padding: 3px 10px;
    border-radius: 999px;
    background: #e9f1ff;
    color: #234c82;
    font-size: .82rem;
    font-weight: 750;
}
.exam-state[data-state="OPEN"] { background: #dff6f1; color: #126254; }
.exam-state[data-state="PENDING"] { background: #fff1d4; color: #765110; }
.exam-state[data-state="APPROVED"] { background: #e3f5e6; color: #1c6135; }
.exam-state[data-state="REJECTED"] { background: #fae9e9; color: #973438; }
.exam-board__empty { margin: 0; padding: 15px; border-radius: 10px; background: #f1f5f9; color: #465a70; }
.exam-card-grid, .exam-history, .exam-documents { margin: 0; padding: 0; list-style: none; }
.exam-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr)); gap: 12px; }
.exam-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border: 1px solid #d4e4ec;
    border-block-start: 4px solid #257888;
    border-radius: 13px;
    background: #f6fbfd;
    overflow-wrap: anywhere;
}
.exam-card:target { outline: 2px solid #257888; outline-offset: 2px; }
.exam-card h3 { margin: 8px 0 0; color: #163c55; font-size: 1rem; }
.exam-card form { margin-top: auto; }
.exam-card__facts, .exam-case__facts { display: grid; gap: 8px 14px; margin: 0; }
.exam-card__facts > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.exam-card__facts dt, .exam-case__facts dt { color: #4a6076; font-size: .86rem; }
.exam-card__facts dd, .exam-case__facts dd { margin: 0; color: #22394e; font-weight: 650; }
.exam-board--history { background: #f8faff; }
.exam-history li {
    display: grid;
    gap: 6px;
    padding: 12px 0;
    border-top: 1px solid #dbe4f0;
    overflow-wrap: anywhere;
}
.exam-history li:last-child { padding-bottom: 0; }
.exam-history time { color: #4a6076; font-size: .85rem; }

.exam-case__hero { margin-block-end: 0; }
.exam-case__layout { grid-template-columns: minmax(0, .42fr) minmax(0, 1fr); }
.exam-case__review, .exam-case__details { gap: 16px; min-width: 0; }
.exam-case__review .stacked-form, .exam-case__review .form-grid { padding: 0; }
.app-shell .page-area .exam-case__review .form-grid { grid-template-columns: minmax(0, 1fr); }
.exam-case__review p { overflow-wrap: anywhere; }
.exam-case__reject { color: #9a2631; }
.exam-case__sections { display: flex; flex-wrap: wrap; gap: 7px; }
.exam-case__sections a { padding: 7px 11px; font-size: .84rem; }
.exam-case__facts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.exam-case__facts > div { min-width: 0; padding: 10px; border-radius: 9px; background: #f4f7fb; }
.exam-case__facts dd { margin-block-start: 5px; overflow-wrap: anywhere; white-space: pre-wrap; }
.exam-case__wide { grid-column: 1 / -1; }
.exam-data-panel[id] { scroll-margin-top: calc(var(--shell-header-height, 72px) + 16px); }
.exam-data-panel:target { border-color: var(--tone); }
.exam-documents li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    padding: 10px 0;
    border-bottom: 1px solid #e1e9f3;
}
.exam-documents li:last-child { border-bottom: 0; padding-bottom: 0; }
.exam-documents strong, .exam-documents bdi { display: block; overflow-wrap: anywhere; }
.exam-documents bdi { color: #4a6076; font-size: .85rem; }

#exam-list, #exam-request-inbox, #exam-applications, #exam-participants, #exam-participants tr[id] {
    scroll-margin-top: calc(var(--shell-header-height, 72px) + 16px);
}
#exam-participants tr:target > td { background: #edf5ff; }
.safety-exam-review__workspace {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    align-items: start;
    gap: 16px;
}
.safety-exam-review__workspace form { padding: 0; }
.safety-exam-review__actions { margin-top: 16px; }

@media (max-width: 820px) {
    .applicant-profile__workspace, .exam-dashboard__layout, .exam-case__layout,
    .safety-exam-review__workspace { grid-template-columns: minmax(0, 1fr); }
    .applicant-profile__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .applicant-profile__fields { grid-template-columns: minmax(0, 1fr); }
    .exam-hero { border-radius: 16px; }
}
