/* Brand extras that sit on top of Tailwind. Keep this file small. */

html,
body,
button,
input,
optgroup,
select,
textarea,
table,
th,
td,
p,
h1,
h2,
h3,
h4,
h5,
h6,
a,
span,
label {
    font-family: "EB Garamond", Georgia, Cambria, serif !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

html {
    scroll-behavior: smooth;
}

.btn-spinner {
    display: inline-block;
    width: 0.95em;
    height: 0.95em;
    margin-right: 0.45em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -0.15em;
    animation: btn-spin 0.6s linear infinite;
}

@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes flash-shake {
    0%,
    100% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(-6px);
    }
    40% {
        transform: translateX(6px);
    }
    60% {
        transform: translateX(-4px);
    }
    80% {
        transform: translateX(4px);
    }
}

.flash-shake {
    animation: flash-shake 0.4s ease;
}

@keyframes toast-slide-down {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-toast-slide-down {
    animation: toast-slide-down 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-item {
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease;
}

.toast-item.is-leaving {
    opacity: 0;
    transform: translateY(-16px) scale(0.95);
    pointer-events: none;
}

.js-flash.is-leaving {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
    .flash-shake,
    .animate-toast-slide-down {
        animation: none;
    }

    .toast-item,
    .toast-item.is-leaving,
    .js-flash.is-leaving {
        transform: none;
    }
}

.panel-shell {
    --sidebar-width: 16.75rem;
    --sidebar-rail: 4.75rem;
    --header-height: 4.25rem;
    min-height: 100vh;
    background: #f7f8fa;
}

.panel-top {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 50;
    display: flex;
    align-items: stretch;
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid rgba(15, 15, 15, 0.08);
}

.panel-brand {
    display: flex;
    width: var(--sidebar-width);
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 1rem;
    background: #fff;
    border-right: 1px solid rgba(15, 15, 15, 0.08);
    transition: width 0.22s ease;
}

.panel-brand img {
    display: block;
    height: 2.35rem;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.panel-sidebar {
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    z-index: 40;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    overflow: hidden;
    background: linear-gradient(180deg, #161616 0%, #0c0c0c 100%);
    color: #ececec;
    transition: width 0.22s ease, transform 0.22s ease;
}

.sidebar-portal {
    margin: 0;
    padding: 1.05rem 1.15rem 0.35rem;
    color: #c45a5f;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.85rem 0.65rem;
    overflow-y: auto;
}

.sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 2.65rem;
    padding: 0.55rem 0.7rem;
    border-radius: 0.55rem;
    color: #cfcfcf;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.sidebar-link.is-active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar-link.is-active::before {
    content: "";
    position: absolute;
    top: 0.45rem;
    bottom: 0.45rem;
    left: 0;
    width: 2px;
    background: #c45a5f;
    border-radius: 999px;
}

.sidebar-link.is-soon {
    cursor: not-allowed;
    opacity: 0.62;
}

.sidebar-icon,
.sidebar-chevron {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
}

.sidebar-icon .ti,
.sidebar-chevron .ti,
.panel-toggle .ti,
.panel-logout-btn .ti {
    font-size: 1.2rem;
    line-height: 1;
}

.sidebar-label {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-chevron {
    margin-left: auto;
    color: #8d8d8d;
}

.sidebar-soon {
    margin-left: auto;
    color: #9a9a9a;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-group-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.sidebar-group.is-open .sidebar-chevron {
    transform: rotate(90deg);
}

.sidebar-chevron {
    transition: transform 0.15s ease;
}

.sidebar-subnav {
    display: none;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.15rem 0 0.35rem 1.85rem;
}

.sidebar-group.is-open .sidebar-subnav {
    display: flex;
}

.sidebar-sublink {
    min-height: 2.15rem;
    padding: 0.4rem 0.7rem;
    font-size: 0.82rem;
}

.panel-stage {
    display: flex;
    min-width: 0;
    min-height: 100vh;
    flex-direction: column;
    padding-top: var(--header-height);
    margin-left: var(--sidebar-width);
    transition: margin-left 0.22s ease;
}

.panel-header {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    padding: 0 1.15rem;
    background: #fff;
}

.panel-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    flex-shrink: 0;
    color: #2b2b2b;
    background: #fff;
    border: 1px solid rgba(15, 15, 15, 0.12);
    border-radius: 0.55rem;
    cursor: pointer;
}

.panel-toggle:hover {
    background: #eceef2;
}

.panel-user {
    position: relative;
    margin-left: auto;
    min-width: 0;
}

.panel-user-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.panel-avatar {
    display: inline-flex;
    width: 2.35rem;
    height: 2.35rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 999px;
    background: #630007;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.panel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.panel-user-meta {
    display: none;
    min-width: 0;
    flex-direction: column;
    line-height: 1.25;
}

.panel-user-role {
    overflow: hidden;
    color: #0f0f0f;
    font-size: 0.82rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.panel-user-email {
    overflow: hidden;
    color: #6b6b6b;
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.panel-user-menu {
    position: absolute;
    top: calc(100% + 0.65rem);
    right: 0;
    z-index: 60;
    min-width: 11.5rem;
    padding: 0.35rem;
    background: #fff;
    border: 1px solid rgba(15, 15, 15, 0.06);
    border-radius: 0.9rem;
    box-shadow: 0 10px 28px rgba(15, 15, 15, 0.12);
}

.panel-user-menu[hidden] {
    display: none;
}

.panel-logout-btn {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 0.85rem;
    border: 0;
    border-radius: 0.7rem;
    background: transparent;
    color: #630007;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.panel-logout-btn:hover {
    background: rgba(99, 0, 7, 0.06);
}

.panel-content {
    flex: 1;
    padding: 1.75rem 1.25rem 2.5rem;
}

.panel-content .mx-auto {
    margin-left: 0;
    margin-right: 0;
}

.panel-backdrop {
    display: none;
}

@media (min-width: 640px) {
    .panel-user-meta {
        display: flex;
    }
}

@media (min-width: 768px) {
    .panel-content {
        padding: 2rem 2rem 3rem;
    }
}

@media (min-width: 1024px) {
    html.is-sidebar-collapsed .panel-brand,
    html.is-sidebar-collapsed .panel-sidebar {
        width: var(--sidebar-rail);
    }

    html.is-sidebar-collapsed .panel-brand {
        padding-left: 0.4rem;
        padding-right: 0.4rem;
    }

    html.is-sidebar-collapsed .panel-brand img {
        height: 1.65rem;
    }

    html.is-sidebar-collapsed .panel-stage {
        margin-left: var(--sidebar-rail);
    }

    html.is-sidebar-collapsed .sidebar-portal,
    html.is-sidebar-collapsed .sidebar-label,
    html.is-sidebar-collapsed .sidebar-chevron,
    html.is-sidebar-collapsed .sidebar-soon,
    html.is-sidebar-collapsed .sidebar-subnav {
        display: none;
    }

    html.is-sidebar-collapsed .sidebar-link {
        justify-content: center;
        padding-left: 0.55rem;
        padding-right: 0.55rem;
    }

    html.is-sidebar-collapsed .sidebar-link.is-active::before {
        top: 0.55rem;
        bottom: 0.55rem;
        left: 0.15rem;
    }
}

.students-page {
    width: 100%;
    max-width: none;
}

.students-head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid rgba(15, 15, 15, 0.08);
}

@media (min-width: 640px) {
    .students-head {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

.students-count {
    margin: 0;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(99, 0, 7, 0.08);
    color: #630007;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.students-empty {
    display: grid;
    place-items: center;
    padding: 3.5rem 1.5rem;
    background: #fff;
    border: 1px dashed rgba(15, 15, 15, 0.14);
    border-radius: 1rem;
    text-align: center;
}

.students-empty-mark {
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.85rem;
    border-radius: 999px;
    background: rgba(99, 0, 7, 0.08);
    color: #630007;
    font-size: 1.35rem;
}

.students-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(15, 15, 15, 0.06);
    border-radius: 1rem;
    box-shadow: 0 10px 28px rgba(15, 15, 15, 0.05);
}

.dash-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

.dash-stat {
    display: block;
    padding: 0.85rem 0.75rem;
    background: #fff;
    border: 1px solid rgba(15, 15, 15, 0.08);
    border-radius: 0.85rem;
    box-shadow: 0 4px 16px rgba(15, 15, 15, 0.04);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dash-stat:hover {
    border-color: rgba(99, 0, 7, 0.25);
    box-shadow: 0 8px 24px rgba(15, 15, 15, 0.08);
}

.dash-stat-value {
    margin: 0;
    color: #630007;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.dash-stat-label {
    margin: 0.35rem 0 0;
    color: #555555;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.25;
}

@media (min-width: 640px) {
    .dash-stats {
        gap: 1rem;
    }
    .dash-stat {
        padding: 1.15rem 1.25rem 1.1rem;
        border-radius: 1rem;
    }
    .dash-stat-value {
        font-size: 1.85rem;
    }
    .dash-stat-label {
        font-size: 0.82rem;
    }
}

.dash-stat-note {
    margin: 0.25rem 0 0;
    color: #8a8a8a;
    font-size: 0.75rem;
}

.dash-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}

.dash-actions-inline {
    margin: 0;
}

.dash-heading {
    margin: 0 0 0.85rem;
    color: #0f0f0f;
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.dash-heading + .students-empty,
.dash-heading + .students-card {
    margin-bottom: 1.75rem;
}

.dash-continue {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding: 1.15rem 1.25rem;
    background: #fff;
    border: 1px solid rgba(99, 0, 7, 0.18);
    border-radius: 1rem;
    box-shadow: 0 10px 28px rgba(15, 15, 15, 0.05);
}

.dash-continue-kicker {
    margin: 0;
    color: #630007;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dash-continue-title {
    margin: 0.2rem 0 0;
    color: #0f0f0f;
    font-size: 1.15rem;
    font-weight: 650;
}

.dash-papers {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dash-paper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem 1rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid rgba(15, 15, 15, 0.06);
}

.dash-paper:last-child {
    border-bottom: 0;
}

.dash-paper-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.students-table.dash-table {
    min-width: 36rem;
}

@media (min-width: 768px) {
    .dash-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .dash-stats {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .dash-stats:has(> :nth-child(3):last-child) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.students-table-wrap {
    overflow-x: auto;
}

.students-table {
    width: 100%;
    min-width: 52rem;
    border-collapse: collapse;
}

.students-table th,
.students-table td {
    padding: 0.95rem 1rem;
    text-align: left;
    vertical-align: middle;
    font-size: 0.875rem;
}

.students-table th {
    background: #faf7f2;
    color: #6b6b6b;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(15, 15, 15, 0.06);
}

.students-table td {
    color: #2b2b2b;
    border-bottom: 1px solid rgba(15, 15, 15, 0.05);
}

.students-table tbody tr:last-child td {
    border-bottom: 0;
}

.students-table tbody tr:hover td {
    background: rgba(240, 222, 171, 0.18);
}

.students-person {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.students-avatar {
    display: inline-flex;
    width: 2.15rem;
    height: 2.15rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 999px;
    background: #630007;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.students-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-edit-avatar-preview {
    width: 3.25rem;
    height: 3.25rem;
    font-size: 1rem;
}

.students-person-name {
    font-weight: 650;
    color: #0f0f0f;
}

.students-actions-col {
    width: 1%;
    white-space: nowrap;
}

.students-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
}

.test-cover-preview {
    width: min(18rem, 100%);
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 0.75rem;
    background: rgba(99, 0, 7, 0.08);
}

.test-cover-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-dialog {
    width: min(36rem, calc(100vw - 2rem));
    padding: 0;
    border: 0;
    border-radius: 1.1rem;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 15, 15, 0.22);
}

.student-dialog::backdrop {
    background: rgba(12, 12, 12, 0.46);
}

.student-dialog-form {
    padding: 1.5rem 1.5rem 1.25rem;
}

.student-dialog-head {
    margin-bottom: 1.25rem;
}

.student-dialog-head h2 {
    margin: 0;
    color: #0f0f0f;
    font-size: 1.25rem;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.student-dialog-head p {
    margin: 0.4rem 0 0;
    color: #555;
    font-size: 0.88rem;
    line-height: 1.45;
}

.student-dialog-grid {
    display: grid;
    gap: 0.95rem;
}

@media (min-width: 640px) {
    .student-dialog-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.student-field {
    display: grid;
    gap: 0.4rem;
    color: #0f0f0f;
    font-size: 0.82rem;
    font-weight: 600;
}

.student-field-full {
    grid-column: 1 / -1;
}

.student-field input,
.student-field select {
    width: 100%;
    padding: 0.62rem 0.75rem;
    border: 1px solid rgba(15, 15, 15, 0.1);
    border-radius: 0.55rem;
    background: #fff;
    color: #0f0f0f;
    font-size: 0.88rem;
    font-weight: 400;
    outline: none;
}

.student-field input:focus,
.student-field select:focus,
.student-field input.ring-wine,
.student-field select.ring-wine {
    border-color: #630007;
    box-shadow: 0 0 0 2px rgba(99, 0, 7, 0.18);
}

.student-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 1.4rem;
}

.student-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.45rem;
    padding: 0.5rem 1rem;
    border-radius: 0.55rem;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.student-btn i,
.student-btn .ti {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    line-height: 1;
    flex-shrink: 0;
}

.student-btn-ghost {
    border: 1px solid rgba(15, 15, 15, 0.12);
    background: #fff;
    color: #2b2b2b;
}

.student-btn-ghost:hover {
    background: #f4f1ec;
}

.student-btn-primary {
    border: 0;
    background: #630007;
    color: #fff;
}

.student-btn-primary:hover {
    filter: brightness(1.08);
}

.student-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    filter: none;
}

.student-btn-danger {
    border: 0;
    background: #630007;
    color: #fff;
}

.student-btn-danger:hover {
    filter: brightness(1.08);
}

.student-btn-success {
    border: 0;
    background: #1f7a3a;
    color: #fff;
}

.student-btn-success:hover {
    filter: brightness(1.08);
}

.profile-page {
    width: 100%;
    max-width: none;
}

.profile-head {
    margin-bottom: 1.5rem;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid rgba(15, 15, 15, 0.08);
}

.profile-card {
    margin-bottom: 1.25rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid rgba(15, 15, 15, 0.06);
    border-radius: 1rem;
    box-shadow: 0 10px 28px rgba(15, 15, 15, 0.05);
}

.profile-card-title {
    margin: 0 0 1.15rem;
    color: #0f0f0f;
    font-size: 1.1rem;
    font-weight: 650;
}

.profile-card-copy {
    margin: -0.65rem 0 1.15rem;
    color: #555;
    font-size: 0.88rem;
}

.profile-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) {
    .profile-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.profile-field-full,
.profile-photo-row {
    grid-column: 1 / -1;
}

.profile-photo-row {
    display: grid;
    gap: 1rem;
    align-items: center;
}

@media (min-width: 640px) {
    .profile-photo-row {
        grid-template-columns: auto 1fr;
    }
}

.profile-avatar {
    display: inline-flex;
    width: 5.5rem;
    height: 5.5rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 999px;
    background: #630007;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 700;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-remove-photo {
    justify-self: start;
    padding: 0;
    border: 0;
    background: transparent;
    color: #630007;
    font-size: 0.82rem;
    font-weight: 650;
    cursor: pointer;
}

.profile-remove-photo:hover {
    text-decoration: underline;
}

.attempt-page {
    width: 100%;
}

.attempt-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(15, 15, 15, 0.08);
}

.attempt-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
}

.attempt-switches {
    padding: 0.4rem 0.7rem;
    border-radius: 0.55rem;
    background: rgba(15, 15, 15, 0.05);
    color: #2b2b2b;
    font-size: 0.78rem;
    font-weight: 600;
}

.attempt-switches-left {
    color: #555;
    font-weight: 500;
}

.attempt-timer {
    min-width: 5.5rem;
    padding: 0.45rem 0.75rem;
    border-radius: 0.55rem;
    background: rgba(99, 0, 7, 0.08);
    color: #630007;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    text-align: center;
}

.attempt-layout {
    display: grid;
    gap: 1.25rem;
}

.attempt-layout.has-passage {
    align-items: start;
}

@media (min-width: 960px) {
    .attempt-layout.has-passage {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    }

    .attempt-passage {
        position: sticky;
        top: 5.5rem;
        max-height: calc(100vh - 7rem);
        overflow: auto;
    }

    .exam-shell .attempt-passage {
        top: 1rem;
        max-height: calc(100vh - 2rem);
    }
}

@media (max-width: 959px) {
    .attempt-layout.has-passage .attempt-passage {
        max-height: min(45vh, 22rem);
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.attempt-passage,
.attempt-question {
    padding: 1.25rem;
    background: #fff;
    border: 1px solid rgba(15, 15, 15, 0.06);
    border-radius: 1rem;
    box-shadow: 0 10px 28px rgba(15, 15, 15, 0.05);
}

.attempt-passage-body {
    margin-top: 0.75rem;
    color: #2b2b2b;
    font-size: 0.95rem;
    line-height: 1.65;
}

.rich-text {
    white-space: normal;
    line-height: 1.65;
}

.rich-text p {
    margin: 0 0 0.75em;
}

.rich-text p:last-child {
    margin-bottom: 0;
}

.rich-text ul,
.rich-text ol {
    margin: 0 0 0.75em 1.25rem;
}

.rich-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75em 0;
}

.rich-text th,
.rich-text td {
    border: 1px solid rgba(15, 15, 15, 0.12);
    padding: 0.35rem 0.5rem;
    text-align: left;
}

.rich-text img {
    max-width: 100%;
    height: auto;
}

.rich-text h1,
.rich-text h2,
.rich-text h3,
.rich-text h4 {
    font-weight: 650;
    margin: 0.85em 0 0.4em;
    line-height: 1.3;
}

.attempt-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 0 1.5rem;
}

.attempt-pill {
    display: inline-flex;
    min-width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(15, 15, 15, 0.1);
    color: #2b2b2b;
    font-size: 0.78rem;
    font-weight: 650;
    text-decoration: none;
}

.attempt-pill.is-done {
    background: #d8f3e1;
    border-color: #8dceab;
    color: #146c3a;
}

.attempt-pill.is-current {
    background: #630007;
    border-color: #630007;
    color: #fff;
}

.attempt-option {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(15, 15, 15, 0.08);
    border-radius: 0.7rem;
    cursor: pointer;
}

.attempt-option:has(input:checked) {
    border-color: rgba(99, 0, 7, 0.35);
    background: rgba(99, 0, 7, 0.04);
}

.attempt-actions {
    margin-top: 1.85rem;
}

.attempt-sections {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}

.attempt-section {
    display: inline-flex;
    align-items: center;
    min-height: 2.1rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 15, 15, 0.1);
    color: #2b2b2b;
    font-size: 0.82rem;
    font-weight: 650;
    text-decoration: none;
}

.attempt-section.is-current {
    background: #630007;
    border-color: #630007;
    color: #fff;
}

.editor-page {
    width: 100%;
    max-width: none;
    padding: 1.25rem 1.5rem 2.5rem;
}

.editor-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(15, 15, 15, 0.08);
}

.editor-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.65rem;
}

.editor-meta-read {
    min-width: 0;
    margin-left: auto;
    text-align: right;
}

.editor-meta-narrow {
    width: 6.5rem;
}

.editor-page .attempt-passage {
    top: 1rem;
    max-height: calc(100vh - 2rem);
}

@media (min-width: 960px) {
    .editor-page .attempt-layout.has-passage {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

.passage-picker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.passage-picker select {
    flex: 1;
    min-width: 0;
}

.passage-picker button {
    flex-shrink: 0;
    white-space: nowrap;
}

.section-rows {
    display: grid;
    gap: 0.65rem;
    min-width: 16rem;
}

.section-rows-list {
    display: grid;
    gap: 0.55rem;
}

.section-row {
    display: flex;
    align-items: flex-end;
    gap: 0.45rem;
}

.section-row-label {
    display: grid;
    flex: 1;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 650;
}

.section-row-remove {
    display: inline-flex;
    width: 2.4rem;
    height: 2.4rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(15, 15, 15, 0.1);
    border-radius: 0.5rem;
    background: #fff;
    color: #555;
    cursor: pointer;
}

.section-row-remove:hover {
    border-color: rgba(99, 0, 7, 0.28);
    color: #630007;
}

.section-row-add {
    justify-self: start;
    border: 0;
    background: transparent;
    color: #630007;
    font-size: 0.82rem;
    font-weight: 650;
    cursor: pointer;
    padding: 0;
}

.section-row-add:hover {
    text-decoration: underline;
}

.editor-meta .section-rows {
    min-width: 13.5rem;
}

.sidebar-brand-mobile {
    display: none;
}

@media (max-width: 1023px) {
    .panel-sidebar {
        top: 0;
        z-index: 60;
        transform: translateX(-100%);
        box-shadow: none;
    }

    html.is-sidebar-open .panel-sidebar {
        transform: translateX(0);
        box-shadow: 16px 0 40px rgba(0, 0, 0, 0.35);
    }

    .sidebar-brand-mobile {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: var(--header-height);
        padding: 0 1.15rem;
        background: #fff;
        border-bottom: 1px solid rgba(15, 15, 15, 0.08);
        flex-shrink: 0;
    }

    .sidebar-brand-logo {
        display: flex;
        align-items: center;
    }

    .sidebar-brand-logo img {
        height: 2.2rem;
        width: auto;
        max-width: 100%;
        object-fit: contain;
    }

    .sidebar-close-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.25rem;
        height: 2.25rem;
        border-radius: 0.5rem;
        color: #2b2b2b;
        background: rgba(15, 15, 15, 0.06);
        border: 0;
        cursor: pointer;
        font-size: 1.25rem;
        transition: background 0.15s ease, color 0.15s ease;
    }

    .sidebar-close-btn:hover {
        background: rgba(15, 15, 15, 0.12);
        color: #630007;
    }

    .panel-brand {
        display: none !important;
    }

    .panel-stage {
        margin-left: 0;
    }

    html.is-sidebar-open .panel-backdrop {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 55;
        background: rgba(12, 12, 12, 0.5);
        backdrop-filter: blur(2px);
    }
}

.tests-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .tests-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .tests-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .tests-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Search filters toggle .hidden; make sure it always wins over component display rules */
.test-card.hidden,
.students-empty.hidden,
.students-card.hidden,
.students-table tr.hidden {
    display: none !important;
}

.test-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 1px solid rgba(15, 15, 15, 0.06);
    border-radius: 1rem;
    box-shadow: 0 10px 28px rgba(15, 15, 15, 0.05);
}

.test-card-cover {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: rgba(99, 0, 7, 0.08);
}

.test-card-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.test-card-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 1.25rem;
    background: linear-gradient(160deg, rgba(99, 0, 7, 0.16), rgba(99, 0, 7, 0.06));
    color: #630007;
    font-size: 1.15rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    text-align: center;
}

.test-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.85rem;
    padding: 1.15rem 1.25rem 1.25rem;
}

