*, *::before, *::after {
    box-sizing: border-box;
}

@media only screen and (orientation: portrait) {
    #turn { display: block;}
    #rotate-required-container { display: none;}
}

@media only screen and (orientation: landscape) {
    #turn { display: none;}
    #rotate-required-container { display: block;}
}

/* ========================================
   GENERAL STYLES (Alphabetical)
   ======================================== */

audio {
    display: block;
    width: 100%;
    margin: 2rem auto 1rem auto;
    max-width: 20rem;
}

body {
    height: 100%;
    margin: 0;
    padding: 0 0 10rem 0;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial;
    background: #f7f9fc; 
    color: black;
    font-size: 1rem;
}

h1 {
    margin: 0.5rem;
}

.start-here-badge h4 {
    margin-top: 0.5rem;
    margin-bottom: 0 !important;
    text-align: center;
}

header { 
    display:flex; 
    gap:1rem; 
    align-items:center
}

[popover] {
    padding: 1rem;
    border: 0.06rem solid black;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    background-color: #f9f9f9;
    inset: auto auto auto 100%;
    display: inline-block;
}

[popover]:popover-open {
    border-color: #2d4563;
    margin-top: 0;
}

/* ========================================
   BADGE STYLES (Alphabetical)
   ======================================== */

.badge {
    width: 3rem;
    height: 3rem;
}

.big-phrases {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1.5rem;
    margin: 2rem auto;
    font-size: clamp(1rem, 5vw, 4rem);
    font-weight: bold;
    max-width: 95vw;
    width: 100%;
    min-width: 0;
}

.buttons-exam {
    display: flex;
    justify-content: center;
    margin: 2rem auto 0 auto;
    width: fit-content;
}

.buttons-exam div {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 1rem;
    align-items: center;
    margin: auto;
}

.buttons-exam div a,
.page-contents div a,
.page-contents-under-sticky div a {
    place-items: center;
    border-radius: 1.0625rem;
    padding: 1rem 1rem;
    background-color: #37547a;
    color: white;
    text-decoration: none;
    text-align: center;
}

/* ========================================
   CARD DISPLAY STYLES (Alphabetical)
   ======================================== */

#displayCardBtn {
    display: inline-block;
    padding: 0.62rem 1.25rem;
    margin-bottom: 1.25rem;
    font-size: 1rem;
    cursor: pointer;
    background-color: #5a7fa8;
    color: white;
    border: none;
    border-radius: 0.25rem;
}

#displayCardBtn:hover {
    background-color: #2d4563;
    transform: translateY(-0.25rem);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
}

/* ========================================
   CLEAR HISTORY STYLES (Alphabetical)
   ======================================== */

.clear-history-btn {
    padding: 0.75rem 1.5rem;
    background-color: #d32f2f;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 2rem;
    transition: background-color 0.3s ease;
}

.clear-history-btn:hover {
    background-color: #b71c1c;
    transform: translateY(-0.25rem);
    box-shadow: 0 0.5rem 1rem rgba(211, 47, 47, 0.3);
}

.clear-history-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

/* ========================================
   COMPLETE EXAM STYLES (Alphabetical)
   ======================================== */

.complete-exam-btn {
    padding: 1rem 2rem;
    background-color: #2b8a3e;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, opacity 0.3s ease;
}

.complete-exam-btn:hover:not(:disabled) {
    background-color: #1e6b2f;
    transform: translateY(-0.25rem);
    box-shadow: 0 0.5rem 1.5rem rgba(43, 138, 62, 0.4);
}

.complete-exam-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 0.25rem 0.75rem rgba(43, 138, 62, 0.3);
}

.complete-exam-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.button-notice-message {
    margin-top: 0.75rem;
    color: #d9534f;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
}

.exam-complete-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 3rem auto 2rem;
    padding: 2rem;
}

/* ========================================
   EXAM CONTAINER STYLES (Alphabetical)
   ======================================== */

