/* Responsive layout adjustments for the public test taking and registration pages. */
@media (max-width: 768px) {
    html,
    body { max-width: 100%; overflow-x: hidden; }

    header.header {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        height: auto;
        min-height: 52px;
        padding: 6px 10px;
    }

    header.header .left {
        max-width: 48vw;
        background-color: transparent;
        background-image: url("../../images/pcc-logo.png");
        background-size: contain;
        background-position: left center;
    }

    header.header .right {
        display: flex;
        width: auto !important;
        max-width: calc(100vw - 150px);
        min-width: 0;
        margin-left: auto;
        align-items: center;
        justify-content: flex-end;
        gap: 4px;
        white-space: nowrap;
        font-size: 12px;
    }

    main#maincontent,
    main.body {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 12px;
    }

    div.content,
    div.container {
        float: none;
        width: 100%;
        max-width: 100%;
        margin-right: auto;
        margin-left: auto;
    }

    div.container { padding: 10px; }

    div.tceformbox,
    div.contentbox,
    fieldset { max-width: 100%; padding: 12px; }

    form,
    input,
    select,
    textarea { max-width: 100%; }

    img,
    canvas,
    video,
    iframe { max-width: 100%; }

    table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }

    .pagehelp,
    div.error,
    div.warning { overflow-wrap: anywhere; }
}

@media (max-width: 420px) {
    main#maincontent,
    main.body { padding: 8px; }

    header.header .right { font-size: 11px; }
    input[type="submit"],
    input[type="button"],
    button { max-width: 100%; }
}