.test-card-title {
    margin: 0 0 0.35rem;
    color: #0f0f0f;
    font-size: 1.1rem;
    font-weight: 650;
}

.test-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

html.is-exam {
    overscroll-behavior: none;
    overscroll-behavior-x: none;
    overscroll-behavior-y: none;
}

.exam-body {
    background: #f7f8fa;
    overscroll-behavior: none;
    overscroll-behavior-x: none;
    overscroll-behavior-y: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.exam-body input,
.exam-body textarea,
.exam-body select,
.exam-body [contenteditable="true"],
.exam-body .cke_editable,
.exam-body .rich-text {
    -webkit-user-select: text;
    user-select: text;
}

.exam-shell {
    min-height: 100vh;
    overscroll-behavior: none;
}

/* Chrome Android (Samsung/OnePlus): fullscreen element must be the scroll container */
.exam-shell:fullscreen,
.exam-shell:-webkit-full-screen {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    background: #f7f8fa;
}

/* Safety if html is still the FS target on some browsers */
html.is-exam:fullscreen,
html.is-exam:-webkit-full-screen {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100%;
}

.exam-content {
    padding: 1.25rem 1.15rem 2.25rem;
}

@media (min-width: 768px) {
    .exam-content {
        padding: 1.5rem 1.75rem 2.75rem;
    }
}

.exam-guidelines-kicker {
    margin: 0 0 0.35rem;
    color: #630007;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.exam-guidelines-card {
    max-width: 46rem;
}

.exam-guidelines-list {
    display: grid;
    gap: 1rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
}

.exam-guidelines-list li {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    color: #2b2b2b;
    font-size: 0.92rem;
    line-height: 1.55;
}

.exam-guidelines-num {
    display: inline-flex;
    width: 1.7rem;
    height: 1.7rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    margin-top: 0.1rem;
    border-radius: 999px;
    background: rgba(99, 0, 7, 0.08);
    color: #630007;
    font-size: 0.78rem;
    font-weight: 700;
}

.exam-guidelines-accept {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin-bottom: 1.15rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.exam-guidelines-accept input {
    margin-top: 0.2rem;
}

.exam-guidelines-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.attempt-page.is-waiting,
.attempt-page.is-locked {
    display: none;
}

.exam-guide-overlay {
    position: fixed;
    inset: 0;
    z-index: 85;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: #f7f8fa;
}

.exam-guide-overlay[hidden] {
    display: none;
}

.exam-guide-card {
    width: min(38rem, 100%);
    max-height: calc(100vh - 2.5rem);
    overflow: auto;
    padding: 1.5rem 1.5rem 1.35rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 18px 48px rgba(12, 12, 12, 0.22);
}

.exam-guide-card h2 {
    margin: 0 0 0.4rem;
    font-size: 1.35rem;
    font-weight: 700;
}

.exam-guide-lead {
    margin: 0 0 1.15rem;
    color: #555;
    font-size: 0.92rem;
    line-height: 1.55;
}

.exam-guide-card .exam-guidelines-list {
    margin-bottom: 1.25rem;
}

.exam-fs-overlay,
.exam-pdf-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: rgba(12, 12, 12, 0.62);
}

.exam-fs-overlay {
    z-index: 84;
    background: #f7f8fa;
}

.exam-fs-overlay[hidden],
.exam-pdf-overlay[hidden],
.exam-toast[hidden] {
    display: none;
}

.exam-fs-card,
.exam-pdf-card {
    width: min(32rem, 100%);
    padding: 1.5rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 18px 48px rgba(12, 12, 12, 0.22);
}

.exam-fs-card h2 {
    margin: 0 0 0.55rem;
    font-size: 1.35rem;
    font-weight: 700;
}

.exam-fs-card p {
    margin: 0 0 1.15rem;
    color: #555;
    font-size: 0.92rem;
    line-height: 1.55;
}

.exam-pdf-card {
    width: min(56rem, 100%);
    height: min(80vh, 48rem);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.exam-pdf-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(15, 15, 15, 0.08);
    font-size: 0.88rem;
    font-weight: 650;
}

.exam-pdf-card iframe {
    flex: 1;
    width: 100%;
    border: 0;
    background: #f4f4f4;
}

.exam-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 85;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: rgba(12, 12, 12, 0.65);
    backdrop-filter: blur(3px);
}

