/* GEHMOS responsive layout */

:root {
    --sidebar-width: clamp(16rem, 17vw, 21rem);
    --page-space: clamp(1rem, 2.5vw, 4rem);
}

html {
    font-size: clamp(100%, calc(.85rem + .25vw), 125%);
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    font-size: 1rem;
    line-height: 1.6;
}

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

.workspace {
    margin-left: var(--sidebar-width);
    min-width: 0;
}

/* Sidebar */

body:not(.auth) > aside {
    position: fixed;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width);
    padding: 1.75rem 1rem;
    overflow-y: auto;
    scrollbar-width: none;
}

body:not(.auth) > aside::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.brand {
    gap: .65rem;
    flex-shrink: 0;
}

aside .brand {
    margin: 0 .4rem 1.7rem;
}

.brand span {
    font-size: 1.35rem;
    overflow-wrap: anywhere;
}

.brand small {
    display: block;
    font-size: .7rem;
}

.brand img {
    width: 3.25rem;
    height: 3.25rem;
    flex: none;
}

.sidebar-menu {
    margin: 0;
    font-size: inherit;
    flex-shrink: 0;
}

.sidebar-menu > summary {
    display: none;
}

.nav {
    display: block;
    padding: .65rem .8rem;
    font-size: .95rem;
    overflow-wrap: anywhere;
}

.nav-label {
    font-size: .7rem;
}

.nav-group {
    margin: .25rem 0;
}

.nav-group > summary {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-height: 2.6rem;
    padding: .7rem .8rem;
    border-radius: .6rem;
    color: #dddce5;
    font-size: .9rem;
    cursor: pointer;
    list-style: none;
}

.nav-group > summary::-webkit-details-marker {
    display: none;
}

.nav-group > summary::after {
    content: '›';
    margin-left: auto;
    transition: transform .2s;
}

.nav-group[open] > summary::after {
    transform: rotate(90deg);
}

.nav-group > summary:hover {
    background: #ffffff0b;
}

.nav-group > div {
    margin-left: .9rem;
    padding: .25rem 0 .4rem .8rem;
    border-left: 1px solid #ffffff18;
}

.subnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .55rem .75rem;
    font-size: .8rem;
}

.nav-icon {
    display: inline-block;
    min-width: 1.1rem;
    color: #ffb4c3;
    font-size: 1rem;
}

.build-dot {
    width: .35rem;
    height: .35rem;
    flex: none;
    border-radius: 50%;
    background: #d89144;
}

.aside-note {
    display: none;
}

.sidebar-signout {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 1.5rem;
}

.sidebar-signout button {
    width: 100%;
    text-align: left;
    border: 1px solid #ffffff25;
    border-radius: .75rem;
    background: #ffffff08;
    color: #fff;
}

.sidebar-signout button:hover {
    background: #ffffff18;
}

/* Page layout */

main {
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 2rem var(--page-space);
}

h1 {
    font-size: clamp(1.8rem, 2.3vw, 3rem);
    line-height: 1.2;
}

h2 {
    font-size: clamp(1.25rem, 1.5vw, 1.8rem);
}

h3 {
    font-size: 1.1rem;
}

p {
    overflow-wrap: anywhere;
}

section {
    min-width: 0;
    margin: 1.25rem 0;
    padding: clamp(1rem, 1.6vw, 2rem);
}

.small,
.subtext {
    font-size: .8rem;
}

.eyebrow {
    font-size: .75rem;
}

/* Header */

.school-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    width: 100%;
    gap: 1.5rem;
    padding: 1.25rem var(--page-space);
}

.school-header > .header-title {
    flex: 0 0 auto;
    min-width: 0;
}

.school-header .header-label {
    display: block;
    font-size: clamp(1.15rem, 1.6vw, 1.8rem);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.2;
    color: #202334;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1 1 28rem;
    gap: 1rem;
    min-width: 0;
}

.header-school {
    min-width: 0;
    max-width: 32rem;
    text-align: right;
}

.school-header .header-school-name {
    display: block;
    font-size: clamp(.95rem, 1.1vw, 1.2rem);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.year-select {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    max-width: 100%;
    gap: .5rem;
}

.header-year {
    justify-content: flex-end;
    margin: .35rem 0 0;
    gap: .4rem;
}

.header-year select {
    width: auto;
    min-width: 0;
    max-width: 100%;
    padding: .3rem .55rem;
    font-size: .75rem;
    border-radius: .5rem;
}

.header-year .year-switch {
    min-height: 0;
    padding: .3rem .55rem;
    font-size: .7rem;
}

.header-actions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 0;
    gap: .55rem;
}

.header-actions .header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    min-height: 2.6rem;
    padding: 0;
    flex: none;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: .85rem;
    background: #fff;
    color: var(--primary, #c50929);
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.header-icon:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px #00000010;
}

.header-icon:disabled {
    opacity: .5;
    cursor: default;
}

.notification-button {
    position: relative;
}

.avatar {
    width: 2.75rem;
    height: 2.75rem;
    flex: none;
}