/* PCC login screen: presentation only; retain TCExam's existing form controls and action. */
body:has(form#form_login) {
    min-width: 320px;
    min-height: 100vh;
    background: linear-gradient(155deg, #c7e9fb 0%, #91c5e5 48%, #326a9e 100%);
}

body:has(form#form_login) > header.header,
body:has(form#form_login) > nav#scrollayer,
body:has(form#form_login) > main#maincontent > h1 {
    display: none;
}

body:has(form#form_login) > main#maincontent.body {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-height: 100vh;
    margin: 0;
    padding: 28px 18px;
}

body:has(form#form_login) main#maincontent > .container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-sizing: border-box;
    float: none;
    width: min(100%, 420px);
    max-width: 420px;
    margin: 0;
    padding: 0;
}

body:has(form#form_login) main#maincontent > .container > small {
    order: 2;
    padding: 0;
    color: #f5faff;
    text-align: center;
}

body:has(form#form_login) main#maincontent > .container > small a,
body:has(form#form_login) main#maincontent > .container > small a:visited {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

body:has(form#form_login) .tceformbox:has(form#form_login) {
    order: 1;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 30px 32px 32px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(12, 44, 75, 0.24);
}

body:has(form#form_login) .tceformbox:has(form#form_login)::before {
    display: block;
    width: 126px;
    height: 92px;
    margin: 0 auto 12px;
    background: url("../../images/pcc-logo.png") center / contain no-repeat;
    content: "";
}

body:has(form#form_login) form#form_login {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

body:has(form#form_login) form#form_login::before {
    display: block;
    margin: 0 0 18px;
    color: #202b3d;
    content: "Sign In";
    font-size: 1.45rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
}

body:has(form#form_login) form#form_login > .row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 14px;
    padding: 0;
    text-align: left;
}

body:has(form#form_login) form#form_login > .row .label,
body:has(form#form_login) form#form_login > .row .formw {
    display: block;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: left;
}

body:has(form#form_login) form#form_login > .row .label label {
    color: #344256;
    font-size: 0.88rem;
    font-weight: 600;
}

body:has(form#form_login) form#form_login input:not([type="hidden"]):not([type="submit"]) {
    box-sizing: border-box;
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 10px 13px;
    border: 1px solid #d6dee8;
    border-radius: 9px;
    background-color: #ffffff;
    color: #1e293b;
    font-size: 1rem;
}

body:has(form#form_login) form#form_login input:not([type="hidden"]):not([type="submit"]):focus {
    border-color: #1680d4;
    box-shadow: 0 0 0 3px rgba(22, 128, 212, 0.15);
    outline: none;
}

body:has(form#form_login) form#form_login > .row:has(a[href*="tce_password_reset.php"]) {
    align-items: flex-end;
    margin-top: -6px;
    margin-bottom: 16px;
}

body:has(form#form_login) form#form_login > .row:has(a[href*="tce_password_reset.php"]) a {
    color: #356889;
    font-size: 0.85rem;
}

body:has(form#form_login) form#form_login > .row:has(input[type="submit"]) {
    margin: 4px 0 0;
}

body:has(form#form_login) form#form_login input[type="submit"] {
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    margin: 0;
    border: 0;
    border-radius: 9px;
    background: #0878d1;
    box-shadow: 0 5px 12px rgba(8, 120, 209, 0.23);
    color: #ffffff;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 650;
}

body:has(form#form_login) form#form_login input[type="submit"]:hover,
body:has(form#form_login) form#form_login input[type="submit"]:focus-visible {
    background: #0668b8;
}

body:has(form#form_login) main#maincontent > .container > .pagehelp {
    display: none;
}

body:has(form#form_login) form#form_login > .warning,
body:has(form#form_login) form#form_login > .error {
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid #e2a4a1;
    border-radius: 8px;
    background: #fff0ed;
    color: #87342f;
    font-size: 0.86rem;
    line-height: 1.4;
    text-align: left;
    overflow-wrap: anywhere;
}

@media (max-width: 480px) {
    body:has(form#form_login) > main#maincontent.body { padding: 18px 14px; }
    body:has(form#form_login) .tceformbox:has(form#form_login) { padding: 26px 22px; }
}

/* Public account registration and password assistance forms. */
body:has(form#form_usereditor select#user_groups),
body:has(form#form_usereditor input#resetpassword) {
    display: flex;
    flex-direction: column;
    min-width: 320px;
    min-height: 100vh;
    overflow-x: hidden;
    background: linear-gradient(155deg, #c7e9fb 0%, #91c5e5 48%, #326a9e 100%);
}

body:has(form#form_usereditor select#user_groups) > header.header,
body:has(form#form_usereditor select#user_groups) > nav#scrollayer,
body:has(form#form_usereditor select#user_groups) > main#maincontent > h1,
body:has(form#form_usereditor input#resetpassword) > header.header,
body:has(form#form_usereditor input#resetpassword) > nav#scrollayer,
body:has(form#form_usereditor input#resetpassword) > main#maincontent > h1 {
    display: none;
}

body:has(form#form_usereditor select#user_groups) > main#maincontent.body,
body:has(form#form_usereditor input#resetpassword) > main#maincontent.body {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 28px 18px;
}

body:has(form#form_usereditor select#user_groups) main#maincontent > .container,
body:has(form#form_usereditor input#resetpassword) main#maincontent > .container {
    box-sizing: border-box;
    float: none;
    width: min(100%, 620px);
    max-width: 620px;
    margin: 0;
    padding: 0;
}

body:has(form#form_usereditor select#user_groups) .tceformbox:has(select#user_groups),
body:has(form#form_usereditor input#resetpassword) .tceformbox:has(input#resetpassword) {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 20px 22px;
    overflow: visible;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(12, 44, 75, 0.24);
    text-align: left;
}

body:has(form#form_usereditor select#user_groups) .tceformbox:has(select#user_groups)::before,
body:has(form#form_usereditor input#resetpassword) .tceformbox:has(input#resetpassword)::before {
    display: block;
    width: 100px;
    height: 66px;
    margin: 0 auto 5px;
    background: url("../../images/pcc-logo.png") center / contain no-repeat;
    content: "";
}

body:has(form#form_usereditor select#user_groups) form#form_usereditor,
body:has(form#form_usereditor input#resetpassword) form#form_usereditor {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

body:has(form#form_usereditor select#user_groups) form#form_usereditor::before {
    display: block;
    grid-column: 1 / -1;
    margin: 0 0 8px;
    color: #202b3d;
    content: "New User Registration";
    font-size: 1.22rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
}

body:has(form#form_usereditor select#user_groups) form#form_usereditor {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 12px;
}

body:has(form#form_usereditor select#user_groups) form#form_usereditor > .row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 2px;
    box-sizing: border-box;
    min-width: 0;
    width: auto;
    margin: 0;
    padding: 0;
    text-align: left;
}

body:has(form#form_usereditor select#user_groups) form#form_usereditor > .row .label,
body:has(form#form_usereditor select#user_groups) form#form_usereditor > .row .formw {
    display: block;
    float: none;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: left;
}

body:has(form#form_usereditor select#user_groups) form#form_usereditor > .row .label label,
body:has(form#form_usereditor input#resetpassword) form#form_usereditor > .row .label label {
    color: #344256;
    font-size: 0.76rem;
    font-weight: 600;
}

body:has(form#form_usereditor select#user_groups) form#form_usereditor abbr.requiredonbox {
    border: 0;
    color: #c93f4b;
    font-size: 0;
    text-decoration: none;
}

body:has(form#form_usereditor select#user_groups) form#form_usereditor abbr.requiredonbox::before {
    content: "*";
    font-size: 0.78rem;
}

body:has(form#form_usereditor select#user_groups) form#form_usereditor abbr.requiredoffbox {
    display: none;
}

body:has(form#form_usereditor select#user_groups) form#form_usereditor .labeldesc,
body:has(form#form_usereditor select#user_groups) form#form_usereditor .formw > small {
    color: #64748b;
    font-size: 0.66rem;
    line-height: 1.1;
}

body:has(form#form_usereditor select#user_groups) form#form_usereditor input:not([type="hidden"]):not([type="submit"]),
body:has(form#form_usereditor select#user_groups) form#form_usereditor select#user_groups,
body:has(form#form_usereditor input#resetpassword) form#form_usereditor input[type="email"] {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 32px;
    margin: 0;
    padding: 7px 10px;
    border: 1px solid #d6dee8;
    border-radius: 8px;
    background: #ffffff;
    color: #1e293b;
    font-size: 0.88rem;
}

body:has(form#form_usereditor select#user_groups) form#form_usereditor select#user_groups {
    min-height: 88px;
    padding: 5px 8px;
}

body:has(form#form_usereditor select#user_groups) form#form_usereditor > .row:has(#user_agreement),
body:has(form#form_usereditor select#user_groups) form#form_usereditor > .row:has(input[type="submit"]) {
    grid-column: 1 / -1;
}

body:has(form#form_usereditor select#user_groups) form#form_usereditor > .row:has(#user_agreement) {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

body:has(form#form_usereditor select#user_groups) form#form_usereditor > .row:has(#user_agreement) > .label {
    display: none;
}

body:has(form#form_usereditor select#user_groups) form#form_usereditor > .row:has(#user_agreement) > .formw {
    display: flex;
    align-items: center;
    gap: 8px;
}

body:has(form#form_usereditor select#user_groups) form#form_usereditor #user_agreement {
    width: 16px;
    min-height: 16px;
    height: 16px;
    margin: 0;
    accent-color: #0878d1;
}

body:has(form#form_usereditor select#user_groups) form#form_usereditor > .row:has(input[type="submit"]) {
    margin-top: 2px;
}

body:has(form#form_usereditor select#user_groups) form#form_usereditor input[type="submit"],
body:has(form#form_usereditor input#resetpassword) form#form_usereditor input[type="submit"] {
    box-sizing: border-box;
    width: 100%;
    min-height: 42px;
    margin: 0;
    border: 0;
    border-radius: 8px;
    background: #0878d1;
    box-shadow: 0 4px 10px rgba(8, 120, 209, 0.2);
    color: #ffffff;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 650;
}

body:has(form#form_usereditor select#user_groups) main#maincontent > .container > .pagehelp {
    margin-top: 10px;
    padding: 9px 12px;
    border: 1px solid #b9d9ef;
    border-radius: 8px;
    background: #e1f2fc;
    color: #31536d;
    font-size: 0.78rem;
    line-height: 1.45;
}

body:has(form#form_usereditor input#resetpassword) form#form_usereditor::before {
    display: block;
    margin: 0 0 10px;
    color: #202b3d;
    content: "Password Assistance";
    font-size: 1.3rem;
    font-weight: 650;
    line-height: 1.3;
    text-align: center;
}

body:has(form#form_usereditor input#resetpassword) main#maincontent > .container {
    width: min(100%, 440px);
    max-width: 440px;
}

body:has(form#form_usereditor input#resetpassword) form#form_usereditor > p {
    margin: 0 0 11px;
    padding: 10px;
    border: 1px solid #e1e7ee;
    border-radius: 9px;
    background: #f7f9fc;
    color: #3d4d62;
    font-size: 0.86rem;
    line-height: 1.4;
}

body:has(form#form_usereditor select#user_groups) main#maincontent > .warning,
body:has(form#form_usereditor select#user_groups) main#maincontent > .error,
body:has(form#form_usereditor input#resetpassword) main#maincontent > .warning,
body:has(form#form_usereditor input#resetpassword) main#maincontent > .error {
    box-sizing: border-box;
    width: min(100%, 620px);
    margin: 0 auto 12px;
    padding: 11px 14px;
    border: 1px solid #f0b9bd;
    border-radius: 9px;
    background: #fff0f1;
    color: #842d36;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

body:has(form#form_usereditor select#user_groups) main#maincontent > .warning,
body:has(form#form_usereditor input#resetpassword) main#maincontent > .warning {
    border-color: #f3d39c;
    background: #fff8e8;
    color: #805a18;
}

body:has(form#form_usereditor input#resetpassword) form#form_usereditor > .row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 12px;
    padding: 0;
    text-align: left;
}

body:has(form#form_usereditor input#resetpassword) form#form_usereditor > .row .label,
body:has(form#form_usereditor input#resetpassword) form#form_usereditor > .row .formw {
    display: block;
    float: none;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: left;
}

body:has(form#form_usereditor input#resetpassword) form#form_usereditor > .row:has(input[type="submit"]) {
    margin: 0;
}

body:has(form#form_usereditor input#resetpassword) > footer.footer {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 4px 12px 12px;
    background: transparent;
    text-align: center;
}

body:has(form#form_usereditor select#user_groups) > footer.footer,
body:has(form#form_usereditor input#resetpassword) > footer.footer {
    color: #eef7ff;
}

body:has(form#form_usereditor select#user_groups) > footer.footer > .minibutton:first-child,
body:has(form#form_usereditor select#user_groups) > footer.footer > .userbar,
body:has(form#form_usereditor input#resetpassword) > footer.footer > .minibutton:first-child {
    display: none;
}

body:has(form#form_usereditor input#resetpassword) > footer.footer > .userbar {
    margin: 0 0 2px;
    padding: 0;
    background: transparent;
    text-align: center;
}

body:has(form#form_usereditor input#resetpassword) > footer.footer > .userbar a.loginbutton,
body:has(form#form_usereditor input#resetpassword) > footer.footer > .userbar a.loginbutton:visited {
    border: 0;
    background: transparent;
    color: #315f7d;
    font-size: 0.82rem;
    text-decoration: underline;
}

body:has(form#form_usereditor select#user_groups) > footer.footer .minibutton,
body:has(form#form_usereditor input#resetpassword) > footer.footer .minibutton {
    box-sizing: border-box;
    width: 100%;
    margin: 4px 0;
    padding: 0;
    overflow-wrap: anywhere;
    white-space: normal;
    background: transparent;
    color: #eef7ff;
    font-size: 0.7rem;
}

body:has(form#form_usereditor select#user_groups) > footer.footer a.langselector,
body:has(form#form_usereditor input#resetpassword) > footer.footer a.langselector,
body:has(form#form_usereditor select#user_groups) > footer.footer .copyright,
body:has(form#form_usereditor input#resetpassword) > footer.footer .copyright {
    color: #f5faff;
}

body:has(form#form_usereditor select#user_groups) > footer.footer .langselector,
body:has(form#form_usereditor input#resetpassword) > footer.footer .langselector {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 4px;
}

@media (max-width: 560px) {
    body:has(form#form_usereditor select#user_groups) > main#maincontent.body,
    body:has(form#form_usereditor input#resetpassword) > main#maincontent.body { padding: 18px 12px; }

    body:has(form#form_usereditor select#user_groups) .tceformbox:has(select#user_groups),
    body:has(form#form_usereditor input#resetpassword) .tceformbox:has(input#resetpassword) { padding: 20px 18px; }
}

/* Student exam question palette: numbered targets with clear visit/answer states. */
body.pcc-public-authenticated #testform > div:first-of-type > .tcecontentbox:has(ol.qlist) {
    position: sticky;
    top: 78px;
    align-self: start;
    max-height: min(68vh, 620px);
    padding: 16px;
}

body.pcc-public-authenticated #testform .qlist {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
    max-height: min(48vh, 440px);
    margin: 12px 0 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

body.pcc-public-authenticated #testform .qlist > li {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-size: 0;
    line-height: 1;
}

body.pcc-public-authenticated #testform .qlist > li > abbr {
    display: none;
}

body.pcc-public-authenticated #testform .qlist > li > input {
    box-sizing: border-box;
    width: 100%;
    min-height: 38px;
    margin: 0;
    padding: 4px;
    border: 1px solid #c8d5e3;
    border-radius: 8px;
    background: #eef2f6;
    color: #4c5d70;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

body.pcc-public-authenticated #testform .qlist > li.answered > input {
    border-color: #6dbb79;
    background: #70bd39;
    color: #ffffff;
}

body.pcc-public-authenticated #testform .qlist > li.visited > input {
    border-color: #8b5cf6;
    background: #8b5cf6;
    color: #ffffff;
}

body.pcc-public-authenticated #testform .qlist > li.not-visited > input {
    border-color: #c8d5e3;
    background: #eef2f6;
    color: #52647a;
}

body.pcc-public-authenticated #testform .qlist > li.selected > input {
    outline: 3px solid rgba(40, 110, 190, 0.24);
    outline-offset: 1px;
}

body.pcc-public-authenticated #testform .question-palette-legend {
    display: grid;
    gap: 7px;
    margin-top: 14px;
    color: #52647a;
    font-size: 0.78rem;
}

body.pcc-public-authenticated #testform .question-palette-legend span::before {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 7px;
    border-radius: 3px;
    content: "";
}

body.pcc-public-authenticated #testform .question-palette-legend .answered::before { background: #70bd39; }
body.pcc-public-authenticated #testform .question-palette-legend .visited::before { background: #8b5cf6; border-radius: 50%; }
body.pcc-public-authenticated #testform .question-palette-legend .not-visited::before { background: #eef2f6; border: 1px solid #aebdcd; }

/* Keep the label and full timestamp together in both desktop headers. */
body.pcc-public-authenticated > header.header #timerform > div[role="timer"] {
    justify-content: flex-start;
    gap: 8px;
    white-space: nowrap;
}

body.pcc-public-authenticated > header.header #timer {
    flex: 0 1 205px;
    width: 205px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #dbe5ef;
    border-radius: 9px;
    background: #f8fafc;
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

@media (max-width: 900px) {
    body.pcc-public-authenticated #testform > div:first-of-type > .tcecontentbox:has(ol.qlist) { position: static; }
}

@media (max-width: 560px) {
    body.pcc-public-authenticated > header.header > #timersection { width: auto; }
    body.pcc-public-authenticated > header.header .timerlabel { display: inline; }
    body.pcc-public-authenticated > header.header #timer { flex: 1 1 180px; width: auto; max-width: 100%; font-size: 0.72rem; }
    body.pcc-public-authenticated #testform .qlist { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 360px) {
    body.pcc-public-authenticated #testform .qlist { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Final timer alignment overrides: keep the clock beside its label and inside the header. */
body.pcc-public-authenticated > header.header > #timersection {
    left: 24px;
    right: auto;
    width: min(310px, calc(100% - 220px));
    max-width: calc(100% - 220px);
}

body.pcc-public-authenticated > header.header #timerform,
body.pcc-public-authenticated > header.header #timerform > div[role="timer"] {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

body.pcc-public-authenticated > header.header #timerform > div[role="timer"] {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

body.pcc-public-authenticated > header.header #timer {
    box-sizing: border-box;
    flex: 0 1 220px;
    width: 220px;
    min-width: 0;
    max-width: 100%;
    padding: 7px 8px;
    border: 1px solid #dbe5ef;
    border-radius: 9px;
    background: #f8fafc;
    color: #26384b;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

@media (max-width: 560px) {
    body.pcc-public-authenticated > header.header > #timersection {
        left: 8px;
        right: 8px;
        bottom: 6px;
        width: auto;
        max-width: none;
    }

    body.pcc-public-authenticated > header.header .timerlabel { display: inline; }
    body.pcc-public-authenticated > header.header #timer { flex: 1 1 0; width: auto; }
}

/* Give public pages that do not have a dedicated layout the same PCC surface,
   while leaving their existing forms, links, and submission controls intact. */
body.pcc-public-authenticated main#maincontent > .container > .gsoformbox,
body.pcc-public-authenticated main#maincontent > .container > .tceformbox:not(:has(#form_resultallusers)):not(:has(form#testform)) {
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 16px;
    padding: 22px;
    border: 1px solid #dbe5ef;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 7px 20px rgba(25, 45, 69, 0.06);
}

body.pcc-public-authenticated main#maincontent form#form_editor {
    display: grid;
    gap: 14px;
}

body.pcc-public-authenticated main#maincontent form#form_editor > .row {
    display: grid;
    grid-template-columns: minmax(150px, 0.32fr) minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0 0 12px;
    border-bottom: 1px solid #e7edf4;
}

body.pcc-public-authenticated main#maincontent form#form_editor > .row .label {
    width: auto;
    color: #53657a;
    font-weight: 650;
    text-align: left;
}

body.pcc-public-authenticated main#maincontent form#form_editor > .row .formw {
    width: auto;
    min-width: 0;
    text-align: left;
}

body.pcc-public-authenticated main#maincontent form#form_editor input:not([type="hidden"]):not([type="submit"]),
body.pcc-public-authenticated main#maincontent form#form_editor select,
body.pcc-public-authenticated main#maincontent form#form_editor textarea {
    box-sizing: border-box;
    max-width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #cbd8e6;
    border-radius: 8px;
    background: #f8fafc;
    color: #26384b;
    font: inherit;
}

body.pcc-public-authenticated main#maincontent form#form_editor input[type="submit"] {
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid #1675bf;
    border-radius: 8px;
    background: #1675bf;
    color: #ffffff;
    font-weight: 650;
    cursor: pointer;
}

body.pcc-public-authenticated main#maincontent table:not(.testlist) {
    max-width: 100%;
    border-color: #dbe5ef;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    background: #ffffff;
    color: #334155;
}

body.pcc-public-authenticated main#maincontent table:not(.testlist) th {
    padding: 11px 12px;
    border-color: #dbe5ef;
    background: #1e293b;
    color: #f8fafc;
    font-weight: 700;
}

body.pcc-public-authenticated main#maincontent table:not(.testlist) td {
    padding: 10px 12px;
    border-color: #e3eaf2;
    background: #ffffff;
}

body.pcc-public-authenticated main#maincontent .rowl {
    max-width: 100%;
    margin: 16px 0;
    overflow-x: auto;
    border-radius: 10px;
}

body.pcc-public-authenticated main#maincontent > .container > ul {
    box-sizing: border-box;
    margin: 0 0 16px;
    padding: 10px;
    border: 1px solid #dbe5ef;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(25, 45, 69, 0.05);
    list-style: none;
}

body.pcc-public-authenticated main#maincontent > .container > ul > li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #e8eef5;
}

body.pcc-public-authenticated main#maincontent > .container > ul > li:last-child {
    border-bottom: 0;
}

body.pcc-public-authenticated main#maincontent > .container > ul > li > a {
    display: block;
    padding: 13px 14px;
    border-radius: 8px;
    color: #1769aa;
    font-weight: 600;
    text-decoration: none;
}

body.pcc-public-authenticated main#maincontent > .container > ul > li > a:hover,
body.pcc-public-authenticated main#maincontent > .container > ul > li > a:focus-visible {
    background: #eef6ff;
    outline: none;
}

body.pcc-public-authenticated main#maincontent .error,
body.pcc-public-authenticated main#maincontent .warning,
body.pcc-public-authenticated main#maincontent .message {
    box-sizing: border-box;
    margin: 0 0 16px;
    padding: 13px 16px;
    border: 1px solid #b9d9ef;
    border-radius: 9px;
    background: #e1f2fc;
    color: #31536d;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

body.pcc-public-authenticated main#maincontent .error {
    border-color: #f0b9bd;
    background: #fff0f1;
    color: #842d36;
}

body.pcc-public-authenticated main#maincontent .warning {
    border-color: #f3d39c;
    background: #fff8e8;
    color: #805a18;
}

/* Style PCC result-question cards where the shared result renderer supplies them. */
body.pcc-public-authenticated main#maincontent ol.question:has(> li.pcc-result-question) {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.pcc-public-authenticated main#maincontent .pcc-result-question {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid #dbe5ef;
    border-radius: 12px;
    background: #ffffff;
}

body.pcc-public-authenticated main#maincontent .pcc-result-question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #dbe5ef;
    background: #f5f8fc;
}

body.pcc-public-authenticated main#maincontent .pcc-result-question-number {
    display: inline-grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: #e0edff;
    color: #2563eb;
    font-weight: 750;
}

body.pcc-public-authenticated main#maincontent .pcc-result-question-meta {
    flex: 1 1 240px;
    color: #60748c;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.84rem;
}

body.pcc-public-authenticated main#maincontent .pcc-result-question-score {
    padding: 6px 10px;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.84rem;
    font-weight: 700;
}

body.pcc-public-authenticated main#maincontent .pcc-result-question-body {
    padding: 16px;
    color: #334155;
}

body.pcc-public-authenticated main#maincontent .pcc-result-question-prompt {
    margin: 0 0 14px;
    color: #172b45;
    font-size: 1.06rem;
    font-weight: 650;
    line-height: 1.5;
}

body.pcc-public-authenticated main#maincontent .pcc-result-question .answer {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.pcc-public-authenticated main#maincontent .pcc-result-question .answer > li {
    padding: 11px 13px;
    border: 1px solid #e5edf5;
    border-radius: 9px;
    background: #ffffff;
}

body.pcc-public-authenticated main#maincontent ol.question:not(:has(> li.pcc-result-question)) > li {
    margin: 0 0 16px;
    padding: 18px;
    border: 1px solid #dbe5ef;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 5px 16px rgba(25, 45, 69, 0.05);
    line-height: 1.55;
}

body.pcc-public-authenticated main#maincontent ol.question:not(:has(> li.pcc-result-question)) ol.answer > li,
body.pcc-public-authenticated main#maincontent ol.question:not(:has(> li.pcc-result-question)) ul.answer > li {
    margin: 7px 0;
    padding: 10px 12px;
    border: 1px solid #e5edf5;
    border-radius: 8px;
    background: #f8fafc;
}

/* The password mailer can stop before the form is rendered. Keep its error
   inside a centered PCC card instead of displaying a full-width legacy banner. */
body:has(main#maincontent > .error):not(:has(form#form_login)):not(:has(form#form_usereditor)):not(:has(footer.footer .userbar a.logoutbutton)) {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    background: linear-gradient(155deg, #c7e9fb 0%, #91c5e5 48%, #326a9e 100%);
}

body:has(main#maincontent > :is(.message, .warning)):not(:has(form#form_login)):not(:has(form#form_usereditor)):not(:has(footer.footer .userbar a.logoutbutton)) {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    background: linear-gradient(155deg, #c7e9fb 0%, #91c5e5 48%, #326a9e 100%);
}

body:has(main#maincontent > :is(.message, .warning)):not(:has(form#form_login)):not(:has(form#form_usereditor)):not(:has(footer.footer .userbar a.logoutbutton)) > header.header,
body:has(main#maincontent > :is(.message, .warning)):not(:has(form#form_login)):not(:has(form#form_usereditor)):not(:has(footer.footer .userbar a.logoutbutton)) > nav#scrollayer {
    display: none;
}

body:has(main#maincontent > :is(.message, .warning)):not(:has(form#form_login)):not(:has(form#form_usereditor)):not(:has(footer.footer .userbar a.logoutbutton)) > main#maincontent {
    box-sizing: border-box;
    width: min(100% - 28px, 440px);
    max-width: 440px;
    margin: 0;
    padding: 30px 26px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(12, 44, 75, 0.24);
    text-align: center;
}

body:has(main#maincontent > :is(.message, .warning)):not(:has(form#form_login)):not(:has(form#form_usereditor)):not(:has(footer.footer .userbar a.logoutbutton)) > main#maincontent > h1 {
    position: relative;
    display: block;
    margin: 0 0 12px;
    padding: 76px 0 0;
    color: #18253a;
    font-size: 1.45rem;
}

body:has(main#maincontent > :is(.message, .warning)):not(:has(form#form_login)):not(:has(form#form_usereditor)):not(:has(footer.footer .userbar a.logoutbutton)) > main#maincontent > h1::before {
    position: absolute;
    top: 0;
    left: 50%;
    width: 120px;
    height: 68px;
    background: url("../../images/pcc-logo.png") center / contain no-repeat;
    content: "";
    transform: translateX(-50%);
}

body:has(main#maincontent > :is(.message, .warning)):not(:has(form#form_login)):not(:has(form#form_usereditor)):not(:has(footer.footer .userbar a.logoutbutton)) > main#maincontent > :is(.message, .warning) {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 13px 15px;
    border: 1px solid #a9d9c3;
    border-radius: 9px;
    background: #effaf4;
    color: #246145;
    line-height: 1.5;
    text-align: left;
    overflow-wrap: anywhere;
}

/* Keep standalone public confirmations and warnings centered in their PCC
   card while leaving the language/footer row below. */
body:has(main#maincontent > :is(.message, .warning)):not(:has(form#form_login)):not(:has(form#form_usereditor)):not(:has(footer.footer .userbar a.logoutbutton)) > main#maincontent {
    margin-block: auto;
}

body:has(main#maincontent > .warning):not(:has(form#form_login)):not(:has(form#form_usereditor)):not(:has(footer.footer .userbar a.logoutbutton)) > main#maincontent > .warning {
    border-color: #e7a6aa;
    background: #fff0f1;
    color: #842d36;
}

body:has(main#maincontent > :is(.message, .warning)):not(:has(form#form_login)):not(:has(form#form_usereditor)):not(:has(footer.footer .userbar a.logoutbutton)) > main#maincontent .container {
    width: 100%;
    max-width: none;
    margin: 12px 0 0;
    text-align: center;
}

body:has(main#maincontent > :is(.message, .warning)):not(:has(form#form_login)):not(:has(form#form_usereditor)):not(:has(footer.footer .userbar a.logoutbutton)) > main#maincontent .container > strong > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 8px;
    background: #0878d1;
    color: #ffffff;
    text-decoration: none;
}

body:has(main#maincontent > :is(.message, .warning)):not(:has(form#form_login)):not(:has(form#form_usereditor)):not(:has(footer.footer .userbar a.logoutbutton)) > footer.footer {
    width: 100%;
    margin-top: 0;
    padding: 8px 12px 14px;
    background: transparent;
    color: #f5faff;
    text-align: center;
}

body:has(main#maincontent > .error):not(:has(form#form_login)):not(:has(form#form_usereditor)):not(:has(footer.footer .userbar a.logoutbutton)) {
    padding: 18px;
}

body:has(main#maincontent > .error):not(:has(form#form_login)):not(:has(form#form_usereditor)):not(:has(footer.footer .userbar a.logoutbutton)) > header.header,
body:has(main#maincontent > .error):not(:has(form#form_login)):not(:has(form#form_usereditor)):not(:has(footer.footer .userbar a.logoutbutton)) > nav#scrollayer,
body:has(main#maincontent > .error):not(:has(form#form_login)):not(:has(form#form_usereditor)):not(:has(footer.footer .userbar a.logoutbutton)) > footer.footer {
    display: none;
}

body:has(main#maincontent > .error):not(:has(form#form_login)):not(:has(form#form_usereditor)):not(:has(footer.footer .userbar a.logoutbutton)) > main#maincontent {
    box-sizing: border-box;
    width: min(100% - 28px, 440px);
    max-width: 440px;
    margin: 0;
    padding: 30px 26px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(12, 44, 75, 0.24);
    text-align: center;
}

body:has(main#maincontent > .error):not(:has(form#form_login)):not(:has(form#form_usereditor)):not(:has(footer.footer .userbar a.logoutbutton)) > main#maincontent > h1 {
    position: relative;
    display: block;
    margin: 0 0 12px;
    padding: 76px 0 0;
    color: #18253a;
    font-size: 1.45rem;
}

body:has(main#maincontent > .error):not(:has(form#form_login)):not(:has(form#form_usereditor)):not(:has(footer.footer .userbar a.logoutbutton)) > main#maincontent > h1::before {
    position: absolute;
    top: 0;
    left: 50%;
    width: 120px;
    height: 68px;
    background: url("../../images/pcc-logo.png") center / contain no-repeat;
    content: "";
    transform: translateX(-50%);
}

body:has(main#maincontent > .error):not(:has(form#form_login)):not(:has(form#form_usereditor)):not(:has(footer.footer .userbar a.logoutbutton)) > main#maincontent > .error {
    margin: 0;
    padding: 13px 15px;
    border: 1px solid #e7a6aa;
    border-radius: 9px;
    background: #fff0f1;
    color: #842d36;
    line-height: 1.5;
    text-align: left;
    overflow-wrap: anywhere;
}

@media (max-width: 720px) {
    body.pcc-public-authenticated main#maincontent form#form_editor > .row {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }

    body.pcc-public-authenticated main#maincontent > .container > .gsoformbox,
    body.pcc-public-authenticated main#maincontent > .container > .tceformbox:not(:has(#form_resultallusers)):not(:has(form#testform)) {
        padding: 14px;
    }
}

@media (max-width: 420px) {
    body:has(form#form_usereditor select#user_groups) form#form_usereditor { grid-template-columns: minmax(0, 1fr); }

    body:has(form#form_usereditor select#user_groups) form#form_usereditor > .row:has(#user_agreement),
    body:has(form#form_usereditor select#user_groups) form#form_usereditor > .row:has(input[type="submit"]) { grid-column: 1; }
}

/* Authenticated public shell, matching Reference Design */
body.pcc-public-authenticated {
    min-height: 100vh;
    background: #f4f6fa;
    color: #1e293b;
}

body.pcc-public-authenticated > nav#scrollayer {
    position: fixed;
    z-index: 10;
    top: 0;
    bottom: 0;
    left: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: 230px;
    height: 100vh;
    margin: 0;
    padding: 110px 14px 20px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 0;
    border-right: 1px solid #1e293b;
    border-radius: 0;
    background: #0e1726;
    box-shadow: 2px 0 14px rgba(0, 0, 0, 0.2);
    color: #94a3b8;
    opacity: 1;
}

body.pcc-public-authenticated > nav#scrollayer::before {
    position: absolute;
    top: 18px;
    left: 15px;
    display: block;
    width: 200px;
    height: 74px;
    background: url("../../images/pcc-logo.png") center / contain no-repeat;
    content: "";
}

body.pcc-public-authenticated > nav#scrollayer > #menusection {
    display: none;
}

body.pcc-public-authenticated > nav#scrollayer ul.menu {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    margin: 0;
    padding: 0;
}

body.pcc-public-authenticated > nav#scrollayer ul.menu > li {
    position: relative;
    float: none;
    width: 100%;
    height: auto;
    margin: 3px 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #94a3b8;
    line-height: normal;
    list-style: none;
}

body.pcc-public-authenticated > nav#scrollayer ul.menu > li::before {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 14px;
    width: 20px;
    height: 20px;
    color: #94a3b8;
    content: "";
    transform: translateY(-50%);
    transition: color 0.15s ease, filter 0.15s ease;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Home icon (SVG feather home) */
body.pcc-public-authenticated > nav#scrollayer ul.menu > li:nth-child(1)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9 22 9 12 15 12 15 22'/%3E%3C/svg%3E");
}

/* Home icon active (orange) */
body.pcc-public-authenticated > nav#scrollayer ul.menu > li:nth-child(1):has(> span.active)::before,
body.pcc-public-authenticated > nav#scrollayer ul.menu > li:nth-child(1):has(> a.active)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f97316' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9 22 9 12 15 12 15 22'/%3E%3C/svg%3E");
}

/* Results icon */
body.pcc-public-authenticated > nav#scrollayer ul.menu > li:has(> a[href="tce_test_allresults.php"])::before,
body.pcc-public-authenticated:not(.pcc-public-notes) > nav#scrollayer ul.menu > li:nth-child(2):has(> span.active)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='20' x2='18' y2='10'/%3E%3Cline x1='12' y1='20' x2='12' y2='4'/%3E%3Cline x1='6' y1='20' x2='6' y2='14'/%3E%3C/svg%3E");
}

/* Notes icon (SVG file-text) */
body.pcc-public-authenticated > nav#scrollayer ul.menu > li:has(> a[href="tce_notes.php"])::before,
body.pcc-public-authenticated.pcc-public-notes > nav#scrollayer ul.menu > li:has(> span.active)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10 9 9 9 8 9'/%3E%3C/svg%3E");
}

/* Notes icon active (orange) */
body.pcc-public-authenticated.pcc-public-notes > nav#scrollayer ul.menu > li:has(> span.active)::before,
body.pcc-public-authenticated > nav#scrollayer ul.menu > li:has(> a[href="tce_notes.php"].active)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f97316' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10 9 9 9 8 9'/%3E%3C/svg%3E");
}

/* User avatar at bottom of sidebar */
body.pcc-public-authenticated > nav#scrollayer ul.menu > li.has-children {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.pcc-public-authenticated > nav#scrollayer ul.menu > li.has-children::before {
    position: absolute;
    left: 12px;
    top: 35px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transform: translateY(-50%);
    background-color: #1e293b;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2394a3b8'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
    background-size: 18px 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

body.pcc-public-authenticated > nav#scrollayer ul.menu > li:has(> a[href*="admin/"])::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E");
}

body.pcc-public-authenticated > nav#scrollayer ul.menu > li:last-child {
    display: none;
}

body.pcc-public-authenticated > nav#scrollayer ul.menu > li > a,
body.pcc-public-authenticated > nav#scrollayer ul.menu > li > button.menu-parent-toggle,
body.pcc-public-authenticated > nav#scrollayer ul.menu > li > span.active {
    position: relative;
    display: block;
    box-sizing: border-box;
    min-height: 42px;
    padding: 10px 14px 10px 44px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #94a3b8;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 20px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

body.pcc-public-authenticated > nav#scrollayer ul.menu > li > button.menu-parent-toggle {
    width: 100%;
    padding-left: 48px;
    border: 0;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    color: #f1f5f9;
}

body.pcc-public-authenticated > nav#scrollayer ul.menu > li > a:hover,
body.pcc-public-authenticated > nav#scrollayer ul.menu > li > a:focus-visible,
body.pcc-public-authenticated > nav#scrollayer ul.menu > li > button.menu-parent-toggle:hover,
body.pcc-public-authenticated > nav#scrollayer ul.menu > li > button.menu-parent-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    outline: none;
}

/* Active navigation item: orange accent with subtle card highlight */
body.pcc-public-authenticated > nav#scrollayer ul.menu > li:has(> span.active) > span.active,
body.pcc-public-authenticated > nav#scrollayer ul.menu > li > a.active,
body.pcc-public-authenticated > nav#scrollayer ul.menu > li > button.menu-parent-toggle[aria-current="page"] {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(249, 115, 22, 0.35);
    color: #f97316;
    font-weight: 600;
    outline: none;
}

body.pcc-public-authenticated > nav#scrollayer ul.menu li > ul {
    position: static;
    display: none;
    width: auto;
    margin: 6px 0 6px 12px;
    padding: 4px 0 4px 8px;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
}

body.pcc-public-authenticated > nav#scrollayer ul.menu li.has-children.open > ul {
    display: block;
}