.exam-confirm-overlay[hidden] {
    display: none;
}

.exam-confirm-card {
    width: min(30rem, 100%);
    padding: 1.75rem;
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: 0 24px 64px rgba(12, 12, 12, 0.32);
    animation: exam-modal-pop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes exam-modal-pop {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(6px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.exam-confirm-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.exam-confirm-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: #fdf2f2;
    color: #82000a;
    font-size: 1.45rem;
    flex-shrink: 0;
}

.exam-confirm-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f0f0f;
}

.exam-confirm-subtitle {
    margin: 0.15rem 0 0;
    font-size: 0.82rem;
    color: #666;
}

.exam-confirm-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 0.85rem;
    margin-bottom: 1rem;
    background: #f7f8fa;
    border: 1px solid rgba(15, 15, 15, 0.06);
    border-radius: 0.85rem;
    text-align: center;
}

.exam-confirm-stat-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
}

.exam-confirm-stat-val {
    display: block;
    margin-top: 0.2rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f0f0f;
}

.exam-confirm-warning {
    margin-bottom: 1.5rem;
    padding: 0.75rem 0.9rem;
    background: #fef8eb;
    border: 1px solid rgba(202, 167, 123, 0.35);
    border-radius: 0.65rem;
    font-size: 0.84rem;
    color: #785210;
    line-height: 1.45;
}