.header-avatar {
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: var(--primary, #c50929);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 5px 16px #00000012;
    transition: transform .2s ease;
}

.header-avatar:hover {
    transform: translateY(-2px);
}

.header-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account {
    flex: 0 1 auto;
    width: auto;
    max-width: 100%;
    flex-wrap: wrap;
}

/* Welcome banner */

.welcome-banner {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    min-height: clamp(17rem, 23vw, 26rem);
    padding: clamp(1.5rem, 3vw, 3.5rem);
    gap: 1rem;
}

.welcome-content {
    min-width: 0;
}

.welcome-banner h2 {
    font-size: clamp(2rem, 3vw, 4rem);
    line-height: 1.12;
}

.welcome-banner p {
    max-width: 42rem;
    font-size: 1rem;
}

.hero-tag {
    max-width: 100%;
    font-size: .7rem;
    letter-spacing: .12em;
    overflow-wrap: anywhere;
}

.hero-link {
    font-size: .95rem;
}

.hero-art {
    display: grid;
    min-width: 0;
    min-height: 16rem;
}

.hero-art > img {
    width: clamp(8rem, 13vw, 13rem);
    height: auto;
    aspect-ratio: 1;
}

.orbit {
    width: clamp(10rem, 16vw, 17rem);
    height: auto;
    aspect-ratio: 1;
}

.orbit-two {
    width: clamp(12rem, 20vw, 21rem);
    height: auto;
    aspect-ratio: 1;
}

.float-tag {
    max-width: 90%;
    padding: .65rem .9rem;
    font-size: .8rem;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    margin: 1rem 0;
}

.hero-slide {
    margin: 0;
    overflow-wrap: anywhere;
}

.hero-slide[hidden],
.hero-slider-toggle[hidden] {
    display: none;
}

.hero-slider-toggle {
    min-height: 2rem;
    margin-top: .75rem;
    padding: .3rem .65rem;
    border: 1px solid #ffffff55;
    border-radius: 2rem;
    background: #ffffff12;
    color: inherit;
    font-size: .7rem;
}

/* Cards and shortcuts */

.cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(.85rem, 1.3vw, 1.8rem);
}

.cards section {
    min-width: 0;
}

.cards h2 {
    font-size: clamp(2rem, 3vw, 3.8rem);
    overflow-wrap: anywhere;
}

.cards p,
.cards span {
    font-size: .9rem;
}

.roadmap {
    grid-template-columns:
        repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

.assignment-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.assignment-grid h2 {
    font-size: 1.1rem;
}

.assignment-grid button {
    font-size: .9rem;
}

.steps {
    gap: 1rem;
}

.steps a {
    flex: 1 1 12rem;
    padding: .9rem 1rem;
    font-size: .95rem;
}

/* Forms */

.form-grid {
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.form-grid > * {
    min-width: 0;
}

label {
    font-size: .9rem;
}

input,
select,
textarea {
    min-width: 0;
    max-width: 100%;
    padding: .7rem .8rem;
    font-size: 1rem;
}

input[type="color"] {
    min-height: 2.8rem;
}

input[type="checkbox"] {
    flex: none;
    width: 1.1rem;
    height: 1.1rem;
}

.check {
    align-items: flex-start;
    gap: .6rem;
    line-height: 1.5;
}

button {
    min-height: 2.75rem;
    max-width: 100%;
    padding: .7rem 1rem;
    font-size: .95rem;
    white-space: normal;
    overflow-wrap: anywhere;
}

.small-button {
    min-height: 2.5rem;
    padding: .5rem .7rem;
    font-size: .8rem;
}

details form {
    max-width: none;
}

/* Lists and reports */

.report-actions {
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1rem;
    font-size: .9rem;
}

.table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    min-width: 34rem;
    font-size: .9rem;
}

th,
td {
    padding: .8rem;
    vertical-align: top;
    overflow-wrap: anywhere;
}

td form,
td details {
    min-width: 7rem;
}

.filter-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
    align-items: end;
    gap: 1rem;
}

.pagination {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.button-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: .6rem 1rem;
    border-radius: .5rem;
    background: var(--primary);
    color: white;
}

.module-links {
    padding: 0;
    margin: 0;
    list-style: none;
}

.module-links li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    padding: .65rem 0;
    border-bottom: 1px solid var(--line);
    font-size: .85rem;
}

.module-links a {
    min-width: 0;
}

.ready-badge,
.development-badge {
    display: inline-block;
    flex: none;
    border-radius: 2rem;
    padding: .2rem .55rem;
    font-size: .6rem;
    font-weight: 600;
}

.ready-badge {
    color: #17694c;
    background: #e9f7f0;
}

.development-badge {
    color: #94601f;
    background: #fff4e2;
}

.feature-list {
    padding-left: 1.3rem;
    line-height: 1.8;
}

.feature-list li {
    margin: .6rem 0;
}

/* Student records */