body.pcc-public-authenticated > nav#scrollayer ul.menu li ul li {
    float: none;
    width: 100%;
    height: auto;
    margin: 2px 0;
    background: transparent;
}

body.pcc-public-authenticated > nav#scrollayer ul.menu li ul li::before {
    display: none;
}

body.pcc-public-authenticated > nav#scrollayer ul.menu li ul li > a,
body.pcc-public-authenticated > nav#scrollayer ul.menu li ul li > span.active {
    min-height: 36px;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    font-size: 0.86rem;
    line-height: 20px;
}

body.pcc-public-authenticated > nav#scrollayer ul.menu li ul li > a:hover,
body.pcc-public-authenticated > nav#scrollayer ul.menu li ul li > span.active {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}

body.pcc-public-authenticated > nav#scrollayer ul.menu > li.has-children > button.menu-parent-toggle {
    padding-right: 32px;
}

body.pcc-public-authenticated > nav#scrollayer ul.menu > li.has-children > button.menu-parent-toggle::after {
    position: absolute;
    top: 50%;
    right: 12px;
    color: #94a3b8;
    content: "⌄";
    font-size: 1rem;
    line-height: 1;
    transform: translateY(-60%);
    transition: transform 160ms ease, color 160ms ease;
}

body.pcc-public-authenticated > nav#scrollayer ul.menu > li.has-children.open > button.menu-parent-toggle::after {
    color: #f1f5f9;
    transform: translateY(-35%) rotate(180deg);
}