.exam-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.exam-toast {
    position: fixed;
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    max-width: min(32rem, calc(100vw - 2rem));
    width: max-content;
    padding: 0.85rem 1.25rem;
    border-radius: 0.85rem;
    background: #630007;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.35;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    box-shadow: 0 16px 36px rgba(99, 0, 7, 0.35), 0 4px 12px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.15);
    animation: toast-slide-down 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}

/* Homepage components */
.news-ticker-bar {
    display: flex;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid rgba(15, 15, 15, 0.08);
    overflow: hidden;
    height: 2.75rem;
}

.news-ticker-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #82000a;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0 1rem;
    height: 100%;
    white-space: nowrap;
    z-index: 2;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.06);
}

.news-ticker-track {
    display: flex;
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
}

.news-ticker-content {
    display: inline-flex;
    align-items: center;
    gap: 2rem;
    animation: ticker-slide 32s linear infinite;
    padding-left: 1rem;
}

.news-ticker-track:hover .news-ticker-content {
    animation-play-state: paused;
}

@keyframes ticker-slide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.hero-glow {
    background: radial-gradient(circle at 50% -20%, rgba(130, 0, 10, 0.08) 0%, rgba(202, 167, 123, 0.05) 45%, transparent 70%);
}

.track-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.track-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.07);
    border-color: rgba(130, 0, 10, 0.35);
}