.exam-container {
    position: relative;
    width: calc(100% - 2rem);
    max-width: 45rem;
    margin: 10rem auto 1rem auto;
    overflow: visible;
    border: 0.06rem solid #ccc;
    padding: 0.25rem;
    box-sizing: border-box;
}

.exam-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.exam-details-modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    max-width: 37.5rem;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 0.25rem 0.38rem rgba(0, 0, 0, 0.1);
    position: relative;
}

.exam-nav-buttons {
    text-align: center;
    margin-top: 1.25rem;
}

.exam-nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    margin: 0 auto 3rem;
    gap: 2rem;
    width: fit-content;
}

.exam-nav-links a {
    padding: 0.75rem 1.5rem;
    background-color: #37547a;
    color: white;
    text-decoration: none;
    border-radius: 0.25rem;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.exam-nav-links a:hover {
    background-color: #6b8fba;
    color: black;
    transform: translateY(-0.25rem);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* ========================================
   MODAL BUTTON STYLES (Alphabetical)
   ======================================== */

.modal-button {
    padding: 0.75rem 1.5rem;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    margin: 0 0.5rem;
}

.modal-button-container {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-button:hover {
    opacity: 0.9;
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
}

.modal-close-btn {
    background-color: #37547a;
}

.modal-delete-btn {
    background-color: #d32f2f;
}

.modal-edit-btn {
    background-color: #5a7fa8;
}

/* ========================================
   NAVBAR STYLES (Alphabetical)
   ======================================== */

.navbar {
    background-color: #37547a;
    overflow: hidden;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    height: auto;
    display: flex;
    flex-direction: row;
    align-content: stretch;
    z-index: 1500;
}

.navbar a {
    float: center;
    color: #f2f2f2;
    text-align: center;
    padding: 1rem 0rem 1rem 0rem;
    flex: 1;
    text-decoration: none;
    font-size: 1rem;
    align-items: center;
}

.navbar a:hover {
    background-color: #ddd;
    color: black;
}

.navbar a:hover img {
    filter: invert(0%);
}

.navbar a.active {
    background-color: #87a6e4;
}

.navbar a img {
    filter: invert(100%);
}

.navbar a p {
    margin: 0;
    font-size: 0.8rem;
}

/* ========================================
   OPTION BUTTON STYLES (Alphabetical)
   ======================================== */

.options {
    margin-top: 2rem;
}

.option-btn {
    display: block;
    width: 80%;
    min-width: 17.5rem;
    margin: 0.62rem auto;
    padding: 0.62rem;
    cursor: pointer;
    background-color: #37547a;
    color: white;
    box-sizing: border-box;
}

.option-btn.selected {
    background-color: #87a6e4;
    color: black;
}

.un-explanation-input {
    display: block;
    width: 80%;
    min-width: 17.5rem;
    margin: 0.62rem auto;
    padding: 0.62rem;
    font-family: inherit;
    font-size: 1rem;
    border: 0.06rem solid #999;
    border-radius: 0.25rem;
    resize: vertical;
    min-height: 6rem;
    box-sizing: border-box;
}

.un-explanation-input:focus {
    outline: none;
    border-color: #3367D6;
    box-shadow: 0 0 0.25rem rgba(51, 103, 214, 0.5);
}

.un-explanation-input:read-only {
    background-color: #f5f5f5;
    color: #333;
    border-color: #ccc;
    cursor: default;
}

.un-done-btn {
    display: block;
    width: 60%;
    min-width: 10rem;
    margin: 0.38rem auto 0.62rem auto;
    padding: 0.38rem 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    background-color: #5a7fa8;
    color: white;
    border: none;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.un-done-btn:hover {
    background-color: #2d4563;
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

/* ========================================
   PAGE CONTENT STYLES (Alphabetical)
   ======================================== */

.page-contents {
    display: grid;
    place-items: center;
    width: 100%;
    padding: 2rem 0rem 2rem 0rem;
    row-gap: 2rem;
    flex-wrap: wrap;
}

.page-contents-card {
    display: grid;
    place-items: center;
    width: 100%;
    padding: 2rem 1.5rem 2rem 1.5rem;
    row-gap: 2rem;
    flex-wrap: wrap;
}

.page-contents-under-sticky {
    display: grid;
    place-items: center;
    width: 100%;
    padding: 2rem auto 2rem auto;
    row-gap: 2rem;
    margin-top: 10rem;
    flex-wrap: wrap;
}

.page-contents audio, .page-contents-card audio, .page-contents-under-sticky audio {
    max-width: 15rem;
    width: 100%;
    margin: 0 auto;
}

.page-contents div, .page-contents-card div, .page-contents-under-sticky div {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 1rem;
    row-gap: 1rem;
    align-items: flex-start;
}

.page-contents div a:hover,
.page-contents-under-sticky div a:hover {
    background-color: #5a7fa8;
    color: black;
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.page-contents img,
.page-contents-under-sticky img {
    max-height: 60vh;
    width: auto;
    object-fit: contain;
}

.page-contents p, .page-contents-card p, .page-contents-under-sticky p {
    display: block;
    width: 100%;
    max-width: 95%;
    padding: 0 1rem;
    text-align: center;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Primary Exam Section Styles */
.primary-exam-section {
    display: flex;
    flex-direction: column;
    align-items: center !important;
    justify-content: center;
    place-items: center;
    place-content: center;
    gap: 1rem;
    position: relative;
    flex-basis: 100%;
}

.start-here-badge {
    color: #2b8a3e;
    font-weight: bold;
    font-size: 0.9rem;
    letter-spacing: 0.05rem;
    background: none;
    padding: 0;
    text-align: center;
}

.primary-exam-btn {
    display: inline-block;
    padding: 1.5rem 3rem;
    font-size: 1.5rem;
    font-weight: bold;
    background-color: #2b8a3e;
    color: white;
    border-radius: 0.75rem;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 0.5rem 1.5rem rgba(43, 138, 62, 0.4);
    min-width: 12rem;
}

.primary-exam-btn:hover {
    background-color: #1e6b2f;
    color:#e9ffed !important;
    transform: translateY(-0.25rem);
    box-shadow: 0 0.75rem 2rem rgba(43, 138, 62, 0.5);
}

.primary-exam-btn:active {
    transform: translateY(0);
    box-shadow: 0 0.25rem 0.75rem rgba(43, 138, 62, 0.3);
}

.primary-exam-description {
    font-size: 1rem;
    color: #666;
    font-style: italic;
    margin: 0;
}

/* Secondary Exams Section Styles */
.secondary-exams {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 0.75rem;
    justify-content: center;
    max-width: 50rem;
    margin: 0 auto;
}

.secondary-exams a {
    padding: 0.75rem 1rem;
    background-color: #37547a;
    color: white;
    text-decoration: none;
    text-align: center;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.secondary-exams a:hover {
    background-color: #5a7fa8;
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
}

.secondary-exams a:active {
    transform: translateY(0);
    background-color: #2d4563;
}

/* More Info Page Styles */
.section {
    margin-bottom: 1.875rem;
    text-align: center;
    place-items: center;
}

.section h2 {
    color: #5a7fa8;
    margin-top: 1.25rem;
    margin-bottom: 0.94rem;
}

.guidelines-links {
    margin: 1.25rem;
}

.guidelines-links p {
    margin: 0.62rem 0;
    white-space: nowrap;
}

.guidelines-links a {
    color: #5a7fa8;
}

.guidelines-links a:hover {
    color: black;
    text-decoration: none;
}

table {
    width: 80%;
    max-width: 50rem;
    border-collapse: collapse;
    margin: 1.25rem 0;
}

th, td {
    border: 0.06rem solid #ddd;
    padding: 0.75rem;
    text-align: left;
}

th {
    background-color: #2d4563;
    color: white;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f0f0f0;
}

.dosing-info {
    background-color: #f9f9f9;
    padding: 0.94rem;
    border-left: 0.25rem solid #5a7fa8;
    margin: 0.94rem 0;
}

.contact-section {
    background-color: #e8f4f8;
    padding: 0.94rem;
    margin-top: 1.875rem;
    place-items: center;
    text-align: center;
}

.contact-section h2 {
    margin-top: 0;
}

.contact-section p a {
    color: #37547a;
    place-items: center;
    text-decoration: underline;
    text-align: center;
}

/* ========================================
   POPOVER STYLES (Alphabetical)
   ======================================== */

.popover {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    margin: 0 !important;
    border: none;
    padding: 1rem;
    display: none !important;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    z-index: 3000;
    box-sizing: border-box;
    transform: none !important;
    contain: layout !important;
}

.popover .popover-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.popover .popover-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    margin: 0 !important;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #444;
}

.popover .popover-content {
    background: #fff;
    color: #000;
    max-width: 45rem;
    width: 100%;
    max-height: 85vh;
    overflow: auto;
    padding: 1.25rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.62rem 1.88rem rgba(0,0,0,0.3);
    position: relative;
}

.popover .popover-content .big-phrases p {
    padding: 0.25rem 0.5rem;
    margin: 0.25rem 0;
    background-color: #f5f5f5;
    border-radius: 0.5rem;
    border-left: 0.25rem solid #5a7fa8;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    max-width: 100%;
    min-width: 0;
}

.popover .popover-content img {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: calc(85vh - 3rem);
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.popover-toggle {
    display: none;
}

.popover-toggle:checked ~ .popover {
    display: flex !important;
}

/* ========================================
   POPOVER BUTTON STYLES (Alphabetical)
   ======================================== */

label.popover-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
}

label.popover-btn:focus {
    outline: 0.19rem solid rgba(135,166,228,0.6);
    outline-offset: 0.125rem;
    border-radius: 50%;
}

label.popover-btn img {
    width: 1.5rem;
    height: 1.5rem;
    min-width: 1rem;
    min-height: 1rem;
    display: block;
}

/* ========================================
   RESULTS BREAKDOWN STYLES (Alphabetical)
   ======================================== */

.results-breakdown {
    text-align: left;
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: #222;
}

.results-breakdown > div {
    margin: 0.25rem 0;
}

.results-breakdown strong {
    display: inline-block;
}

/* ========================================
   SAVED SCORES TABLE STYLES (Alphabetical)
   ======================================== */

.scores-table {
    width: 100%;
    border-collapse: collapse;
}

.scores-table thead tr {
    background-color: #37547a;
    color: white;
}

.scores-table th,
.scores-table td {
    padding: 1rem;
    border: 0.06rem solid #ddd;
}

.scores-table th {
    text-align: left;
}

.scores-table td {
    border-bottom: 0.06rem solid #ddd;
}

.scores-table-action {
    text-align: center;
    justify-items: center;
    display: grid;
    column-gap: 1rem;
    row-gap: 2rem;
}

.scores-table-date {
    text-align: center;
    font-size: 0.9em;
}

.scores-table-exam-name {
    text-align: left;
}

.scores-table-score {
    text-align: center;
    font-weight: bold;
    color: #2b8a3e;
    font-size: 1.1em;
}

/* ========================================
   SCORE BOARD STYLES (Alphabetical)
   ======================================== */

.score-board {
    text-align: center;
    margin-top: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
}

/* ========================================
   SLIDE STYLES (Alphabetical)
   ======================================== */

.slide {
    width: 100%;
    max-width: 100%;
    padding: 1.25rem;
    box-sizing: border-box;
    text-align: center;
    margin-bottom: 1rem;
    place-content: center;
}

.slide p {
    display: block;
    margin: 0.5rem 0;
    place-content: center;
}

.slides-container {
    display: block;
    overflow: visible;
    scroll-behavior: auto;
    width: 100%;
    margin: 8rem auto auto auto;
}

/* ========================================
   ANSWER ITEM STYLES (Alphabetical)
   ======================================== */

.answer-breakdown {
    background-color: #f5f5f5;
    padding: 1rem;
    border-radius: 0.5rem;
    max-height: 25rem;
    overflow-y: auto;
}

.answer-item {
    margin-bottom: 1rem;
    border-left: 0.25rem solid #37547a;
    padding-left: 1rem;
}

.answer-item em {
    color: #666;
    display: block;
}

.answer-item strong {
    display: block;
    margin-bottom: 0.25rem;
}

/* ========================================
   STATUS & MISC STYLES (Alphabetical)
   ======================================== */

.small-badge {
    width: 1.875rem;
    height: 1.875rem;
    filter: invert(8%) sepia(61%) saturate(343%) hue-rotate(131deg) brightness(90%) contrast(87%);
}

.status {
    margin-top: 1rem;
    color: #2b8a3e;
}

.title-prompt {
    border-top: 0.06rem solid white;
    background-color: #6b8fba;
    display: grid;
    place-items: center;
    text-align: center;
    width: 100%;
    color: rgb(24, 37, 37);
}

.title-prompt.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
}

.title-prompt-exam {
    border-top: 0.06rem solid white;
    background-color: #6b8fba;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    width: 100%;
    color: rgb(24, 37, 37);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.title-prompt h1 {
    margin: 1.5rem;
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    font-size: clamp(0.85rem, 5vw, 2rem);
}

.title-prompt h1 a {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.title-prompt-exam h2 {
    margin: 0;
}

.title-with-info-popover {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.title-with-info-popover h2 {
    margin: 0;
}

.view-exam-btn {
    padding: 0.5rem 1rem;
    background-color: #37547a;
    color: white;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.view-exam-btn:hover {
    background-color: #6b8fba;
    color: black;
}

/* ========================================
   EXAM METADATA & RESULTS STYLES (Alphabetical)
   ======================================== */

.editable-field {
    padding: 0.5rem 0.75rem;
    border: 0.0625rem solid #ccc;
    border-radius: 0.25rem;
    font-size: 1rem;
    font-family: inherit;
}

.editable-field:focus {
    outline: none;
    border-color: #5a7fa8;
    box-shadow: 0 0 0 0.19rem rgba(90, 127, 168, 0.1);
}

.exam-answers-section {
    margin: 2rem auto;
    max-width: 37.5rem;
    overflow-x: auto;
}

.exam-answers-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background-color: white;
    font-size: 0.9rem;
}

.exam-answers-table thead {
    background-color: #37547a;
    color: white;
}

.exam-answers-table th,
.exam-answers-table td {
    padding: 0.75rem;
    border: 0.06rem solid #ddd;
    text-align: left;
}

.exam-answers-table th {
    font-weight: bold;
    font-size: 0.85rem;
}

.exam-answers-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.exam-answers-table tbody tr:hover {
    background-color: #f0f0f0;
}

.exam-answers-table-exam {
    font-weight: 500;
    color: #37547a;
}

.exam-metadata-form {
    max-width: 37.5rem;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #f9f9f9;
    border-radius: 0.5rem;
    border: 0.06rem solid #ddd;
    width: 100%;
    box-sizing: border-box;
}

.location-input,
.notes-input {
    width: 100%;
    max-width: 25rem;
}

.location-input {
    min-width: 12.5rem;
}

.metadata-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
    gap: 0.5rem;
    align-items: flex-start;
}

.metadata-field label {
    font-weight: bold;
    color: #333;
    font-size: 0.95rem;
    text-align: left;
}

.metadata-field .editable-field {
    align-self: flex-start;
}

.metadata-field select,
.metadata-field input,
.metadata-field textarea {
    text-align: left;
}

.metadata-value {
    font-size: 1rem;
    color: #555;
    padding: 0.5rem 0;
}

.notes-input {
    min-height: 7.5rem;
    padding: 0.75rem;
    resize: vertical;
}

.score-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.score-input {
    max-width: 5rem;
}

.score-input.error-input {
    border: 0.125rem solid #d32f2f;
    background-color: #ffebee;
}

/* Reserve space for NIHSS Score error message to prevent layout shift */
#nihssScoreError {
    height: 1.35rem; /* Space allocated for error message even when hidden */
    color: #d32f2f;
    font-size: 0.9em;
    margin-top: 0.25rem;
}

.score-max {
    font-size: 1rem;
    color: #555;
    font-weight: bold;
}

/* Missing Entries Container */
.missing-entries-container {
    margin: 2rem auto;
    padding: 1.5rem;
    background-color: #f5f3ef;
    border-left: 0.25rem solid #d4cfc9;
    border-radius: 0.25rem;
    max-width: 37.5rem;
    text-align: center;
}

.missing-entries-container h3 {
    margin-top: 0;
    margin-bottom: 1.25rem;
    color: #6b6461;
    font-size: 1.1rem;
    font-weight: 600;
}

.missing-entries-container ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.missing-entries-container li {
    margin-bottom: 0;
}

.missing-entry-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    display: inline-block;
    border-radius: 0.25rem;
    background-color: #ff9800;
    border: 0.06rem solid #f57c00;
    transition: all 0.2s ease;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.missing-entry-link:hover {
    background-color: #f57c00;
    box-shadow: 0 0.19rem 0.38rem rgba(0, 0, 0, 0.15);
    transform: translateY(-0.12rem);
}

.missing-entry-link:active {
    transform: translateY(0);
    box-shadow: 0 0.06rem 0.12rem rgba(0, 0, 0, 0.1);
}

/* Share Exam Button in Table */
.share-exam-btn {
    padding: 0.5rem 1rem;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 0.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    margin-left: 0.5rem;
    transition: background-color 0.2s ease;
}

.share-exam-btn:hover {
    background-color: #0052a3;
}

.share-exam-btn:active {
    transform: scale(0.98);
}

/* Share Modal Overlay */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.share-modal-content {
    background-color: white;
    border-radius: 0.5rem;
    max-width: 37.5rem;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.2);
    position: relative;
}

.share-modal-header {
    padding: 1.5rem;
    border-bottom: 0.06rem solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.share-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

.share-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    transition: color 0.2s ease;
}

.share-modal-close:hover {
    color: #000;
}

.share-modal-text {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #333;
    background-color: #f9f9f9;
}

.share-modal-actions {
    padding: 1rem 1.5rem;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    border-top: 0.06rem solid #eee;
    flex-wrap: wrap;
}

.share-modal-btn {
    padding: 0.6rem 1.25rem;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 0.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.share-modal-btn:hover {
    background-color: #0052a3;
}

.share-modal-close-btn {
    background-color: #999;
}

.share-modal-close-btn:hover {
    background-color: #666;
}

/* ========================================
   MOBILE-ONLY STYLING (max-width: 768px)
   ======================================== */

@media only screen and (max-width: 48rem) {
    .guidelines-links {
        margin-left: 0.31rem;
        margin-bottom: 2rem;
    }

    .guidelines-links p {
        margin: 0.62rem 0;
        text-overflow: ellipsis;
    }

    .exam-nav-links {
        flex-wrap: wrap;
        padding: 1rem;
        gap: 0.75rem;
    }

    .exam-nav-links a {
        white-space: normal;
        flex: 1 1 auto;
        min-width: 8rem;
    }

    /* Popover mobile adjustments */
    .popover .popover-content {
        max-width: 98vw;
        max-height: 95vh;
        width: 100%;
        overflow: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0 0.5rem;
    }

    .popover .popover-content .big-phrases {
        max-width: 98vw;
        margin: 0;
        padding-right: 0.5rem;
    }

    /* Portrait images - shrink minimally to fit without cutoff */
    .popover .popover-content img.portrait {
        max-height: calc(95vh - 2rem);
        max-width: 98vw;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    /* Landscape images - rotate 90deg and maximize fit */
    .popover .popover-content img.landscape {
        max-height: 98vw;
        max-width: calc(95vh - 2rem);
        width: 100%;
        height: 100%;
        transform: rotate(90deg);
        object-fit: contain;
    }

    /* Fallback for images without specific class */
    .popover .popover-content img {
        max-height: calc(95vh - 2rem);
        max-width: 98vw;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    /* Mobile table styling */
    table {
        width: 100%;
        margin: 1.25rem auto;
    }
}