.student-heading {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.student-avatar {
    display: grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    flex: none;
    border-radius: 1.3rem;
    background: #fff0f3;
    color: var(--primary);
    font-size: 2rem;
    font-weight: 700;
}

.record-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.record-grid dt {
    color: var(--muted);
    font-size: .8rem;
}

.record-grid dd {
    margin: .4rem 0 0;
    overflow-wrap: anywhere;
}

/* Profile picture */

.profile-photo-section {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin: 1.25rem 0;
}

.profile-photo-preview {
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    flex: none;
    overflow: hidden;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #fff0f3;
    color: var(--primary, #c50929);
    font-size: 2rem;
    font-weight: 800;
    box-shadow: 0 6px 22px #00000012;
}

.profile-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo-section .form-grid {
    flex: 1;
    min-width: 0;
}

/* Footer */

.workspace > .page-footer {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 18px 24px;
    text-align: center;
    font-size: .75rem;
}

/* Login layout */

.auth {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(1rem, 3vw, 4rem);
    padding: clamp(1rem, 2vw, 3rem);
}

.auth-story {
    min-width: 0;
    min-height: calc(100svh - 4rem);
    padding: clamp(2rem, 4vw, 5rem);
}

.auth-story h2 {
    font-size: clamp(2.4rem, 4vw, 5rem);
    letter-spacing: -.04em;
}

.auth-story p {
    font-size: 1rem;
}

.story-footer {
    max-width: 85%;
    font-size: .75rem;
}

.auth-card {
    width: 100%;
    max-width: clamp(29rem, 34vw, 42rem);
    margin: 1.5rem auto;
    padding: clamp(1.5rem, 3vw, 3rem);
}

.auth-card h1 {
    font-size: clamp(1.8rem, 2.3vw, 3rem);
}

.auth-card .eyebrow {
    font-size: .65rem;
}

.auth:not(:has(.auth-story)) {
    grid-template-columns: minmax(0, 1fr);
}

.auth:not(:has(.auth-story)) .auth-card {
    width: 100%;
    max-width: 42rem;
}

/* Large desktops */

@media (min-width: 120em) {
    .welcome-banner {
        grid-template-columns: 1.5fr 1fr;
    }

    .form-grid,
    .cards {
        gap: 1.5rem;
    }
}

/* Small desktops */

@media (max-width: 80em) {
    .assignment-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .assignment-grid section:last-child {
        grid-column: 1 / -1;
    }

    .float-tag {
        font-size: .75rem;
    }
}

/* Tablets and browser zoom */

@media (max-width: 64em) {
    body:not(.auth) > aside {
        position: static;
        inset: auto;
        width: 100%;
        padding: 1rem var(--page-space);
        overflow: visible;
    }

    aside .brand {
        margin: 0 0 .7rem;
    }

    .workspace {
        width: 100%;
        margin-left: 0;
    }

    .sidebar-menu > summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 2.75rem;
        padding: .6rem .9rem;
        border: 1px solid #ffffff25;
        border-radius: .6rem;
        color: white;
        font-size: .95rem;
        cursor: pointer;
        list-style: none;
    }

    .sidebar-menu > summary::-webkit-details-marker {
        display: none;
    }

    .sidebar-menu > summary::after {
        content: '＋';
    }

    .sidebar-menu[open] > summary::after {
        content: '−';
    }

    .sidebar-menu nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        gap: .25rem;
        margin-top: .7rem;
    }

    .sidebar-menu:not([open]) nav {
        display: none;
    }

    .nav {
        margin: 0;
        padding: .75rem;
        font-size: .95rem;
    }

    .nav-label {
        display: none;
    }

    .nav-group {
        min-width: 0;
    }

    .sidebar-signout {
        padding-top: .75rem;
    }

    .school-header {
        gap: 1rem;
    }

    .header-right {
        flex-wrap: wrap;
    }

    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cards:not(.roadmap) > section:last-child {
        grid-column: 1 / -1;
    }

    .roadmap {
        grid-template-columns:
            repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    }

    .record-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .welcome-banner {
        min-height: 16rem;
    }

    .hero-art {
        min-height: 13rem;
    }

    .auth {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 1rem;
    }

    .auth-story {
        min-height: calc(100svh - 2rem);
        padding: 2rem;
    }

    .auth-story h2 {
        font-size: 2.5rem;
    }

    .auth-card {
        padding: 1.5rem;
    }
}

/* Phones */