/* ==========================================================================
   MLC Brand Book & Watermark Utilities (Synchronized from mlc-web)
   ========================================================================== */

.brand-serif {
    font-family: "EB Garamond", Georgia, Cambria, serif;
}

.brand-watermark-bg {
    background-image: url('../images/watermark.png');
    background-position: left center;
    background-repeat: no-repeat;
    background-size: auto 85%;
}

.brand-watermark-center {
    background-image: url('../images/watermark.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain;
}

.brand-watermark-subtle {
    position: relative;
}

/* ==========================================================================
   MLC Brand Watermark Background Logo (mlc-web Synchronization)
   ========================================================================== */

.brand-watermark-left {
    position: relative;
    background-image: url('../images/watermark.png');
    background-position: left -2rem center;
    background-repeat: no-repeat;
    background-size: min(580px, 45vw);
}

.brand-watermark-center {
    position: relative;
    background-image: url('../images/watermark.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: min(560px, 60vw);
}

.brand-watermark-subtle {
    position: relative;
}

.brand-watermark-subtle::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../images/watermark.png');
    background-position: left -1.5rem center;
    background-repeat: no-repeat;
    background-size: min(560px, 45vw);
    opacity: 0.14;
    pointer-events: none;
    z-index: 0;
}

.brand-watermark-left-subtle {
    position: relative;
}

.brand-watermark-left-subtle::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../images/watermark.png');
    background-position: left 1rem center;
    background-repeat: no-repeat;
    background-size: min(480px, 38vw);
    opacity: 0.13;
    pointer-events: none;
    z-index: 0;
}