body.pcc-public-authenticated > header.header {
    position: fixed;
    z-index: 8;
    top: 0;
    right: 0;
    left: 230px;
    box-sizing: border-box;
    width: auto;
    height: 64px;
    margin: 0;
    padding: 0 160px 0 28px;
    border-bottom: 1px solid #eef2f6;
    border-radius: 0;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

body.pcc-public-authenticated > header.header::before {
    content: none;
}

body.pcc-public-authenticated > header.header > .left {
    display: none;
}

.pcc-mobile-header-brand {
    display: none;
}

body.pcc-public-authenticated > header.header > .right {
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    background: transparent;
    text-align: left;
}

body.pcc-public-authenticated > header.header #timerform,
body.pcc-public-authenticated > header.header #timerform > div[role="timer"] {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    background: transparent;
}

body.pcc-public-authenticated > header.header #timerform .timerlabel {
    display: inline-block;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
}

body.pcc-public-authenticated > header.header #timer {
    width: auto;
    min-width: 175px;
    padding: 6px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #1e293b;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: normal;
    text-align: left;
}

body.pcc-public-authenticated > footer.footer {
    position: fixed;
    z-index: 12;
    top: 14px;
    right: 28px;
    display: flex;
    align-items: center;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    background: transparent;
    pointer-events: none;
}