@media (max-width: 46em) {
    .school-header > .header-title {
        flex-basis: 100%;
    }

    .header-right {
        flex: 1 1 100%;
        justify-content: flex-start;
        gap: .75rem;
    }

    .header-school {
        flex: 1 1 12rem;
        max-width: none;
        text-align: left;
    }

    .header-year {
        justify-content: flex-start;
    }

    .header-year select {
        flex: 1 1 8rem;
    }

    .header-actions {
        flex-basis: auto;
        margin-left: auto;
    }

    .welcome-banner {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-art {
        display: none;
    }

    .welcome-banner h2 {
        font-size: 2rem;
    }

    .assignment-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .assignment-grid section:last-child {
        grid-column: auto;
    }

    .auth {
        display: block;
    }

    .auth-story {
        min-height: 0;
        padding: 1.75rem;
    }

    .auth-story h2 {
        margin: 1rem 0;
        font-size: 2.1rem;
    }

    .auth-story h2 br {
        display: none;
    }

    .auth-story h2 em {
        display: block;
    }

    .auth-story p,
    .story-footer,
    .story-orb {
        display: none;
    }

    .auth-card {
        width: 100%;
        max-width: none;
        margin: 1rem auto;
    }
}

@media (max-width: 36em) {
    .school-header {
        padding: 1rem;
    }

    main {
        padding: 1.25rem 1rem;
    }

    .cards,
    .roadmap,
    .form-grid,
    .record-grid,
    .filter-grid,
    .sidebar-menu nav {
        grid-template-columns: minmax(0, 1fr);
    }

    .cards:not(.roadmap) > section:last-child,
    .full {
        grid-column: auto;
    }

    .steps a {
        width: 100%;
        flex-basis: 100%;
    }

    .report-actions {
        justify-content: flex-start;
    }

    h1 {
        font-size: 1.8rem;
    }

    .welcome-banner {
        padding: 1.5rem;
    }

    .welcome-banner h2 {
        font-size: 1.8rem;
    }

    .form-grid > button {
        width: 100%;
    }

    .profile-photo-section {
        flex-direction: column;
    }

    .profile-photo-section .form-grid {
        width: 100%;
    }

    .auth {
        padding: .75rem;
    }

    .auth-card {
        padding: 1.25rem;
    }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
    .header-avatar,
    .header-actions .header-icon,
    .nav-group > summary::after {
        transition: none;
    }
}

/* Printing */

@media print {
    html {
        font-size: 10pt;
    }

    body {
        background: white;
        font-size: 10pt;
    }

    body:not(.auth) > aside,
    header,
    footer,
    .sidebar-menu {
        display: none !important;
    }

    .workspace {
        width: 100%;
        margin: 0;
    }

    main {
        max-width: none;
        padding: 0;
    }

    section {
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    .table-wrap {
        overflow: visible;
    }

    table {
        min-width: 0;
        font-size: 9pt;
    }

    td,
    th {
        padding: 5pt;
        overflow-wrap: anywhere;
    }

    .cards,
    .roadmap {
        display: block;
    }

    .editor,
    .no-print,
    .report-actions,
    .alert,
    .assignment-grid,
    .pagination,
    .hero-slider-toggle {
        display: none !important;
    }

    h1 {
        font-size: 18pt;
    }

    h2 {
        font-size: 13pt;
    }

    thead {
        display: table-header-group;
    }

    tr {
        break-inside: avoid;
    }

    .record-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .student-avatar {
        background: white;
        border: 1pt solid #ddd;
    }
}

/* Sidebar icons and finishing touches */

aside .brand small {
    display: block;
    margin-top: .25rem;
    font-size: .68rem;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: .025em;
    color: #b8bac8;
}

aside .nav,
aside .nav-group > summary {
    display: flex;
    align-items: center;
    gap: .7rem;
}

aside .nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    min-width: 1.4rem;
    height: 1.4rem;
    flex: none;
    color: #f4a9b9;
}

.sidebar-svg {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
}

.sidebar-cedi {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1;
}

aside .nav-text {
    min-width: 0;
    flex: 1;
    overflow-wrap: anywhere;
}

aside .nav.active .nav-icon {
    color: #fff;
}

.nav-group.has-active-page > summary {
    background: #ffffff08;
    color: #fff;
}

.sidebar-signout button {
    display: flex;
    align-items: center;
    gap: .7rem;
}

body:not(.auth) > aside {
    scrollbar-width: none;
}

body:not(.auth) > aside::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Login page finishing touches */

.login-page .auth-story {
    position: relative;
    overflow: hidden;
}

.login-page .auth-story > .hero-tag,
.login-page .login-story-slider,
.login-page .auth-story > p,
.login-page .story-footer {
    position: relative;
    z-index: 1;
}

.login-page .login-story-slider {
    margin: 2.5rem 0 1.5rem;
}

.login-page .login-story-slider h2 {
    margin: 0;
    font-size: clamp(2.3rem, 4vw, 4.8rem);
    line-height: 1.12;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
}

.login-page .story-footer {
    display: block;
    margin-top: 2.5rem;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.login-page .login-card {
    border: 1px solid #e8eaf0;
    border-radius: 1.75rem;
    background: #fff;
    box-shadow: 0 24px 70px #15203912;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.login-brand img {
    width: 76px;
    height: 76px;
    flex: none;
    object-fit: contain;
}

.login-brand strong {
    display: block;
    color: #202334;
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -.04em;
    overflow-wrap: anywhere;
}

.login-brand span {
    display: block;
    margin-top: .15rem;
    color: #737887;
    font-size: .8rem;
}

.login-introduction {
    margin-bottom: 2rem;
}

.login-introduction .eyebrow {
    margin-bottom: .75rem;
    color: var(--primary);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .07em;
}

.login-introduction h1 {
    margin: 0 0 .65rem;
    color: #202334;
    letter-spacing: -.045em;
}

.login-introduction > p:last-child {
    margin: 0;
    color: #737887;
    font-size: .95rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.login-form label {
    color: #353a48;
    font-size: .85rem;
    font-weight: 600;
}

.login-form input:not([type="hidden"]) {
    width: 100%;
    min-height: 3.2rem;
    margin: 0 0 .8rem;
    padding: .85rem 1rem;
    border: 1px solid #dce0e8;
    border-radius: .85rem;
    background: #fafbfe;
    color: #202334;
    transition: border-color .2s, box-shadow .2s;
}

.login-form input:not([type="hidden"]):focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-color: var(--primary);
    background: #fff;
}

.login-form .login-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 3.2rem;
    margin-top: .4rem;
    padding: .85rem 1.2rem;
    border-radius: .85rem;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    transition: transform .2s, box-shadow .2s;
}

.login-form .login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px #00000018;
}