.animated-bg {
    position: relative;
    background-image: url('../images/watermark.png');
    background-position: left center;
    background-repeat: no-repeat;
    background-size: min(560px, 45vw);
    animation: bgFloat 18s ease-in-out infinite;
}

@keyframes bgFloat {
    0% {
        background-position: left -1rem 50%;
    }
    50% {
        background-position: left -1rem 46%;
    }
    100% {
        background-position: left -1rem 50%;
    }
}

.team-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 30px -10px rgba(99, 0, 7, 0.12);
}

.course-card-thumb {
    overflow: hidden;
}

.course-card-thumb img {
    transition: transform 0.5s ease;
}

.group:hover .course-card-thumb img {
    transform: scale(1.06);
}

.footer-texture-bg {
    background-color: #19233a;
}

.brand-gold-gradient {
    background: linear-gradient(135deg, #caa77b 0%, #ecd3a7 50%, #b8915b 100%);
}

.brand-wine-gradient {
    background: linear-gradient(135deg, #630007 0%, #82000a 100%);
}

/* ==========================================================================
   Universal Pure EB Garamond Typography (mlc-web synchronization)
   ========================================================================== */

html, body, button, input, optgroup, select, textarea, table, th, td, p, h1, h2, h3, h4, h5, h6, a, span, label {
    font-family: "EB Garamond", Georgia, Cambria, serif !important;
}

/* ==========================================================================
   Live News Ticker Notification Component (mlc-web sync)
   ========================================================================== */

.news-ticker-bar {
    display: flex;
    align-items: stretch;
    background: #19233a;
    color: #ffffff;
    border-bottom: 2px solid #caa77b;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.5;
}

.news-ticker-badge {
    background: #630007;
    color: #ffffff;
    padding: 9px 20px;
    font-weight: 700;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 2;
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.35);
    letter-spacing: 0.02em;
}

.news-ticker-marquee {
    overflow: hidden;
    white-space: nowrap;
    flex: 1;
    display: flex;
    align-items: center;
}

.news-ticker-marquee-inner {
    display: inline-flex;
    align-items: center;
    gap: 3rem;
    padding-left: 2rem;
    animation: news-marquee 36s linear infinite;
}

.news-ticker-marquee-inner a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.news-ticker-marquee-inner a:hover {
    color: #caa77b;
}

.news-ticker-bar:hover .news-ticker-marquee-inner {
    animation-play-state: paused;
}

@keyframes news-marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ==========================================================================
   Line Bottom Decorative Brand Underlines (mlc-web sync)
   ========================================================================== */

.line-bottom-wine {
    position: relative;
    padding-bottom: 12px;
}

.line-bottom-wine::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 46px;
    height: 3px;
    background-color: #630007;
}