body.pcc-public-authenticated > footer.footer > .minibutton {
    display: none;
}

body.pcc-public-authenticated > footer.footer > .userbar {
    display: flex;
    align-items: center;
    gap: 12px;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    clear: none;
    background: transparent;
    pointer-events: auto;
}

body.pcc-public-authenticated > footer.footer > .userbar > span {
    display: none;
}

body.pcc-public-authenticated > footer.footer > .userbar a.logoutbutton,
body.pcc-public-authenticated > footer.footer > .userbar a.logoutbutton:visited {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    color: #374151;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.15s ease;
}

body.pcc-public-authenticated > footer.footer > .userbar a.logoutbutton::before {
    content: "";
    display: inline-block;
    width: 15px;
    height: 15px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpolyline points='16 17 21 12 16 7'/%3E%3Cline x1='21' y1='12' x2='9' y2='12'/%3E%3C/svg%3E") no-repeat center / contain;
}

body.pcc-public-authenticated > footer.footer > .userbar a.logoutbutton:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
}

body.pcc-public-authenticated > main#maincontent.body {
    box-sizing: border-box;
    width: auto;
    max-width: none;
    min-height: 100vh;
    margin: 0 0 0 230px;
    padding: 86px 36px 34px;
    clear: none;
    border-radius: 0;
    background: #f8fafc;
}

body.pcc-public-authenticated > main#maincontent.body > h1 {
    margin: 0 0 22px;
    color: #0f172a;
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.25;
}

body.pcc-public-authenticated > main#maincontent.body > .container {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

body.pcc-public-authenticated > main#maincontent.body .tcecontentbox {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #334155;
}

body.pcc-public-authenticated > main#maincontent.body .tcecontentbox.public-test-list:not(:has(table.testlist)) {
    border: 0;
    background: transparent;
    color: inherit;
    padding: 0;
}

body.pcc-public-authenticated > main#maincontent.body .tcecontentbox table.testlist {
    width: 100%;
    margin: 0;
    border: 1px solid #dce5ef;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #ffffff;
}

body.pcc-public-authenticated > main#maincontent.body .tcecontentbox table.testlist th {
    padding: 13px 14px;
    border: 0;
    border-bottom: 1px solid #dbe5ef;
    background: #f2f6fa;
    color: #334155;
    font-size: 0.88rem;
    font-weight: 700;
    text-align: left;
}

body.pcc-public-authenticated > main#maincontent.body .tcecontentbox table.testlist td {
    padding: 14px;
    border: 0;
    border-bottom: 1px solid #e6edf4;
    background: #ffffff;
    color: #43546a;
    text-align: left;
    vertical-align: middle;
}

body.pcc-public-authenticated > main#maincontent.body .tcecontentbox table.testlist tbody tr:last-child td {
    border-bottom: 0;
}

body.pcc-public-authenticated > main#maincontent.body .tcecontentbox table.testlist tbody tr:hover td {
    background: #f8fbff;
}

body.pcc-public-authenticated > main#maincontent.body .pagehelp {
    margin-top: 24px;
    padding: 16px 22px;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.88rem;
    line-height: 1.5;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body.pcc-public-authenticated > main#maincontent.body .pagehelp::before {
    content: "ⓘ";
    font-size: 1.15rem;
    font-weight: 700;
    color: #0284c7;
    margin-right: 12px;
}

body.pcc-public-authenticated > main#maincontent.body .pagehelp::after {
    content: "✦";
    font-size: 1.25rem;
    color: #38bdf8;
    opacity: 0.7;
    margin-left: 12px;
}

@media (max-width: 800px) {
    body.pcc-public-authenticated > nav#scrollayer { width: 72px; padding: 82px 8px 16px; }
    body.pcc-public-authenticated > nav#scrollayer::before { top: 14px; left: 10px; width: 52px; height: 50px; }
    body.pcc-public-authenticated > nav#scrollayer ul.menu > li > a,
    body.pcc-public-authenticated > nav#scrollayer ul.menu > li > button.menu-parent-toggle,
    body.pcc-public-authenticated > nav#scrollayer ul.menu > li > span.active { min-height: 46px; padding: 13px 0; overflow: hidden; color: transparent; font-size: 0; }
    body.pcc-public-authenticated > nav#scrollayer ul.menu > li::before { left: 13px; }
    body.pcc-public-authenticated > header.header { left: 72px; padding-left: 18px; }
    body.pcc-public-authenticated > main#maincontent.body { margin-left: 72px; padding-right: 18px; padding-left: 18px; }
}

@media (max-width: 560px) {
    body.pcc-public-authenticated > nav#scrollayer { width: 58px; padding-right: 5px; padding-left: 5px; }
    body.pcc-public-authenticated > nav#scrollayer::before { left: 7px; width: 44px; height: 44px; }
    body.pcc-public-authenticated > nav#scrollayer ul.menu > li::before { left: 9px; }
    body.pcc-public-authenticated > header.header { left: 58px; right: 0; height: 60px; padding: 0 155px 0 12px; }
    body.pcc-public-authenticated > header.header::before { font-size: 0.96rem; }
    body.pcc-public-authenticated > header.header #timer { font-size: 0.72rem; }
    body.pcc-public-authenticated > footer.footer { right: 8px; height: 60px; }
    body.pcc-public-authenticated > footer.footer .userbar { gap: 6px; font-size: 0.76rem; }
    body.pcc-public-authenticated > footer.footer .userbar a.logoutbutton { padding: 7px 9px; }
    body.pcc-public-authenticated > main#maincontent.body { margin-left: 58px; padding: 76px 12px 22px; }
    body.pcc-public-authenticated > main#maincontent.body .tcecontentbox { padding: 12px; }
}

/* Shared authenticated header alignment, including public exam pages. */
body.pcc-public-authenticated > header.header > #timersection {
    position: absolute;
    top: 50%;
    right: 140px;
    display: flex;
    align-items: center;
    width: 245px;
    max-width: calc(100% - 150px);
    margin: 0;
    transform: translateY(-50%);
}

body.pcc-public-authenticated > header.header #timerform > div[role="timer"] {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    white-space: nowrap;
}

body.pcc-public-authenticated > header.header .timerlabel {
    flex: 0 0 auto;
    white-space: nowrap;
}

body.pcc-public-authenticated > header.header #timer {
    box-sizing: border-box;
    flex: 0 1 190px;
    width: 190px;
    min-width: 0;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 1000px) {
    body.pcc-public-authenticated > header.header > #timersection {
        right: 125px;
        width: 210px;
    }

    body.pcc-public-authenticated > header.header #timer {
        flex-basis: 155px;
        width: 155px;
        font-size: 0.76rem;
    }
}

@media (max-width: 760px) {
    body.pcc-public-authenticated > header.header > #timersection {
        right: 120px;
        width: 205px;
    }

    body.pcc-public-authenticated > header.header::before {
        content: none;
    }
}

@media (max-width: 560px) {
    body.pcc-public-authenticated > header.header::before {
        content: none;
    }

    body.pcc-public-authenticated > header.header > #timersection {
        right: 110px;
        width: 142px;
        max-width: calc(100% - 12px);
    }

    body.pcc-public-authenticated > header.header .timerlabel {
        display: none;
    }

    body.pcc-public-authenticated > header.header #timer {
        flex-basis: 142px;
        width: 142px;
        font-size: 0.68rem;
    }
}

@media (max-width: 400px) {
    body.pcc-public-authenticated > header.header > #timersection {
        right: 100px;
        width: 112px;
    }

    body.pcc-public-authenticated > header.header #timer {
        flex-basis: 112px;
        width: 112px;
        font-size: 0.58rem;
    }
}

/* Test information shown before starting an exam. */
body.pcc-public-authenticated main#maincontent .popupcontainer {
    display: grid;
    gap: 14px;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0;
}

body.pcc-public-authenticated main#maincontent .popupcontainer > h1 {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #162b45;
    font-size: 1.55rem;
}

body.pcc-public-authenticated .popupcontainer > .tcecontentbox {
    margin: 0;
    padding: 20px;
    border-left: 1px solid #dbe5ef;
    color: #46576b;
    line-height: 1.6;
}

body.pcc-public-authenticated .popupcontainer > .tceformbox {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 14px;
    box-sizing: border-box;
    margin: 0;
    padding: 16px;
    border: 1px solid #dbe5ef;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 5px 16px rgba(25, 45, 69, 0.06);
}

body.pcc-public-authenticated .popupcontainer > .tceformbox > .row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #e3eaf1;
    border-radius: 8px;
    background: #f8fafc;
}

body.pcc-public-authenticated .popupcontainer > .tceformbox .label {
    width: auto;
    color: #64748b;
    font-size: 0.82rem;
    text-align: left;
}

body.pcc-public-authenticated .popupcontainer > .tceformbox .value {
    color: #1e293b;
    font-size: 0.96rem;
    font-weight: 650;
    text-align: left;
}

body.pcc-public-authenticated .popupcontainer > .row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

body.pcc-public-authenticated .popupcontainer > br { display: none; }