.login-help {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid #eceef4;
}

.login-help p {
    margin: 0;
    color: #737887;
    font-size: .8rem;
    line-height: 1.7;
}

.login-motto {
    margin: 1.5rem 0 0;
    color: #737887;
    text-align: center;
    font-size: .7rem;
    letter-spacing: .06em;
    overflow-wrap: anywhere;
}

@media (max-width: 46em) {
    .login-page .login-story-slider {
        margin: 1.5rem 0 .75rem;
    }

    .login-page .login-story-slider h2 {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }

    .login-page .story-footer {
        display: block;
        margin-top: 1rem;
        font-size: .65rem;
    }

    .login-brand {
        margin-bottom: 1.75rem;
    }

    .login-brand img {
        width: 60px;
        height: 60px;
    }

    .login-page .login-card {
        border-radius: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-form input,
    .login-form .login-submit {
        transition: none;
    }
}

/* Compact, responsive login layout */

body.auth.login-page {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(1rem, 3vw, 3rem);
    min-height: 100svh;
    height: auto;
    margin: 0;
    padding: clamp(.75rem, 2vw, 1.5rem);
    overflow-x: hidden;
    overflow-y: auto;
    font-size: 1rem;
}

/* Left welcome panel */

.login-page .auth-story {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: stretch;
    min-height: 0;
    padding: clamp(1.5rem, 4vw, 4rem);
    border-radius: 1.75rem;
}

.login-page .auth-story > .hero-tag {
    align-self: flex-start;
}

.login-page .login-story-slider {
    margin: 1.75rem 0 1rem;
}

.login-page .login-story-slider h2 {
    font-size: clamp(2rem, 3.5vw, 4rem);
    line-height: 1.12;
}

.login-page .auth-story > p {
    margin: .75rem 0;
    font-size: .9rem;
    line-height: 1.7;
}

.login-page .story-footer {
    margin-top: 1.5rem;
    font-size: .7rem;
}

/* Right login card */

.login-page main.auth-card.login-card {
    width: 100%;
    max-width: 30rem;
    min-height: 0;
    height: auto;
    margin: 0 auto;
    padding: clamp(1.25rem, 2.5vw, 2rem);
    border-radius: 1.5rem;
}

.login-page .login-brand {
    gap: .75rem;
    margin-bottom: 1.25rem;
}

.login-page .login-brand img {
    width: 56px;
    height: 56px;
}

.login-page .login-brand strong {
    font-size: 1.35rem;
}

.login-page .login-brand span {
    font-size: .7rem;
}

.login-page .login-introduction {
    margin-bottom: 1.25rem;
}

.login-page .login-introduction .eyebrow {
    margin: 0 0 .4rem;
    font-size: .65rem;
}

.login-page .login-introduction h1 {
    margin: 0 0 .4rem;
    font-size: clamp(1.65rem, 2.2vw, 2.25rem);
    line-height: 1.15;
}

.login-page .login-introduction > p:last-child {
    font-size: .85rem;
}

/* Reset inherited form spacing */

.login-page .login-form {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin: 0;
    padding: 0;
}

.login-page .login-form label {
    display: block;
    margin: 0;
    padding: 0;
    font-size: .8rem;
    line-height: 1.4;
}

.login-page .login-form input:not([type="hidden"]) {
    min-height: 2.8rem;
    height: auto;
    margin: 0 0 .65rem;
    padding: .65rem .85rem;
    font-size: 1rem;
    line-height: 1.4;
    border-radius: .7rem;
}

.login-page .login-form .login-submit {
    min-height: 2.8rem;
    margin: .2rem 0 0;
    padding: .65rem 1rem;
    font-size: .9rem;
    border-radius: .7rem;
}

.login-page .login-help {
    margin-top: 1rem;
    padding-top: .85rem;
}

.login-page .login-help p {
    font-size: .7rem;
    line-height: 1.5;
}

.login-page .login-motto {
    margin: .85rem 0 0;
    font-size: .65rem;
}

.login-page .alert {
    margin: .75rem 0;
    padding: .75rem;
    font-size: .8rem;
}

/* Tablets, phones and high browser zoom */

@media (max-width: 60em) {
    body.auth.login-page {
        grid-template-columns: minmax(0, 1fr);
        align-content: start;
        gap: 1rem;
        padding: 1rem;
    }

    .login-page .auth-story {
        padding: 1.5rem;
        border-radius: 1.25rem;
    }

    .login-page .login-story-slider {
        margin: 1rem 0 .5rem;
    }

    .login-page .login-story-slider h2 {
        font-size: clamp(1.65rem, 5vw, 2.5rem);
    }

    .login-page .auth-story > p,
    .login-page .story-orb {
        display: none;
    }

    .login-page .story-footer {
        display: block;
        margin-top: .75rem;
    }

    .login-page main.auth-card.login-card {
        max-width: 32rem;
    }
}

@media (max-width: 36em) {
    body.auth.login-page {
        padding: .75rem;
        gap: .75rem;
    }

    .login-page .auth-story {
        padding: 1.1rem;
    }

    .login-page .auth-story > .hero-tag {
        font-size: .6rem;
        letter-spacing: .04em;
    }

    .login-page .login-story-slider h2 {
        font-size: 1.65rem;
    }

    .login-page main.auth-card.login-card {
        padding: 1.25rem;
        border-radius: 1.1rem;
    }
}

/* Short desktop screens */

@media (min-width: 60.01em) and (max-height: 45em) {
    body.auth.login-page {
        padding: .75rem;
        gap: 1.5rem;
    }

    .login-page main.auth-card.login-card {
        padding: 1.25rem 1.5rem;
    }

    .login-page .login-brand {
        margin-bottom: .85rem;
    }

    .login-page .login-brand img {
        width: 44px;
        height: 44px;
    }

    .login-page .login-introduction {
        margin-bottom: .85rem;
    }

    .login-page .login-help {
        margin-top: .75rem;
        padding-top: .65rem;
    }
}

.hero-slider-toggle {
    display: none !important;
}

.hero-slider:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 5px;
    border-radius: .4rem;
}