.line-bottom-gold-center {
    position: relative;
    padding-bottom: 12px;
}

.line-bottom-gold-center::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 3px;
    background-color: #caa77b;
}

/* ==========================================================================
   Brand Watermark & Visual Styles (mlc-web synchronization)
   ========================================================================== */

.brand-watermark-left {
    position: relative;
    background-image: url('../images/watermark.png');
    background-position: -40px center;
    background-repeat: no-repeat;
    background-size: 520px auto;
}

@media (max-width: 768px) {
    .brand-watermark-left {
        background-position: -120px center;
        background-size: 380px auto;
    }
}

.brand-watermark-center {
    position: relative;
    background-image: url('../images/watermark.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: 480px auto;
}

.brand-watermark-subtle {
    position: relative;
    background-image: url('../images/watermark.png');
    background-position: left center;
    background-repeat: no-repeat;
    background-size: 440px auto;
}

.animated-bg {
    position: relative;
    background-image: url('../images/watermark.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    animation: bgFloat 18s ease-in-out infinite;
}

@keyframes bgFloat {
    0% {
        background-position: center 50%;
    }
    50% {
        background-position: center 45%;
    }
    100% {
        background-position: center 50%;
    }
}

.team-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.team-card:hover {
    transform: translateY(-4px);
}

.course-card-thumb {
    transition: transform 0.3s ease;
}

.course-card-thumb:hover {
    transform: scale(1.03);
}

/* ==========================================================================
   Mobile Navigation & Responsive Viewport Optimizations
   ========================================================================== */

/* Hide native scrollbars for swipeable pill/chip bars on mobile */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Prevent horizontal body overflow globally */
html,
body {
    overflow-x: hidden;
    width: 100%;
}

/* Mobile Nav Drawer animation */
#public-mobile-nav-menu {
    transition: max-height 0.25s ease-in-out, opacity 0.2s ease-in-out;
}

#public-mobile-nav-menu.is-open {
    display: block !important;
}

@media (max-width: 640px) {
    .student-btn {
        min-height: 2.3rem;
    }
}

/* ==========================================================================
   Fixed Floating 'Back to Top' UI Card
   ========================================================================== */

.back-to-top-card {
    will-change: transform, opacity;
}

.back-to-top-card.is-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

/* Safe area inset for modern smartphones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .back-to-top-card {
        bottom: calc(1.25rem + env(safe-area-inset-bottom));
        right: calc(1.25rem + env(safe-area-inset-right));
    }
}