body.pcc-public-authenticated .popupcontainer > .row .xmlbutton,
body.pcc-public-authenticated #form_test_terminate input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 20px;
    border: 1px solid #1675bf;
    border-radius: 8px;
    background: #1675bf;
    color: #ffffff;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
}

body.pcc-public-authenticated .popupcontainer > .row .xmlbutton:last-child,
body.pcc-public-authenticated #form_test_terminate input[name="cancel"] {
    border-color: #d2dbe5;
    background: #ffffff;
    color: #45576d;
}

/* Active exam layout: keep answer fields and all native submit controls intact. */
body.pcc-public-authenticated main#maincontent:has(form#testform) > .container > form#testform > div:first-of-type {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 300px);
    grid-template-areas:
        "question questions"
        "navigation questions"
        "comment comment"
        "terminate terminate";
    align-items: start;
    gap: 14px;
}

body.pcc-public-authenticated #testform > div:first-of-type > span#questionsection,
body.pcc-public-authenticated #testform > div:first-of-type > span#questionssection,
body.pcc-public-authenticated #testform > div:first-of-type > br {
    display: none;
}

body.pcc-public-authenticated #testform > div:first-of-type > .tcecontentbox:has(.answergroup, #answertext) {
    grid-area: question;
    min-width: 0;
    margin: 0;
    padding: 22px;
    border: 1px solid #dbe5ef;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 5px 16px rgba(25, 45, 69, 0.06);
    color: #1e293b;
    font-size: 1.08rem;
    line-height: 1.55;
}

body.pcc-public-authenticated #testform > div:first-of-type > .tcecontentbox:has(ol.qlist) {
    grid-area: questions;
    min-width: 0;
    max-height: min(68vh, 620px);
    margin: 0;
    padding: 16px;
    overflow: auto;
    border: 1px solid #dbe5ef;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 5px 16px rgba(25, 45, 69, 0.06);
}

body.pcc-public-authenticated #testform .answer,
body.pcc-public-authenticated #testform .answer_inline {
    display: grid;
    gap: 9px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

body.pcc-public-authenticated #testform .answer > li,
body.pcc-public-authenticated #testform .answer_inline > li {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid #e5edf5;
    border-radius: 9px;
    background: #ffffff;
    color: #40536a;
    font-size: 0.96rem;
}

body.pcc-public-authenticated #testform .answer > li:has(input:checked),
body.pcc-public-authenticated #testform .answer_inline > li:has(input:checked) {
    border-color: #8ab8e8;
    background: #eef6ff;
}

body.pcc-public-authenticated #testform .answer input,
body.pcc-public-authenticated #testform .answer_inline input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
}

body.pcc-public-authenticated #testform .answer label { cursor: pointer; }
body.pcc-public-authenticated #testform #answertext { box-sizing: border-box; width: 100%; min-height: 170px; }

body.pcc-public-authenticated #testform .navlink {
    grid-area: navigation;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

body.pcc-public-authenticated #testform .navlink input[type="submit"] {
    min-height: 40px;
    padding: 0 15px;
    border: 1px solid #1769aa;
    border-radius: 8px;
    background: #1769aa;
    color: #ffffff;
    cursor: pointer;
}

body.pcc-public-authenticated #testform .navlink input:disabled { opacity: 0.5; cursor: not-allowed; }

body.pcc-public-authenticated #testform .qlist {
    margin: 0;
    padding-left: 26px;
}

body.pcc-public-authenticated #testform .qlist > li {
    padding: 9px 6px;
    border-bottom: 1px solid #e8eef5;
    color: #52647a;
    line-height: 1.45;
}

body.pcc-public-authenticated #testform .qlist > li.selected { border-radius: 7px; background: #e8f2fc; color: #173d64; font-weight: 650; }

body.pcc-public-authenticated #testform .testcomment {
    grid-area: comment;
    display: block;
    padding: 15px 17px;
    border: 1px solid #dbe5ef;
    border-radius: 10px;
    background: #ffffff;
}

body.pcc-public-authenticated #testform .testcomment textarea { box-sizing: border-box; width: 100%; min-height: 86px; }
body.pcc-public-authenticated #testform > div:first-of-type > input[name="terminatetest"] { grid-area: terminate; justify-self: start; }
body.pcc-public-authenticated #testform > div:first-of-type > input[name="terminatetest"] { min-height: 40px; padding: 0 16px; border: 1px solid #cf5260; border-radius: 8px; background: #cf3948; color: #fff; cursor: pointer; }

body.pcc-public-authenticated main#maincontent:has(form#form_test_terminate) .confirmbox {
    max-width: 700px;
    margin: 18px auto;
    padding: 20px;
    border: 1px solid #e7c7a5;
    border-radius: 12px;
    background: #fff8ef;
}

@media (max-width: 900px) {
    body.pcc-public-authenticated main#maincontent:has(form#testform) > .container > form#testform > div:first-of-type {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "question" "questions" "navigation" "comment" "terminate";
    }
    body.pcc-public-authenticated #testform > div:first-of-type > .tcecontentbox:has(ol.qlist) { max-height: 360px; }
    body.pcc-public-authenticated .popupcontainer > .tceformbox { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    body.pcc-public-authenticated > header.header > #timersection { right: 160px; }
    body.pcc-public-authenticated #testform > div:first-of-type > .tcecontentbox:has(.answergroup, #answertext) { padding: 15px; }
    body.pcc-public-authenticated .popupcontainer > .tceformbox { grid-template-columns: minmax(0, 1fr); }
}

/* Retain TCExam's configured distraction-free fullscreen exam mode. */
body:has(form#testform style) > header.header,
body:has(form#testform style) > footer.footer > .userbar,
body:has(form#testform style) > main#maincontent > h1,
body:has(form#testform style) #testform .infolink,
body:has(form#testform style) #testform .navlink,
body:has(form#testform style) #testform .testcomment,
body:has(form#testform style) #testform #terminatetest,
body:has(form#testform style) #maincontent .pagehelp {
    display: none !important;
}

/* Modernize public select controls while keeping native values and submissions. */
body.pcc-public-authenticated main select:not([multiple]) {
    box-sizing: border-box;
    min-height: 42px;
    max-width: 100%;
    padding: 8px 40px 8px 12px;
    border: 1px solid #cbd8e6;
    border-radius: 9px;
    appearance: none;
    background-color: #f8fafc;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='%235b7188' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    color: #26384b;
    font: inherit;
    line-height: 1.35;
    cursor: pointer;
}

body.pcc-public-authenticated main select:not([multiple]):focus {
    border-color: #4387c2;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(43, 124, 190, 0.14);
    outline: none;
}

body.pcc-public-authenticated main select option {
    padding: 8px;
    background: #ffffff;
    color: #26384b;
}

/* Keep the public clock clear of the fixed logout control at every viewport size. */
body.pcc-public-authenticated > header.header > #timersection {
    left: 24px;
    right: auto;
    width: 270px;
    max-width: calc(100% - 190px);
}

body.pcc-public-authenticated > header.header #timerform > div[role="timer"] {
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
}

body.pcc-public-authenticated > header.header #timer {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
}

@media (max-width: 560px) {
    body.pcc-public-authenticated > header.header {
        height: 104px;
        padding: 0 12px;
    }

    body.pcc-public-authenticated > header.header > #timersection {
        top: auto;
        right: 8px;
        bottom: 6px;
        left: 8px;
        width: auto;
        max-width: none;
        transform: none;
    }

    body.pcc-public-authenticated > header.header #timerform > div[role="timer"] {
        justify-content: flex-start;
        gap: 6px;
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    body.pcc-public-authenticated > header.header #timerform {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    body.pcc-public-authenticated > header.header #timer {
        box-sizing: border-box;
        flex: 0 1 180px;
        width: 180px;
        min-width: 0;
        max-width: calc(100% - 48px);
        text-align: left;
    }

    body.pcc-public-authenticated > main#maincontent.body {
        padding-top: 116px;
    }
}

body.pcc-public-authenticated #testform select {
    min-height: 44px;
    border-color: #c9d7e5;
    background-color: #f3f7fb;
    font-size: 0.95rem;
}

/* User's Results filter card. */
body:has(form#form_resultallusers) main#maincontent > .container > .tceformbox {
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 16px;
    padding: 22px;
    border: 1px solid #dbe5ef;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 7px 20px rgba(25, 45, 69, 0.06);
}

body:has(form#form_resultallusers) #form_resultallusers {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 22px;
    align-items: end;
}

