/* Screen-only student portal finish. No dimensions or document/print rules. */
@media screen {
    html {
        --stu-ui-surface: #fff;
        --stu-ui-text: #203649;
        --stu-ui-line: #e2e8ef;
        --stu-ui-shadow: rgba(20, 38, 60, .085);
        --stu-ui-highlight: rgba(255, 255, 255, .9);
        --stu-ui-edge: rgba(20, 38, 60, .055);
        --stu-ui-wash: rgba(255, 255, 255, .08);
        --stu-ui-button-gloss: rgba(255, 255, 255, .14);
        --stu-ui-button-highlight: rgba(255, 255, 255, .3);
    }
    html.stu-dark {
        --stu-ui-surface: #1e293b;
        --stu-ui-text: #e8eef6;
        --stu-ui-line: #38485e;
        --stu-ui-shadow: rgba(0, 0, 0, .23);
        --stu-ui-highlight: rgba(255, 255, 255, .09);
        --stu-ui-edge: rgba(0, 0, 0, .16);
        --stu-ui-wash: rgba(255, 255, 255, .035);
        --stu-ui-button-gloss: transparent;
        --stu-ui-button-highlight: transparent;
        --stu-ui-tint: color-mix(in srgb, var(--stu-ui-primary) 16%, #1e293b);
        --stu-ui-dark-accent: color-mix(in srgb, var(--stu-ui-primary) 35%, #e8eef6);
        background: #0f172a;
        color-scheme: dark;
    }

    /* Small bevel: light along the top, shading only at the outer edges. */
    html body .stu-main-with-sidebar :is(.btn, .results-action, .link-btn, .cbt-btn, .stu-mat-btn, .notif-read-btn, button.back, a.back),
    html body .stu-topbar .stu-tb-btn,
    html body .stu-main-with-sidebar form button[type="submit"],
    html body > .box form button[type="submit"],
    html body #bio-register-btn {
        background-image: linear-gradient(180deg, var(--stu-ui-button-gloss), transparent 35%, transparent 70%, rgba(0,0,0,.07)),
            linear-gradient(90deg, var(--stu-ui-edge), transparent 9%, transparent 91%, var(--stu-ui-edge)) !important;
        box-shadow: inset 0 1px 0 var(--stu-ui-button-highlight), inset 0 -1px 0 rgba(0,0,0,.12),
            0 2px 2px rgba(20,38,60,.04), 0 4px 9px var(--stu-ui-shadow);
        border-radius: 10px;
        font-weight: 600;
        text-decoration: none;
        transition: box-shadow 160ms ease, border-color 160ms ease;
    }
    html body .stu-main-with-sidebar :is(.btn-primary, .results-action:not(.secondary):not(.disabled)) {
        background-color: var(--stu-ui-primary);
        color: var(--stu-ui-on-primary);
        border-color: var(--stu-ui-primary);
    }
    html body .stu-main-with-sidebar :is(.results-action.secondary, .link-btn, .cbt-btn.practice) {
        background-color: var(--stu-ui-surface);
        color: var(--stu-ui-accent);
        border-color: var(--stu-ui-line);
    }
    /* Action tiles use the same finish, with a quiet school-colour tint. */
    html body .stu-main-with-sidebar :is(.action-card, a.tt-card),
    html body .stu-more-panel .stu-more-links > :is(a, button) {
        background-color: var(--stu-ui-surface);
        background-image: linear-gradient(180deg, var(--stu-ui-highlight), transparent 24%, transparent 76%, var(--stu-ui-edge)),
            linear-gradient(105deg, var(--stu-ui-tint), transparent 48%, var(--stu-ui-wash));
        border-color: var(--stu-ui-line);
        border-radius: 13px;
        box-shadow: inset 0 1px 0 var(--stu-ui-highlight), inset 0 -1px 0 var(--stu-ui-edge),
            0 2px 3px rgba(20,38,60,.035), 0 5px 13px var(--stu-ui-shadow);
        text-decoration: none;
        transition: box-shadow 160ms ease, border-color 160ms ease;
    }
    html body .stu-more-panel {
        background-color: var(--stu-ui-surface);
        border-color: var(--stu-ui-line);
        box-shadow: inset 0 1px 0 var(--stu-ui-highlight), 0 -8px 28px var(--stu-ui-shadow);
    }
    html body .stu-more-panel .stu-more-links > :is(a, button) { color: var(--stu-ui-text); }
    html body .stu-more-panel .stu-more-links .stu-more-icon { color: var(--stu-ui-accent); }
    html.stu-dark body .stu-more-panel .stu-more-links .stu-more-icon { color: var(--stu-ui-dark-accent); }
    html body.student-dashboard .action-card { transform: none; }
    html body .stu-main-with-sidebar .action-card .title { font-weight: 700; letter-spacing: -.15px; }
    html body .stu-main-with-sidebar :is(.action-card .icon, .tc-arrow) { color: var(--stu-ui-accent); }
    html body .stu-main-with-sidebar :is(.dash-panel, .results-card, .stat-card, .subj-card, .filter-panel, .filter-card, .notif-card, .subj-col),
    html body.student-dashboard .dashboard-grid .card,
    html body.student-dashboard .dash-stat,
    html body.student-dashboard .dash-calendar > div {
        border-color: var(--stu-ui-line);
        box-shadow: inset 0 1px 0 var(--stu-ui-highlight), 0 3px 5px rgba(20,38,60,.025), 0 9px 24px var(--stu-ui-shadow);
    }
    /* The four overview cards match the raised portal action tiles. */
    html body.student-dashboard .dash-stats .dash-stat {
        background-color: var(--stu-ui-surface);
        background-image: linear-gradient(180deg, var(--stu-ui-highlight), transparent 24%, transparent 76%, var(--stu-ui-edge)),
            linear-gradient(105deg, var(--stu-ui-tint), transparent 48%, var(--stu-ui-wash));
        border-color: var(--stu-ui-line);
        box-shadow: inset 0 1px 0 var(--stu-ui-highlight), inset 0 -1px 0 var(--stu-ui-edge),
            0 2px 3px rgba(20,38,60,.035), 0 5px 13px var(--stu-ui-shadow);
        transition: box-shadow 160ms ease, border-color 160ms ease;
    }
    html body.student-dashboard .dash-stats a.dash-stat:focus-visible {
        outline: 2px solid var(--stu-ui-primary);
        outline-offset: 3px;
    }
    html body .stu-main-with-sidebar :is(.filter-panel, .filter-card, .results-simple-filter) {
        background-image: linear-gradient(120deg, var(--stu-ui-wash), transparent 65%);
    }
    html body .stu-main-with-sidebar :is(select, input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), textarea) {
        box-shadow: inset 0 1px 2px rgba(20,38,60,.04);
    }
    html body .stu-main-with-sidebar :is(.btn, .results-action, .link-btn, .cbt-btn, .stu-mat-btn, .action-card, a.tt-card):focus-visible,
    html body .stu-topbar .stu-tb-btn:focus-visible,
    html body .stu-more-panel .stu-more-links > :is(a, button):focus-visible {
        outline: 2px solid var(--stu-ui-primary);
        outline-offset: 3px;
    }
    html body .stu-main-with-sidebar :is(button:disabled, .disabled, [aria-disabled="true"]) {
        background-image: none !important;
        box-shadow: none;
        cursor: not-allowed;
    }
    html.stu-dark body .stu-main-with-sidebar :is(.action-card .icon, .tc-arrow, .results-action.secondary, .link-btn, .cbt-btn.practice) {
        color: var(--stu-ui-dark-accent);
    }
    html.stu-dark .lb-student-page .lb-button:not(.lb-secondary) {
        background: var(--lb-primary);
        box-shadow: 0 3px 8px var(--stu-ui-shadow);
    }
    html.stu-dark .lb-student-page .lb-card {
        box-shadow: 0 5px 22px var(--stu-ui-shadow);
    }
    html.stu-dark .lb-student-page .lb-form label {
        color: var(--lb-ink);
    }
    html.stu-dark .results-workspace :is(.results-field-label, .results-muted) {
        color: #afbfce;
    }
    @media (hover: hover) {
        html body.student-dashboard .dash-stats a.dash-stat:hover {
            border-color: var(--stu-ui-primary);
            box-shadow: inset 0 1px 0 var(--stu-ui-highlight), 0 7px 18px var(--stu-ui-shadow);
        }
        html body .stu-main-with-sidebar :is(.action-card, a.tt-card):hover,
        html body .stu-more-panel .stu-more-links > :is(a, button):hover {
            border-color: var(--stu-ui-primary);
            box-shadow: inset 0 1px 0 var(--stu-ui-highlight), 0 7px 18px var(--stu-ui-shadow);
        }
        html body .stu-main-with-sidebar :is(.btn, .results-action, .link-btn, .cbt-btn, .stu-mat-btn):not(:disabled):not(.disabled):hover {
            box-shadow: inset 0 1px 0 var(--stu-ui-button-highlight), inset 0 -1px 0 rgba(0,0,0,.12), 0 5px 12px var(--stu-ui-shadow);
        }
    }
    html body .stu-main-with-sidebar :is(.btn, .results-action, .link-btn, .cbt-btn, .stu-mat-btn, .action-card, a.tt-card):not(:disabled):not(.disabled):active,
    html body .stu-more-panel .stu-more-links > :is(a, button):active,
    html body.student-dashboard .dash-stats a.dash-stat:active {
        box-shadow: inset 0 2px 4px var(--stu-ui-edge), inset 0 1px 0 rgba(0,0,0,.04), 0 1px 2px var(--stu-ui-shadow);
    }
    @media (prefers-reduced-motion: reduce) {
        html body .stu-main-with-sidebar :is(.btn, .results-action, .link-btn, .cbt-btn, .stu-mat-btn, .action-card, a.tt-card),
        html body .stu-topbar .stu-tb-btn,
        html body .stu-more-panel .stu-more-links > :is(a, button),
        html body.student-dashboard .dash-stats .dash-stat { transition: none; }
    }
}