.password-field {
    position: relative;
    margin-bottom: .65rem;
}

.login-page .password-field input {
    padding-right: 3rem;
    margin-bottom: 0;
}

.login-page .password-toggle {
    position: absolute;
    top: 50%;
    right: .3rem;
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    min-height: 0;
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: .5rem;
    background: transparent;
    color: #737887;
    box-shadow: none;
    cursor: pointer;
}

.password-toggle[hidden],
.eye-slash[hidden] {
    display: none !important;
}

.login-page .password-toggle:hover {
    background: #f0f2f7;
    color: var(--primary);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.login-page .login-recovery {
    justify-content: center;
    margin: .75rem 0 0;
}

.forgot-password-link {
    color: var(--primary);
    font-size: .8rem;
    text-decoration: none;
}

.forgot-password-link[href]:hover {
    text-decoration: underline;
}

.forgot-password-link[aria-disabled="true"] {
    opacity: .65;
    cursor: default;
}

body.auth.login-page {
    background: #fff1f3;
}

.login-page main.auth-card.login-card {
    background: #fff;
    border-color: #f3dce1;
    box-shadow: 0 20px 60px #9e173015;
}
/* Stable slides and motto */
[data-hero-slider] { display: grid; grid-template-columns: minmax(0,1fr); position: relative; overflow: hidden; height: auto; min-width: 0; }
[data-hero-slider] .hero-slide { grid-area: 1 / 1; position: static !important; width: auto !important; max-width: 100%; margin: 0 !important; white-space: normal; overflow-wrap: anywhere; line-height: 1.15; }
[data-hero-slider][data-slider-ready] .hero-slide { display: block !important; visibility: hidden; opacity: 0; pointer-events: none; }
[data-hero-slider][data-slider-ready] .hero-slide.is-active { visibility: visible; opacity: 1; }
.login-page .auth-story { height: auto; overflow: hidden; }
.login-page .story-footer { display: block; position: static !important; inset: auto !important; transform: none !important; width: 100%; max-width: 100%; margin: 1.25rem 0 0; flex: none; color: #fff; opacity: .85; line-height: 1.6; overflow-wrap: anywhere; }
.login-page .login-story-slider { flex: none; width: 100%; }
.login-page .login-recovery { display: flex; justify-content: center; }
/* Sidebar drawer */
.sidebar-toggle, .sidebar-close, .sidebar-backdrop { display: none; }
body:not(.auth) > aside .sidebar-menu > summary { display: none !important; }
body:not(.auth) > aside .sidebar-menu nav { display: block; }
@media screen and (max-width:64em) {
 body:not(.auth) > aside { position: fixed; inset: 0 auto 0 0; width: min(20rem,85vw); height: 100dvh; padding: 1.5rem 1rem; overflow-y: auto; z-index: 1002; transform: translateX(-105%); visibility: hidden; transition: transform .22s ease, visibility .22s; box-shadow: 10px 0 40px #0003; }
 body.sidebar-open > aside { transform: translateX(0); visibility: visible; }
 body.sidebar-open { overflow: hidden; }
 .sidebar-toggle, .sidebar-close { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; min-height: 2.75rem; padding: .5rem; border-radius: .75rem; }
 .sidebar-toggle { background: #fff1f3; color: var(--primary); border: 1px solid #f3dce1; flex: none; }
 .sidebar-close { align-self: flex-end; background: #ffffff12; color: white; border: 1px solid #ffffff25; margin-bottom: .75rem; }
 .school-header > .header-title { display: flex; align-items: center; gap: .75rem; text-align: left; }
 .sidebar-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 1001; background: #11182788; }
 body:not(.auth) > aside .brand { margin-bottom: 1.25rem; }
 .sidebar-signout { margin-top: auto; padding-top: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) { body:not(.auth) > aside { transition: none; } }
@media print { .sidebar-toggle, .sidebar-close, .sidebar-backdrop { display: none !important; } }

/* Keep the menu icon and page title on the left. */
.school-header > .header-title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .75rem;
    margin: 0;
    margin-right: auto;
    text-align: left;
}

.school-header .header-label {
    margin: 0;
    text-align: left;
}

@media (max-width: 64em) {
    .school-header > .header-title {
        width: 100%;
        flex: 0 0 100%;
    }
}

/* Compact mobile header: identity/actions above title/year controls. */
@media screen and (max-width: 46em) {
    .workspace > .school-header {
        display: grid !important;
        grid-template-columns: 36px minmax(0, 1fr) auto;
        grid-template-rows: 40px auto;
        align-items: center;
        gap: 12px 9px !important;
        padding: 12px 14px !important;
        background: #fff;
        border-bottom: 1px solid #e8eaf0;
        box-shadow: 0 3px 14px #18233d06;
    }
    .school-header > .header-title,
    .school-header .header-right,
    .school-header .header-school {
        display: contents !important;
    }
    .school-header .sidebar-toggle {
        grid-column: 1;
        grid-row: 1;
        width: 36px !important;
        height: 36px !important;
        min-height: 36px !important;
        padding: 6px !important;
        margin: 0 !important;
        border-radius: 10px;
        background: #fff;
        border-color: #e8eaf0;
        box-shadow: none;
    }
    .school-header .header-school-name {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        align-items: center;
        gap: 7px;
        min-width: 0;
        max-width: 100%;
        margin: 0;
        font-size: 11px !important;
        font-weight: 700;
        line-height: 1.3;
        text-align: left;
        overflow-wrap: normal;
        color: #273145;
    }
    .school-header .header-school-name::before {
        content: '';
        display: block;
        width: 32px;
        height: 32px;
        flex: 0 0 32px;
        background-image: url('/school_image.php?type=logo'), url('/assets/school-logo.png');
        background-position: center;
        background-size: contain;
        background-repeat: no-repeat;
    }
    .school-header .header-actions {
        grid-column: 3;
        grid-row: 1;
        justify-content: flex-end;
        gap: 6px !important;
        margin: 0 !important;
        padding: 0;
    }
    .school-header .header-actions .header-icon,
    .school-header .header-avatar,
    .school-header .header-actions .nc-bell > summary {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        min-height: 34px !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 10px;
        box-shadow: none;
    }
    .school-header .header-avatar { border-radius: 50%; font-size: 13px; }
    .school-header .header-icon svg { width: 19px; height: 19px; }
    .school-header .nc-count { font-size: 9px; min-width: 17px; line-height: 17px; top: -4px; right: -4px; }
    .school-header .header-label {
        grid-column: 1 / 3;
        grid-row: 2;
        min-width: 0;
        font-size: 15px !important;
        font-weight: 750;
        letter-spacing: -.02em;
        line-height: 1.3;
        text-align: left;
        overflow-wrap: anywhere;
    }
    .school-header .header-year {
        grid-column: 3;
        grid-row: 2;
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-end;
        align-items: center;
        gap: 5px !important;
        margin: 0 !important;
        width: auto;
        min-width: 0;
    }
    .school-header .header-year select {
        flex: 0 1 auto;
        width: 104px;
        max-width: 104px;
        min-width: 0;
        min-height: 30px;
        height: 30px;
        margin: 0;
        padding: 4px 6px;
        font-size: 11px !important;
        border-radius: 7px;
        background: #fafbfc;
    }
    .school-header .header-year .year-switch {
        min-height: 30px;
        height: 30px;
        margin: 0;
        padding: 4px 7px;
        font-size: 10px;
        border-radius: 7px;
        box-shadow: none;
    }
    .school-header .nc-popover { top: 58px; }
}
@media screen and (max-width: 350px) {
    .workspace > .school-header { padding: 10px !important; gap: 10px 6px !important; }
    .school-header .header-school-name { font-size: 10px !important; gap: 5px; }
    .school-header .header-school-name::before { width: 26px; height: 26px; flex-basis: 26px; }
    .school-header .header-actions { gap: 4px !important; }
    .school-header .header-year select { width: 96px; max-width: 96px; }
    .school-header .header-label { font-size: 14px !important; }
}
@media screen and (max-width: 46em) {
    .school-header .header-actions details.nc-bell {
        flex: 0 0 34px !important;
        width: 34px !important;
        height: 34px !important;
        min-height: 34px !important;
    }
}

/* Refined mobile identity bar. */
@media screen and (max-width:46em) {
    .workspace > .school-header {
        grid-template-columns: 38px minmax(0,1fr) auto;
        grid-template-rows: 44px auto;
        padding: 14px 16px 12px !important;
        gap: 13px 10px !important;
        box-shadow: 0 4px 18px #17233908;
    }
    .school-header .sidebar-toggle {
        width: 38px !important;
        height: 38px !important;
        min-height: 38px !important;
        background: #f6f7f9;
        border: 0;
        border-radius: 12px;
        color: #263349;
    }
    .school-header .sidebar-toggle svg { width:22px; height:22px; }
    .school-header .header-school-name {
        justify-content: flex-start;
        gap: 8px;
        font-size: 0 !important;
        line-height: 1;
    }
    .school-header .header-school-name::before {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }
    .school-header .header-school-name::after {
        content: 'GEHMOS';
        font-size: 13px;
        font-weight: 800;
        letter-spacing: .055em;
        color: #202b3e;
    }
    .school-header .header-actions { gap: 7px !important; }
    .school-header .header-actions .header-icon,
    .school-header .header-actions .nc-bell > summary,
    .school-header .header-avatar {
        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
        min-height: 36px !important;
        border: 0 !important;
        border-radius: 50%;
        background: #f6f7f9;
        color: #4e596c;
    }
    .school-header .header-avatar { background:var(--primary,#c50929); color:#fff; font-size:13px; }
    .school-header .header-actions details.nc-bell { flex-basis:36px !important; width:36px !important; height:36px !important; min-height:36px !important; }
    .school-header .header-label { font-size:14px !important; font-weight:700; letter-spacing:0; color:#253247; }
    .school-header .header-year { gap:5px !important; }
    .school-header .header-year select {
        width:104px;
        max-width:104px;
        height:32px;
        min-height:32px;
        font-size:11px !important;
        padding:4px 7px;
        border:1px solid #e7eaf0;
        background:#f9fafc;
        border-radius:9px;
        color:#465368;
    }
    .school-header .header-year .year-switch {
        width:32px;
        height:32px;
        min-height:32px;
        padding:0;
        border:1px solid #e7eaf0;
        border-radius:9px;
        background:#f9fafc;
        color:#465368;
        font-size:0 !important;
    }
    .school-header .header-year .year-switch::after { content:'↗'; font-size:18px; line-height:1; }
}
@media screen and (max-width:350px) {
    .workspace > .school-header { padding:12px !important; gap:12px 8px !important; }
    .school-header .header-school-name { justify-content:center; }
    .school-header .header-school-name::after { display:none; }
    .school-header .header-year select { width:96px; max-width:96px; }
    .school-header .header-actions { gap:5px !important; }
}
@media screen and (max-width:46em) {
    .school-header .header-school-name { gap:6px; }
    .school-header .header-school-name::before { width:36px; height:36px; flex-basis:36px; }
    .school-header .header-school-name::after { letter-spacing:.025em; }
}
/* Keep the mobile dashboard top free of repeated page/calendar labels. */
@media screen and (max-width:46em) {
    .workspace:has(main .db-hero) .school-header .header-label { display:none !important; }
    .workspace:has(main .db-hero) .school-header .header-year { grid-column:1 / -1; justify-content:flex-start; }
    .workspace .academic-context { display:none !important; }
}
/* Equal mobile controls; academic year begins beneath the logo. */
@media screen and (max-width:46em) {
    .workspace > .school-header {
        grid-template-columns:40px minmax(0,1fr) auto;
        grid-template-rows:44px auto;
        gap:12px 8px !important;
    }
    .school-header .sidebar-toggle,
    .school-header .header-actions .header-icon,
    .school-header .header-actions .nc-bell > summary,
    .school-header .header-avatar {
        width:40px !important;
        min-width:40px !important;
        height:40px !important;
        min-height:40px !important;
        padding:0 !important;
        align-self:center;
    }
    .school-header .header-actions details.nc-bell {
        flex:0 0 40px !important;
        width:40px !important;
        height:40px !important;
        min-height:40px !important;
    }
    .school-header .header-school-name { justify-content:flex-start; align-items:center; gap:6px; }
    .school-header .header-school-name::before { width:40px; height:40px; flex:0 0 40px; }
    .school-header .header-school-name::after { display:block; font-size:13px; }
    .school-header .header-actions { align-items:center !important; gap:5px !important; }
    .workspace:has(main .db-hero) .school-header .header-year {
        grid-column:2 / -1;
        justify-content:flex-start;
        margin:0 !important;
    }
}
@media screen and (max-width:46em) {
    .workspace.mobile-calendar-header:has(main .db-hero) > .school-header {
        grid-template-rows:44px;
        row-gap:0 !important;
    }
    .sidebar-menu nav [hidden] { display:none !important; }
    .mobile-calendar-controls { padding:8px 12px 14px; }
    .mobile-calendar-controls p { color:#b8c2d4; font-size:12px; margin:4px 0 8px; }
    .mobile-calendar-controls .header-year { display:flex; justify-content:flex-start; flex-wrap:nowrap; gap:8px; margin:0 0 10px; }
    .mobile-calendar-controls .header-year select { flex:1; width:auto; max-width:none; min-height:38px; margin:0; padding:6px 10px; font-size:13px; background:#fff; color:#253247; border-radius:8px; }
    .mobile-calendar-controls .header-year .year-switch { min-height:38px; padding:6px 12px; font-size:12px; margin:0; }
    .mobile-calendar-controls a.nav { padding:10px 0; }
}