body:has(form#form_resultallusers) #form_resultallusers > .row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

body:has(form#form_resultallusers) #form_resultallusers > .row:has(#test_id) { grid-column: 1; grid-row: 1; }
body:has(form#form_resultallusers) #form_resultallusers > .row:has(#startdate) { grid-column: 2; grid-row: 1; }
body:has(form#form_resultallusers) #form_resultallusers > .row:has(#enddate) { grid-column: 3; grid-row: 1; }
body:has(form#form_resultallusers) #form_resultallusers > .row:has(#group_id) { grid-column: 1; grid-row: 2; }
body:has(form#form_resultallusers) #form_resultallusers > .row:has(#display_mode) { grid-column: 2; grid-row: 2; }
body:has(form#form_resultallusers) #form_resultallusers > .row:has(#show_graph) { grid-column: 1; grid-row: 3; }

body:has(form#form_resultallusers) #form_resultallusers > .row > .label {
    width: auto;
    margin: 0;
    padding: 0;
    color: #53657a;
    font-size: 0.85rem;
    font-weight: 650;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

body:has(form#form_resultallusers) #form_resultallusers > .row > .formw {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: left;
}

body:has(form#form_resultallusers) #form_resultallusers > .row > .formw > select,
body:has(form#form_resultallusers) #form_resultallusers > .row > .formw > input:not([type="checkbox"]):not([type="hidden"]) {
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    border: 1px solid #d8e2ee;
    border-radius: 9px;
    background-color: #f8fafc;
    color: #26384b;
    font-size: 0.98rem;
}

body:has(form#form_resultallusers) #form_resultallusers > .row:has(#show_graph) {
    flex-direction: row;
    align-items: center;
    align-self: center;
    gap: 10px;
    padding-top: 14px;
}

body:has(form#form_resultallusers) #form_resultallusers > .row:has(#show_graph) > .label { order: 2; color: #3d4d62; font-size: 0.95rem; text-transform: none; letter-spacing: 0; }
body:has(form#form_resultallusers) #form_resultallusers > .row:has(#show_graph) > .formw { order: 1; width: auto; }
body:has(form#form_resultallusers) #form_resultallusers #show_graph { width: 18px; height: 18px; accent-color: #1675d1; }

body:has(form#form_resultallusers) #form_resultallusers > .row:has(#selectcategory) {
    grid-column: 3;
    grid-row: 3;
    align-items: end;
}

body:has(form#form_resultallusers) #form_resultallusers #selectcategory {
    min-width: 150px;
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid #2563eb;
    border-radius: 9px;
    background: #2563eb;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.16);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
}

body:has(form#form_resultallusers) #form_resultallusers > .row:has(hr),
body:has(form#form_resultallusers) #form_resultallusers > .rowl {
    grid-column: 1 / -1;
}

body:has(form#form_resultallusers) #form_resultallusers > .row:has(hr) { margin: 0; }
body:has(form#form_resultallusers) #form_resultallusers > .rowl { min-width: 0; overflow-x: auto; }
body:has(form#form_resultallusers) main#maincontent > .container > .pagehelp { margin-top: 14px; }

@media (max-width: 900px) {
    body:has(form#form_resultallusers) #form_resultallusers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body:has(form#form_resultallusers) #form_resultallusers > .row:has(#enddate) { grid-column: 2; grid-row: 2; }
    body:has(form#form_resultallusers) #form_resultallusers > .row:has(#group_id) { grid-column: 1; grid-row: 3; }
    body:has(form#form_resultallusers) #form_resultallusers > .row:has(#display_mode) { grid-column: 2; grid-row: 3; }
    body:has(form#form_resultallusers) #form_resultallusers > .row:has(#show_graph) { grid-column: 1; grid-row: 4; }
    body:has(form#form_resultallusers) #form_resultallusers > .row:has(#selectcategory) { grid-column: 2; grid-row: 4; }
}

@media (max-width: 560px) {
    body:has(form#form_resultallusers) main#maincontent > .container > .tceformbox { padding: 14px; }
    body:has(form#form_resultallusers) #form_resultallusers { grid-template-columns: minmax(0, 1fr); gap: 13px; }
    body:has(form#form_resultallusers) #form_resultallusers > .row:has(#test_id),
    body:has(form#form_resultallusers) #form_resultallusers > .row:has(#startdate),
    body:has(form#form_resultallusers) #form_resultallusers > .row:has(#enddate),
    body:has(form#form_resultallusers) #form_resultallusers > .row:has(#group_id),
    body:has(form#form_resultallusers) #form_resultallusers > .row:has(#display_mode),
    body:has(form#form_resultallusers) #form_resultallusers > .row:has(#show_graph),
    body:has(form#form_resultallusers) #form_resultallusers > .row:has(#selectcategory) { grid-column: 1; grid-row: auto; }
    body:has(form#form_resultallusers) #form_resultallusers > .row:has(#selectcategory) { align-items: stretch; }
    body:has(form#form_resultallusers) #form_resultallusers #selectcategory { width: 100%; }
}

/* Last-loaded timer rules keep the label and timestamp together on all public pages. */
body.pcc-public-authenticated > header.header > #timersection {
    left: 24px;
    right: auto;
    width: min(330px, calc(100% - 230px));
    max-width: calc(100% - 230px);
}

body.pcc-public-authenticated > header.header #timerform,
body.pcc-public-authenticated > header.header #timerform > div[role="timer"] {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

body.pcc-public-authenticated > header.header #timerform > div[role="timer"] {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    white-space: nowrap;
}

body.pcc-public-authenticated > header.header #timer {
    box-sizing: border-box;
    flex: 0 1 220px;
    width: 220px;
    min-width: 0;
    max-width: 100%;
    padding: 7px 8px;
    border: 1px solid #dbe5ef;
    border-radius: 9px;
    background: #f8fafc;
    color: #26384b;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

@media (max-width: 560px) {
    body.pcc-public-authenticated > header.header > #timersection {
        left: 8px;
        right: 8px;
        bottom: 6px;
        width: auto;
        max-width: none;
    }
    body.pcc-public-authenticated > header.header .timerlabel { display: inline; }
    body.pcc-public-authenticated > header.header #timer { flex: 1 1 0; width: auto; max-width: 100%; }
}

/* The timestamp begins beside its label, without centering whitespace inside the field. */
body.pcc-public-authenticated > header.header #timerform > div[role="timer"] { justify-content: flex-start; }
body.pcc-public-authenticated > header.header #timer {
    flex-basis: 195px;
    width: 195px;
    text-align: left;
    float: none !important;
    margin: 0 !important;
}

/* Lock the public clock label and timestamp into one compact, predictable row. */
body.pcc-public-authenticated > header.header #timerform > div[role="timer"] {
    position: relative;
    display: block !important;
    min-height: 34px;
    line-height: 34px;
}
body.pcc-public-authenticated > header.header #timerform .timerlabel { display: inline-block; line-height: 34px; }
body.pcc-public-authenticated > header.header #timer {
    position: absolute !important;
    top: 0;
    left: 40px;
    height: 34px;
    line-height: normal;
    text-align: left !important;
}
body.pcc-public-authenticated > header.header #timerform > div[role="timer"] { text-align: left !important; }
body.pcc-public-authenticated > header.header #timerform .timerlabel {
    position: absolute;
    top: 0;
    left: 0;
    text-align: left !important;
}

/* On phones, show the test list as vertical cards so the action control is
   always in view and the page scrolls vertically instead of trapping users
   inside a narrow horizontal table. */
@media (max-width: 560px) {
    body.pcc-public-authenticated > main#maincontent.body .tcecontentbox.public-test-list {
        overflow: visible;
        padding: 10px;
    }

    body.pcc-public-authenticated > main#maincontent.body .public-test-list table.testlist {
        display: block;
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        overflow: visible;
        white-space: normal;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        table-layout: fixed;
    }

    body.pcc-public-authenticated > main#maincontent.body .public-test-list table.testlist thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        clip-path: inset(50%);
    }

    body.pcc-public-authenticated > main#maincontent.body .public-test-list table.testlist tbody {
        display: block;
    }

    body.pcc-public-authenticated > main#maincontent.body .public-test-list table.testlist tbody tr {
        display: flex;
        flex-wrap: wrap;
        gap: 0;
        min-width: 0;
        overflow: hidden;
        margin-bottom: 10px;
        border: 1px solid #dce5ef;
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 3px 10px rgba(25, 45, 69, 0.05);
    }

    body.pcc-public-authenticated > main#maincontent.body .public-test-list table.testlist tbody td {
        display: block;
        box-sizing: border-box;
        flex: 1 1 50%;
        width: 50%;
        min-width: 0;
        padding: 9px 10px;
        overflow-wrap: anywhere;
        white-space: normal;
        border: 0;
        border-bottom: 1px solid #edf1f5;
        text-align: left;
        line-height: 1.4;
    }

    body.pcc-public-authenticated > main#maincontent.body .public-test-list table.testlist tbody td:first-child {
        flex-basis: 100%;
        width: 100%;
        padding: 12px 10px;
        font-size: 1rem;
        font-weight: 700;
    }

    body.pcc-public-authenticated > main#maincontent.body .public-test-list table.testlist tbody td:nth-child(4),
    body.pcc-public-authenticated > main#maincontent.body .public-test-list table.testlist tbody td:nth-child(5) {
        flex-basis: 100%;
        width: 100%;
    }

    body.pcc-public-authenticated > main#maincontent.body .public-test-list table.testlist tbody td::before {
        display: block;
        margin-bottom: 3px;
        color: #718198;
        content: attr(data-label);
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    body.pcc-public-authenticated > main#maincontent.body .public-test-list table.testlist tbody td:first-child::before {
        display: none;
    }

    body.pcc-public-authenticated > main#maincontent.body .public-test-list table.testlist tbody td:nth-child(5) {
        padding-top: 8px;
        border-bottom: 0;
    }

    body.pcc-public-authenticated > main#maincontent.body .public-test-list table.testlist tbody td:nth-child(5) a {
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        width: 100%;
        min-height: 46px;
        padding: 10px 14px;
        border-radius: 8px;
        font-size: 1rem;
        font-weight: 700;
        line-height: 1.25;
        text-align: center;
        white-space: normal;
    }

    body.pcc-public-authenticated .popupcontainer > .row .xmlbutton {
        box-sizing: border-box;
        flex: 1 1 140px;
        min-width: min(100%, 140px);
        min-height: 48px;
    }

    body.pcc-public-authenticated .popupcontainer > .row {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    body.pcc-public-authenticated > main#maincontent.body {
        min-width: 0;
        overflow-x: hidden;
        overflow-y: visible;
    }
}

/* Fullscreen exam settings hide controls on desktop; phones still need the
   question navigation and finish controls to remain usable. */
@media (max-width: 560px) {
    body.pcc-public-authenticated:has(form#testform style) > header.header,
    body.pcc-public-authenticated:has(form#testform style) > footer.footer > .userbar,
    body.pcc-public-authenticated:has(form#testform style) > main#maincontent > h1,
    body.pcc-public-authenticated:has(form#testform style) #testform .navlink,
    body.pcc-public-authenticated:has(form#testform style) #testform .testcomment,
    body.pcc-public-authenticated:has(form#testform style) #testform #terminatetest,
    body.pcc-public-authenticated:has(form#testform style) #maincontent .pagehelp {
        visibility: visible !important;
    }

    body.pcc-public-authenticated:has(form#testform style) > header.header { display: flex !important; }
    body.pcc-public-authenticated:has(form#testform style) > footer.footer > .userbar { display: flex !important; }
    body.pcc-public-authenticated:has(form#testform style) > main#maincontent > h1,
    body.pcc-public-authenticated:has(form#testform style) #testform .testcomment,
    body.pcc-public-authenticated:has(form#testform style) #maincontent .pagehelp { display: block !important; }

    body.pcc-public-authenticated:has(form#testform style) #testform .navlink {
        display: flex !important;
    }

    body.pcc-public-authenticated:has(form#testform style) #testform #terminatetest {
        display: inline-flex !important;
    }

    body.pcc-public-authenticated > main#maincontent.body:has(form#testform) {
        padding-bottom: 28px;
    }
}

/* On touch layouts, use an accessible drawer instead of the narrow icon rail.
   This keeps nested account links usable without hover. */
.pcc-public-menu-toggle,
.pcc-public-menu-backdrop { display: none; }

@media (max-width: 800px) {
    body.pcc-public-authenticated > header.header {
        left: 0 !important;
        height: 64px !important;
        padding: 0 112px 0 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px;
        background: #ffffff !important;
        border-bottom: 1px solid #e2e8f0;
    }

    body.pcc-public-authenticated > header.header > .left {
        position: static !important;
        z-index: 2;
        display: flex !important;
        align-items: center !important;
        gap: 10px;
        width: auto !important;
        max-width: none !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        background-image: none !important;
        flex-shrink: 0;
    }

    .pcc-mobile-header-brand {
        display: inline-flex;
        align-items: center;
        flex-shrink: 0;
        text-decoration: none;
    }

    .pcc-mobile-header-brand img {
        display: block;
        height: 36px;
        width: auto;
        max-width: 112px;
        object-fit: contain;
    }

    body.pcc-public-authenticated > header.header > #timersection {
        position: static !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 0 0 auto !important;
        display: flex !important;
        align-items: center;
    }

    body.pcc-public-authenticated > header.header #timerform > div[role="timer"] {
        position: static !important;
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        min-height: 0 !important;
        line-height: 1.2 !important;
    }

    body.pcc-public-authenticated > header.header #timerform .timerlabel {
        position: static !important;
        display: none;
        line-height: 1.2 !important;
    }

    body.pcc-public-authenticated > header.header #timer {
        position: static !important;
        top: auto !important;
        left: auto !important;
        flex: 0 0 auto !important;
        width: auto !important;
        height: auto !important;
        padding: 6px 10px !important;
        font-size: 0.76rem;
    }

    body.pcc-public-authenticated > footer.footer {
        height: 64px;
        right: 12px;
    }

    .pcc-public-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        width: 44px;
        height: 42px;
        border: 1px solid #d8e3ef;
        border-radius: 9px;
        background: #f8fafc;
        color: #173b62;
        font: inherit;
        font-size: 1.2rem;
        cursor: pointer;
    }

    .pcc-menu-toggle-label { display: none; }

    body.pcc-public-authenticated > nav#scrollayer {
        z-index: 30;
        width: min(290px, 84vw) !important;
        padding: 132px 12px 20px !important;
        transform: translateX(-105%);
        transition: transform 180ms ease;
        visibility: hidden;
    }

    body.pcc-public-authenticated > nav#scrollayer::before {
        top: 18px !important;
        left: 24px !important;
        width: 178px !important;
        height: 96px !important;
    }

    body.pcc-public-authenticated > nav#scrollayer ul.menu > li > a,
    body.pcc-public-authenticated > nav#scrollayer ul.menu > li > button.menu-parent-toggle,
    body.pcc-public-authenticated > nav#scrollayer ul.menu > li > span.active {
        min-height: 44px !important;
        padding: 12px 14px 12px 44px !important;
        overflow: visible !important;
        color: #334155 !important;
        font-size: 0.96rem !important;
    }

    body.pcc-public-authenticated > nav#scrollayer ul.menu > li > a:hover,
    body.pcc-public-authenticated > nav#scrollayer ul.menu > li > button.menu-parent-toggle:hover,
    body.pcc-public-authenticated > nav#scrollayer ul.menu > li:has(> span.active) > span.active,
    body.pcc-public-authenticated > nav#scrollayer ul.menu > li > a.active,
    body.pcc-public-authenticated > nav#scrollayer ul.menu > li > button.menu-parent-toggle[aria-current="page"] {
        color: #0f172a !important;
    }

    body.pcc-public-authenticated > nav#scrollayer ul.menu > li::before { left: 14px !important; }

    body.pcc-public-authenticated > nav#scrollayer ul.menu li.has-children.open > ul {
        display: block !important;
    }

    body.pcc-public-authenticated > main#maincontent.body {
        margin-left: 0 !important;
    }

    .pcc-public-menu-backdrop {
        position: fixed;
        z-index: 29;
        inset: 0;
        display: block;
        border: 0;
        background: rgba(8, 25, 44, 0.42);
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
    }

    body.pcc-public-authenticated.pcc-public-menu-open > nav#scrollayer {
        transform: translateX(0);
        visibility: visible;
    }

    body.pcc-public-authenticated.pcc-public-menu-open > .pcc-public-menu-backdrop {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 560px) {
    body.pcc-public-authenticated > header.header {
        height: auto !important;
        min-height: 92px;
        flex-direction: column;
        align-items: stretch !important;
        justify-content: center !important;
        padding: 8px 12px 8px !important;
        gap: 6px;
    }

    body.pcc-public-authenticated > header.header > .left {
        padding-right: 96px !important;
        min-height: 42px;
    }

    body.pcc-public-authenticated > header.header > #timersection {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }

    body.pcc-public-authenticated > header.header #timerform > div[role="timer"] {
        justify-content: flex-start !important;
        width: 100%;
    }

    body.pcc-public-authenticated > header.header #timerform .timerlabel {
        display: inline;
        font-size: 0.78rem;
        color: #64748b;
    }

    body.pcc-public-authenticated > header.header #timer {
        flex: 1 1 auto !important;
        width: auto !important;
        text-align: left !important;
    }

    body.pcc-public-authenticated > footer.footer {
        height: 58px;
        right: 12px;
    }

    body.pcc-public-authenticated > main#maincontent.body {
        padding-top: 112px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.pcc-public-authenticated > nav#scrollayer,
    .pcc-public-menu-backdrop { transition: none; }
}

/* Testbook-style student examination list cards on public/code/index.php */
body.pcc-public-authenticated .public-test-list .pcc-exam-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

body.pcc-public-authenticated .pcc-exam-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
    overflow: hidden;
    transition: box-shadow 0.16s ease, border-color 0.16s ease;
}

body.pcc-public-authenticated .pcc-exam-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

body.pcc-public-authenticated .pcc-exam-card.is-password {
    border-left: 4px solid #f59e0b;
}

body.pcc-public-authenticated .pcc-exam-card.is-expired {
    opacity: 1;
}

body.pcc-public-authenticated .pcc-exam-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
}

body.pcc-public-authenticated .pcc-exam-card-main {
    flex: 1 1 auto;
    min-width: 0;
}

body.pcc-public-authenticated .pcc-exam-card-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

body.pcc-public-authenticated .pcc-exam-card-title {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
}

body.pcc-public-authenticated .pcc-exam-card-title a {
    color: #0f172a;
    text-decoration: none;
    font-weight: 700;
}

body.pcc-public-authenticated .pcc-exam-card-title a:hover {
    color: #2563eb;
    text-decoration: underline;
}

body.pcc-public-authenticated .pcc-exam-badges {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

body.pcc-public-authenticated .pcc-exam-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 12px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

body.pcc-public-authenticated .pcc-exam-badge-section {
    background: #e0f2fe;
    color: #0369a1;
}

body.pcc-public-authenticated .pcc-exam-badge-lock {
    background: #fef3c7;
    color: #92400e;
}

body.pcc-public-authenticated .pcc-exam-badge-progress {
    background: #fef9c3;
    color: #854d0e;
}

body.pcc-public-authenticated .pcc-exam-badge-done {
    background: #dcfce7;
    color: #16a34a;
}

body.pcc-public-authenticated .pcc-exam-badge-expired {
    background: #e5e7eb;
    color: #4b5563;
}

body.pcc-public-authenticated .pcc-exam-badge-closed {
    background: #374151;
    color: #ffffff;
}

body.pcc-public-authenticated .pcc-exam-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    color: #4b5563;
    font-size: 0.85rem;
    font-weight: 500;
}

body.pcc-public-authenticated .pcc-exam-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

body.pcc-public-authenticated .pcc-exam-meta-item[title="Questions"] > span[aria-hidden="true"] {
    color: #e11d48;
    font-weight: 700;
}

body.pcc-public-authenticated .pcc-exam-sections-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

body.pcc-public-authenticated .pcc-exam-section-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid #dbe5ef;
    border-radius: 6px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 600;
}

body.pcc-public-authenticated .pcc-exam-section-chip em {
    font-style: normal;
    color: #0369a1;
    font-weight: 700;
}

body.pcc-public-authenticated .pcc-exam-result {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 4px 12px;
    border-radius: 6px;
    background: #e2e8f0;
    color: #1e293b;
    font-size: 0.84rem;
    font-weight: 600;
}

body.pcc-public-authenticated .pcc-exam-result.is-passed {
    background: #dcfce7;
    color: #166534;
}

body.pcc-public-authenticated .pcc-exam-result.is-failed {
    background: #fee2e2;
    color: #991b1b;
}

body.pcc-public-authenticated .pcc-exam-result a {
    display: none !important;
}

body.pcc-public-authenticated .pcc-exam-card-cta {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 140px;
}

body.pcc-public-authenticated .pcc-exam-cta-badges {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

body.pcc-public-authenticated .pcc-exam-cta-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

body.pcc-public-authenticated .pcc-exam-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 136px;
    min-height: 40px;
    padding: 0 24px;
    border: none;
    border-radius: 9999px;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.90rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.28);
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

body.pcc-public-authenticated .pcc-exam-btn:hover {
    background: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

body.pcc-public-authenticated .pcc-exam-btn-continue {
    background: #2563eb;
    border: none;
    color: #ffffff;
}

body.pcc-public-authenticated .pcc-exam-btn-repeat {
    background: #2563eb;
    border: none;
    color: #ffffff;
}

body.pcc-public-authenticated .pcc-exam-btn-outline {
    background: #2563eb;
    border: none;
    color: #ffffff;
}

body.pcc-public-authenticated .pcc-exam-btn-outline:hover {
    background: #1d4ed8;
    color: #ffffff;
}

body.pcc-public-authenticated .pcc-exam-status-note {
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 700;
}

body.pcc-public-authenticated .pcc-exam-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 24px;
    border-top: 1px solid #f1f5f9;
    background: #ffffff;
    color: #64748b;
    font-size: 0.80rem;
}

body.pcc-public-authenticated .pcc-exam-window {
    color: #64748b;
    font-weight: 500;
    font-size: 0.80rem;
}

body.pcc-public-authenticated .pcc-exam-info-link a {
    color: #1e293b;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.80rem;
}

body.pcc-public-authenticated .pcc-exam-info-link a:hover {
    color: #2563eb;
    text-decoration: underline;
}

@media (max-width: 680px) {
    body.pcc-public-authenticated .pcc-exam-card-body {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    body.pcc-public-authenticated .pcc-exam-card-cta {
        justify-content: stretch;
    }

    body.pcc-public-authenticated .pcc-exam-btn {
        width: 100%;
    }

    body.pcc-public-authenticated .pcc-exam-card-footer {
        padding: 9px 16px;
    }
}
