.development-banner {
	height: 5px;
	flex: 0 0 5px;
	width: 100%;
	background: #ff0000;
}

:root {
    /* Student portal palette */
    --background-page: #F8F6F1;
    --background-card: #FFFFFF;
    --background-soft: #F1EEE5;
    --background-sage: #E5E9E1;
    --forest-dark: #1E3C22;
    --forest-primary: #2F4F35;
    --forest-medium: #556C54;
    --sage-dark: #74876E;
    --sage-medium: #A4ACA0;
    --sage-light: #BBC3B5;
    --clay-primary: #C77A4C;
    --clay-light: #DCA075;
    --ochre-primary: #D29112;
    --gold-light: #EDC672;
    --sand: #D1CCAF;
    --text-primary: #18251B;
    --text-secondary: #556157;
    --text-muted: #748078;
    --text-on-dark: #FFFFFF;
    --border-light: #DDD9CE;
    --border-medium: #C9C5B9;
    --success: #2F6845;
    --focus-ring: #C77A4C;

    --ink-950: #292d2c;
    --ink-900: #292d2c;
    --ink-800: #3f4744;
    --ink-700: #56615d;
    --ink-600: #6d7773;
    --surface: #ffffff;
    --surface-soft: #faf8f1;
    --surface-muted: #ece9df;
    --line: #d8d5cb;
    --line-strong: #c7c5bb;
    --teal-700: #214c49;
    --teal-600: #285c59;
    --teal-500: #3e706b;
    --teal-100: #dfe8e3;
    --coral-700: #985a43;
    --coral-600: #b86f52;
    --coral-500: #c7866d;
    --teacher-700: #5f786c;
    --teacher-600: #789486;
    --standards-700: #9b781f;
    --shadow-sm: 0 1px 2px rgba(41, 45, 44, .04);
    --shadow-md: 0 8px 22px rgba(41, 45, 44, .09);
    --shadow-lg: 0 18px 42px rgba(41, 45, 44, .15);
    --radius-md: 7px;
    --radius-lg: 10px;
}

html,
html.bg-\[\#46566f\] {
    min-height: 100%;
    background: #f5f2e9;
    scroll-behavior: smooth;
}

body,
body.bg-\[\#46566f\] {
    min-height: 100%;
    color: var(--ink-900);
    background: #f5f2e9;
    font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
    letter-spacing: .002em;
}

.font-sans { font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; }
.font-heading {
    font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
    letter-spacing: -.025em;
}
.text-xs { font-size: .8rem; line-height: 1.45; }
.text-sm { line-height: 1.55; }

button, [role="button"], select, summary { -webkit-tap-highlight-color: transparent; }
button, [role="button"] {
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
button:hover, [role="button"]:hover { transform: translateY(-1px); }
button:active, [role="button"]:active { transform: translateY(0); }
button:focus-visible, [role="button"]:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
    outline: 3px solid rgba(24, 163, 148, .28);
    outline-offset: 3px;
}

/* Product header and navigation */
.app-header {
    min-height: 72px;
    border-color: rgba(197, 212, 220, .82);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 1px 0 rgba(16, 36, 62, .05), 0 8px 24px rgba(16, 36, 62, .04);
    backdrop-filter: blur(14px);
}
.app-header > div { height: 72px; max-width: 1180px; }
.app-brand > div:first-child {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--teal-600);
    box-shadow: 0 8px 18px rgba(11, 143, 130, .22);
}
.app-brand .text-slate-900 { color: var(--ink-950); font-size: 1.02rem; }
.app-brand .text-slate-500 { color: var(--ink-600); }
.app-nav {
    display: flex;
    gap: 3px;
    padding: 4px;
    border-color: var(--line);
    border-radius: 14px;
    background: var(--surface-muted);
}
.app-nav button {
    min-height: 38px;
    border-radius: 10px;
    padding-inline: 14px;
    color: var(--ink-700);
}
.app-nav button.bg-white {
    color: var(--ink-950);
    background: #fff;
    box-shadow: 0 2px 8px rgba(16, 36, 62, .08);
}
.app-header-actions > div, .app-header-actions > button {
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface-soft);
    color: var(--ink-700);
}
.app-shell { max-width: 1180px; padding-top: 28px; padding-bottom: 56px; }

/* Access page branding mirrors the student Applied Health Skills hero. */
.access-brand-banner {
    position: relative;
    min-height: 190px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: var(--text-primary);
    background-image:
        linear-gradient(90deg, rgba(248,246,241,.98) 0%, rgba(248,246,241,.94) 43%, rgba(248,246,241,.76) 61%, rgba(248,246,241,.12) 100%),
        url("../icons/Main%20Banner%20Background.jpg");
    background-position: center, center;
    background-size: cover, cover;
    background-repeat: no-repeat;
}
.access-brand-content { position: relative; z-index: 1; max-width: 62%; }
.access-brand-banner h1 {
    color: var(--forest-dark);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
}
.access-brand-banner p { color: var(--text-secondary); }

/* Student dashboard */
.student-hero {
    min-height: 278px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--radius-lg);
    background: var(--ink-950);
    box-shadow: var(--shadow-md);
}
.student-hero::before, .student-hero::after {
    content: "";
    position: absolute;
    pointer-events: none;
    border-radius: 999px;
}
.student-hero::before {
    width: 260px;
    height: 260px;
    right: -70px;
    top: -100px;
    border: 44px solid rgba(24, 163, 148, .16);
}
.student-hero::after {
    width: 130px;
    height: 130px;
    right: 155px;
    bottom: -76px;
    border: 28px solid rgba(244, 119, 104, .13);
}
.student-hero > .absolute { display: none; }
.student-hero .relative { max-width: 700px; }
.student-hero h1 {
    max-width: 660px;
    font-size: clamp(1.85rem, 4vw, 2.75rem);
    line-height: 1.08;
    letter-spacing: -.045em;
}
.student-hero p { max-width: 650px; color: #cad7e2; font-size: .98rem; }
.student-hero .bg-health-500\/20 {
    border-color: rgba(126, 224, 207, .24);
    background: rgba(24, 163, 148, .14);
    color: #9ce8dc;
}
.student-hero button { min-height: 46px; border-radius: 12px; }
.student-hero button.bg-health-500 {
    color: #fff;
    background: var(--coral-600);
    box-shadow: 0 9px 20px rgba(227, 96, 83, .24);
}
.student-hero button.bg-health-500:hover { background: var(--coral-700); }

.mastery-panel, .practice-configurator, #student-workspace > div:first-child,
#scenario-response-container, #stage-1-intro, #stage-2-refresher, #stage-3-scaffold,
#stage-5-feedback > div, #print-certificate-area {
    border-color: var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.mastery-panel { padding: 22px; background: rgba(255, 255, 255, .96); }
.mastery-panel h3 { color: var(--ink-900); font-size: .9rem; }
#mastery-badges-grid > div {
    min-height: 42px;
    border-color: var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
}
#mastery-badges-grid > .opacity-60 { opacity: .72; }
#student-hub > div:nth-child(3) { padding: 6px 2px 0; }
#student-hub > div:nth-child(3) h2 { color: var(--ink-950); font-size: 1.22rem; }
#student-hub > div:nth-child(3) span { color: var(--ink-600); }
.practice-configurator { padding: 26px; background: rgba(255, 255, 255, .97); }
.practice-configurator > h3 { color: var(--ink-950); font-size: 1.05rem; }
.practice-configurator > p { color: var(--ink-600); font-size: .83rem; }

label { color: var(--ink-700) !important; font-weight: 650 !important; }
input, select, textarea {
    border-color: var(--line-strong) !important;
    border-radius: 11px !important;
    background: var(--surface-soft) !important;
    color: var(--ink-950) !important;
}
input, select { min-height: 42px; }
textarea { line-height: 1.65 !important; }
input:focus, select:focus, textarea:focus {
    border-color: var(--teal-500) !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(24, 163, 148, .11) !important;
}

#skill-cards-container { gap: 16px; }
#skill-cards-container > div {
    min-height: 238px;
    padding: 20px;
    border-color: var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: 0 2px 0 rgba(16, 36, 62, .02);
}
#skill-cards-container > div:hover {
    border-color: rgba(24, 163, 148, .5);
    box-shadow: 0 14px 28px rgba(16, 36, 62, .10);
    transform: translateY(-3px);
}
#skill-cards-container > div > div:first-of-type > div:first-child > div:first-child {
    border: 1px solid rgba(16, 36, 62, .04);
    border-radius: 13px;
}
#skill-cards-container h3 { color: var(--ink-950); font-size: 1.05rem; }
#skill-cards-container h3 + p { color: var(--teal-700); font-weight: 650; }
#skill-cards-container h3 + p + p { color: var(--ink-700); line-height: 1.55; }
#skill-cards-container > div > div:last-child { color: var(--coral-700); }

/* Practice pipeline */
#student-workspace > div:first-child {
    position: sticky;
    top: 88px;
    z-index: 20;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
}
.step-item span:first-child {
    border: 1px solid var(--line);
    background: var(--surface-muted);
}
.step-item.text-health-600 span:first-child {
    border-color: var(--teal-500);
    background: var(--teal-100);
    color: var(--teal-700);
}
#stage-1-intro, #stage-2-refresher, #stage-3-scaffold,
#scenario-response-container, #stage-5-feedback > div { padding: clamp(22px, 4vw, 36px); }
#intro-skill-icon {
    border-radius: 20px;
    background: var(--teal-600);
    box-shadow: 0 12px 24px rgba(11, 143, 130, .2);
}
#refresher-framework-body { border-color: var(--line); background: var(--surface-soft); }
#choice-show-reminder, #choice-hide-reminder { border-color: var(--line); background: var(--surface-soft); }
#choice-show-reminder:hover, #choice-hide-reminder:hover {
    border-color: var(--teal-500);
    background: #fff;
}
#stage-4-scenario > .bg-gradient-to-br {
    border: 1px solid #274b66;
    border-radius: var(--radius-lg);
    background: var(--ink-950);
    box-shadow: var(--shadow-md);
}
#scenario-text { max-width: 900px; font-size: clamp(1rem, 2vw, 1.16rem); }
#scenario-response-container textarea { min-height: 190px; }
#chat-messages { border-color: var(--line); background: var(--surface-soft); }
.chat-bubble-peer { border-top-left-radius: 4px; }
.chat-bubble-user { border-top-right-radius: 4px; }
#feedback-strengths-list, #feedback-needs-work-list { line-height: 1.55; }
#stage-5-feedback .bg-gradient-to-r { background: var(--ink-950); }
#stage-5-feedback .bg-gradient-to-r #feedback-practice-tip-text { color: #fff; }
#print-certificate-area { border-color: var(--line-strong); }

/* Action hierarchy */
button.bg-health-600, button.bg-brand-600 {
    background: var(--teal-600);
    box-shadow: 0 7px 16px rgba(11, 143, 130, .16);
}
button.bg-health-600:hover, button.bg-health-700:hover,
button.bg-brand-600:hover, button.bg-brand-700:hover { background: var(--teal-700); }
button.bg-amber-600 { background: var(--coral-600); }
button.bg-amber-600:hover { background: var(--coral-700); }

/* Teacher tools */
#view-teacher > div:first-child {
    padding: 26px 28px;
    border: 1px solid #cfdcf1;
    border-radius: var(--radius-lg);
    background: linear-gradient(110deg, #f8fbff, #edf4ff);
    box-shadow: var(--shadow-sm);
}
#view-teacher > div:first-child h1 { color: #18365d; }
#view-teacher > div:first-child button {
    background: var(--teacher-600);
    box-shadow: 0 8px 18px rgba(63, 112, 199, .2);
}
#view-teacher > .grid > div {
    position: relative;
    overflow: hidden;
    min-height: 142px;
    padding: 22px;
    border-color: var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
#view-teacher > .grid > div::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--teacher-600);
}
#view-teacher > .grid > div:nth-child(2)::before { background: var(--teal-500); }
#view-teacher > .grid > div:nth-child(3)::before { background: var(--coral-500); }
#view-teacher > .grid > div:nth-child(4)::before { background: #d19945; }
#view-teacher > .bg-white {
    border-color: var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
#view-teacher thead tr { color: var(--ink-600); background: #f1f5f9; }
#view-teacher tbody tr:hover { background: #f7faff; }
#view-teacher th, #view-teacher td { padding-top: 14px; padding-bottom: 14px; }

/* Standards library */
#view-standards > div:first-child {
    padding: 26px 28px;
    border: 1px solid #eadfc8;
    border-radius: var(--radius-lg);
    background: #fffdf8;
    box-shadow: var(--shadow-sm);
}
#view-standards > div:first-child h1 { color: var(--ink-950); }
#view-standards > div:nth-child(2) {
    max-width: 620px;
    margin-inline: auto;
    border-color: var(--line);
    border-radius: 15px;
    background: rgba(255, 255, 255, .96);
}
#view-standards > div:nth-child(2) button.bg-health-600,
#view-standards > div:nth-child(2) button.bg-brand-600 {
    background: var(--standards-700);
    box-shadow: none;
}
#standards-browser-content details {
    border-color: var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, .98);
    box-shadow: var(--shadow-sm);
}
#standards-browser-content details[open] {
    border-color: #c8d9de;
    box-shadow: 0 10px 24px rgba(16, 36, 62, .07);
}
#standards-browser-content summary {
    position: relative;
    padding-right: 48px;
    list-style: none;
}
#standards-browser-content summary::-webkit-details-marker { display: none; }
#standards-browser-content summary::after {
    content: "+";
    position: absolute;
    right: 20px;
    top: 50%;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--ink-700);
    font-size: 1.05rem;
    transform: translateY(-50%);
}
#standards-browser-content details[open] > summary::after {
    content: "−";
    background: var(--teal-100);
    color: var(--teal-700);
}

/* Dialogs and utilities */
[id^="modal-"] { background: rgba(9, 25, 42, .68); backdrop-filter: blur(7px); }
[id^="modal-"] > div {
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
#toast-notification {
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 13px;
    background: var(--ink-950);
    box-shadow: var(--shadow-lg);
}
.custom-scrollbar::-webkit-scrollbar { width: 7px; }
.custom-scrollbar::-webkit-scrollbar-track { background: var(--surface-muted); border-radius: 6px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #adc2cc; border-radius: 6px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #8fa9b5; }

/* Editorial exploration theme: restrained, spacious, and discovery-led. */
.app-header {
    border-color: var(--line);
    background: #fff;
    box-shadow: 0 1px 0 rgba(41, 45, 44, .08);
}

.app-brand > div:first-child {
    border-radius: 4px;
    background: #285c59;
    box-shadow: none;
}

.app-nav {
    border: 0;
    border-radius: 4px;
    background: #f3f1e9;
}

.app-nav button {
    border-radius: 3px;
}

.app-nav button.bg-white {
    color: #285c59;
    box-shadow: inset 0 -3px 0 #d5a936;
}

.app-header-actions > div,
.app-header-actions > button {
    border-radius: 3px;
    background: #fff;
}

.student-hero {
    min-height: 340px;
    border: 1px solid #214c49;
    border-left: 8px solid #d5a936;
    border-radius: 6px;
    background: #285c59;
    box-shadow: var(--shadow-sm);
}

.student-hero::before,
.student-hero::after {
    display: none;
}

.student-hero .relative {
    max-width: 760px;
}

.student-hero h1 {
    font-size: clamp(2rem, 4vw, 2.9rem);
    font-weight: 750;
    letter-spacing: -.04em;
}

.student-hero p {
    max-width: 690px;
    color: #f0eee5;
}

.student-hero .bg-health-500\/20 {
    border: 0;
    border-left: 4px solid #d5a936;
    border-radius: 0;
    background: rgba(245, 242, 233, .12);
    color: #fff;
}

.student-hero button,
button.bg-health-600,
button.bg-brand-600,
button.bg-amber-600 {
    border-radius: 4px;
    box-shadow: none;
}

.student-hero button.bg-health-500 {
    color: #292d2c;
    background: #d5a936;
    box-shadow: none;
}

.student-hero button.bg-health-500:hover {
    background: #c69b2c;
}

.mastery-panel,
.practice-configurator,
#student-workspace > div:first-child,
#scenario-response-container,
#stage-1-intro,
#stage-2-refresher,
#stage-3-scaffold,
#stage-5-feedback > div,
#print-certificate-area,
#view-teacher > .bg-white,
#standards-browser-content details {
    border-radius: 7px;
    box-shadow: var(--shadow-sm);
}

.mastery-panel {
    border-top: 4px solid #d5a936;
}

#mastery-badges-grid > div {
    border-radius: 3px;
    background: #faf8f1;
}

.practice-configurator {
    border-left: 4px solid #789486;
}

input,
select,
textarea {
    border-radius: 3px !important;
    background: #faf8f1 !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #285c59 !important;
    box-shadow: 0 0 0 3px rgba(40, 92, 89, .12) !important;
}

#skill-cards-container {
    gap: 14px;
}

#skill-cards-container > div {
    min-height: 250px;
    border-radius: 4px;
    box-shadow: none;
}

#skill-cards-container > div:hover {
    border-color: #789486;
    box-shadow: 0 6px 16px rgba(41, 45, 44, .08);
    transform: translateY(-2px);
}

#skill-cards-container > div::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 3px;
    background: #d5a936;
    opacity: 0;
    transition: opacity 160ms ease;
}

#skill-cards-container > div:hover::after {
    opacity: 1;
}

#skill-cards-container h3 + p {
    color: #285c59;
}

#skill-cards-container > div > div:last-child {
    color: #985a43;
}

#skill-cards-container .rounded-xl,
#skill-cards-container .rounded-full {
    border-radius: 3px;
}

[class*="text-health-"] { color: #285c59; }
[class*="text-brand-"] { color: #985a43; }
.bg-health-600,
.bg-brand-600 { background-color: #285c59; }
.bg-health-100 { background-color: #dfe8e3; }
.bg-brand-100 { background-color: #eee1da; }
.bg-amber-100 { background-color: #f4e8c5; }

.step-item.text-health-600 span:first-child {
    border-color: #d5a936;
    background: #f5eccf;
    color: #292d2c;
}

#intro-skill-icon {
    border-radius: 4px;
    background: #285c59;
    box-shadow: none;
}

#choice-show-reminder,
#choice-hide-reminder,
#refresher-framework-body,
#chat-messages {
    border-radius: 4px;
}

#stage-4-scenario > .bg-gradient-to-br {
    border-color: #285c59;
    border-radius: 6px;
    background: #285c59;
    box-shadow: var(--shadow-sm);
}

#stage-5-feedback .bg-gradient-to-r {
    border-left: 5px solid #d5a936;
    border-radius: 4px;
    background: #285c59;
}

#view-teacher > div:first-child,
#view-standards > div:first-child {
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
}

#view-teacher > div:first-child {
    border-color: #cdd8d2;
    border-left: 6px solid #789486;
    background: #f8f7f1;
}

#view-teacher > div:first-child h1 {
    color: #292d2c;
}

#view-teacher > div:first-child button {
    background: #285c59;
    box-shadow: none;
}

#view-teacher > .grid > div {
    min-height: 150px;
    border-radius: 4px;
    box-shadow: none;
}

#view-teacher > .grid > div::before {
    width: 3px;
    background: #789486;
}

#view-teacher > .grid > div:nth-child(2)::before { background: #285c59; }
#view-teacher > .grid > div:nth-child(3)::before { background: #b86f52; }
#view-teacher > .grid > div:nth-child(4)::before { background: #d5a936; }

#view-standards > div:first-child {
    border-color: #ded7c3;
    border-left: 6px solid #d5a936;
    background: #faf8f1;
}

#view-standards > div:nth-child(2) {
    border-radius: 4px;
    background: #fff;
}

#view-standards > div:nth-child(2) button.bg-health-600,
#view-standards > div:nth-child(2) button.bg-brand-600 {
    border-radius: 3px;
    background: #285c59;
}

#standards-browser-content details[open] {
    border-color: #b9c8c0;
    box-shadow: var(--shadow-sm);
}

#standards-browser-content summary::after {
    border-radius: 3px;
}

#standards-browser-content details[open] > summary::after {
    background: #f2e5bd;
    color: #6f5517;
}

/* Standards tooltips use application classes so they do not depend on a CSS framework. */
.standard-reference {
    position: relative;
    display: inline-flex;
}

.standard-code {
    color: #285c59;
    font-size: 11px;
    font-weight: 700;
    text-decoration-line: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    cursor: help;
}

.standard-tooltip {
    position: absolute;
    z-index: 9999;
    top: calc(100% + 8px);
    left: 0;
    width: min(20rem, calc(100vw - 2rem));
    max-height: min(20rem, 60vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    padding: 12px 14px;
    border: 1px solid #466663;
    border-radius: 4px;
    background: #292d2c;
    color: #fff;
    font-size: .8rem;
    font-weight: 500;
    line-height: 1.55;
    box-shadow: 0 12px 28px rgba(41, 45, 44, .2);
    transition: opacity 140ms ease, visibility 140ms ease;
}

.standard-reference:hover,
.standard-reference:focus,
.standard-reference:focus-within {
    z-index: 9998;
}

.standard-reference:hover .standard-tooltip,
.standard-reference:focus .standard-tooltip,
.standard-reference:focus-within .standard-tooltip {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.standard-tooltip-label {
    display: block;
    margin-bottom: 4px;
    color: #e5c869;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.level-badge-1 { background: #fee2e2; color: #991b1b; }
.level-badge-2 { background: #ffedd5; color: #9a3412; }
.level-badge-3 { background: #d1fae5; color: #065f46; }
.standard-progress-level-1 { background: #fef2f2; border-color: #ef4444 !important; }
.standard-progress-level-2 { background: #fff7ed; border-color: #f97316 !important; }
.standard-progress-level-3 { background: #ecfdf5; border-color: #22c55e !important; }
.standard-progress-score { font-size: .72rem; font-weight: 800; color: #334155; }
.bg-rose-100 { background: #fee2e2; }
.text-rose-800 { color: #991b1b; }
.bg-orange-100 { background: #ffedd5; }
.text-orange-800 { color: #9a3412; }

[id^="modal-"] > div,
#toast-notification {
    border-radius: 6px;
}

@media (max-width: 900px) {
    .app-header-actions > div { display: none; }
    .app-brand > div:last-child span:last-child { display: none; }
    #student-workspace > div:first-child { position: static; }
}

@media (max-width: 767px) {
    body { padding-bottom: 74px; }
    .app-header {
        min-height: 62px;
        height: 62px;
        backdrop-filter: none;
    }
    .app-header > div { min-height: 62px; height: 62px; }
    .app-header .app-nav {
        position: fixed;
        inset: auto 10px 10px;
        z-index: 45;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 4px;
        padding: 6px;
        border: 1px solid rgba(197, 212, 220, .94);
        border-radius: 17px;
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 14px 40px rgba(16, 36, 62, .2);
        backdrop-filter: blur(16px);
    }
    .app-nav button {
        min-width: 0;
        min-height: 48px;
        padding: 6px 4px;
        font-size: .68rem;
        line-height: 1.15;
    }
    .app-nav button i { display: block; margin: 0 auto 4px !important; font-size: .92rem; }
    .app-header-actions > button { width: 40px; padding-inline: 0; justify-content: center; }
    .app-header-actions > button span:nth-child(2) { display: none; }
    .app-header-actions > button i { margin-left: 0; }
    .app-shell { padding: 16px 14px 30px; }
    .student-hero { min-height: 0; padding: 25px 22px; border-radius: 18px; }
    .student-hero::before { right: -130px; }
    .student-hero::after { display: none; }
    .student-hero h1 { font-size: 1.75rem; }
    .student-hero p { font-size: .88rem; }
    .student-hero .mt-5 { display: grid; grid-template-columns: 1fr; }
    .student-hero button { width: 100%; justify-content: center; }
    .mastery-panel, .practice-configurator { padding: 20px; border-radius: 18px; }
    #skill-cards-container > div { min-height: 220px; }
    #student-workspace > div:first-child > div:last-child { width: 100%; justify-content: space-between; }
    #student-workspace > div:first-child .step-item span:first-child { width: 28px; height: 28px; }
    #student-workspace > div:first-child .fa-chevron-right { display: none; }
    #scenario-response-container .flex.items-center.justify-between { align-items: flex-start; gap: 12px; }
    #scenario-response-container .flex.items-center.justify-between > div {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    #stage-4-scenario > .bg-gradient-to-br > div:first-child { align-items: flex-start; gap: 12px; }
    #stage-4-scenario > .bg-gradient-to-br > div:first-child > div {
        flex-direction: column;
        align-items: flex-end;
    }
    #view-teacher > div:first-child, #view-standards > div:first-child {
        padding: 22px;
        border-radius: 18px;
    }
    #view-teacher > div:first-child button, #view-standards > div:first-child input {
        width: 100%;
        justify-content: center;
    }
    #view-teacher > .grid > div { min-height: 120px; }
    #standards-browser-content summary { padding: 18px 48px 18px 18px; }
    #standards-browser-content details > div { padding: 18px; }
}

/* Teacher portal: shares the student dashboard's warm, grounded visual system. */
.teacher-portal { color: var(--text-primary); background: var(--background-page); }
html:has(.teacher-portal) { background: var(--background-page); }
.teacher-portal .teacher-header { border-color: var(--forest-dark); background: linear-gradient(160deg, var(--forest-dark), var(--forest-primary)); }
.teacher-portal .teacher-header > div { display: flex; align-items: center; justify-content: space-between; max-width: 1440px; margin: auto; padding: 0 24px; }
.teacher-portal .app-brand > span:first-child { border: 1px solid rgba(255,255,255,.5); background: transparent; }
.teacher-portal .app-brand b, .teacher-portal .app-brand small { color: var(--text-on-dark); }
.teacher-navigation { position: sticky; top: 72px; z-index: 20; display: flex; align-items: center; gap: 4px; padding: 8px max(16px, calc((100vw - 1440px) / 2)); border-bottom: 1px solid var(--border-light); border-radius: 0; background: var(--background-card); }
.teacher-navigation .teacher-nav { display: flex; min-height: 42px; align-items: center; gap: 9px; padding: 9px 13px; border-radius: 7px; color: var(--text-secondary); }
.teacher-navigation .teacher-nav.bg-brand-600 { border: 1px solid var(--sage-dark); color: var(--forest-dark); background: var(--background-sage); box-shadow: none; }
.teacher-navigation .teacher-nav.bg-brand-600:hover,
.teacher-navigation .teacher-nav.bg-brand-600:active {
    transform: none;
    border-color: var(--sage-dark);
    color: var(--forest-dark);
    background: var(--background-sage);
    box-shadow: none;
}
.teacher-navigation .teacher-nav.bg-brand-600 #nav-comment-count {
    color: inherit;
    background: transparent;
    box-shadow: none;
}
.teacher-navigation .nav-icon { width: 20px; height: 20px; object-fit: contain; }
.teacher-profile-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 20px; padding: 18px 22px; border: 1px solid var(--border-light); border-radius: 14px; background: var(--background-card); }
.teacher-profile-row h1 { color: var(--text-primary); font-size: clamp(1.3rem,2.2vw,1.7rem); font-weight: 750; letter-spacing: -.025em; }
.teacher-profile-row p { margin-top: 3px; color: var(--text-secondary); font-size: .86rem; }
.teacher-profile-actions { display: flex; align-items: center; gap: 14px; }
.teacher-profile-actions > label { color: var(--text-secondary); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.teacher-profile-actions select { display: block; min-width: 190px; margin-top: 4px; padding: 8px 32px 8px 10px; border: 1px solid var(--border-medium); border-radius: 8px; background: white; color: var(--text-primary); font-size: .8rem; text-transform: none; letter-spacing: normal; }
.teacher-account-summary { min-height: 48px; padding: 4px 8px; border-radius: 10px; color: var(--text-primary); }
.teacher-account-summary:hover { background: var(--background-soft); }
.teacher-avatar { display: inline-flex; width: 40px; height: 40px; flex: 0 0 40px; align-items: center; justify-content: center; border-radius: 50%; color: var(--text-on-dark); background: var(--forest-primary); font-size: .8rem; font-weight: 800; letter-spacing: .04em; }
.teacher-account-label { display: flex; min-width: 105px; flex-direction: column; line-height: 1.25; }
.teacher-account-label strong { max-width: 170px; overflow: hidden; color: var(--text-primary); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.teacher-account-label small { margin-top: 2px; color: var(--text-secondary); font-size: .68rem; }
.teacher-account-chevron { color: var(--text-secondary); font-size: .65rem; transition: transform .2s ease; }
.teacher-account-menu[open] .teacher-account-chevron { transform: rotate(180deg); }
.profile-message-center-button { width: 100%; display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 4px 2px; border-top: 1px solid var(--border-light); color: var(--forest-primary); text-align: left; }
.profile-message-center-button > i { width: 28px; font-size: 1.1rem; }
.profile-message-center-button span, .profile-message-center-button small { display: block; }
.profile-message-center-button small { margin-top: 2px; color: var(--text-muted); font-size: .68rem; font-weight: 500; }
.teacher-account-summary.has-unread-admin-message { padding: 7px 10px; border-radius: 10px; color: var(--forest-dark); background: var(--gold-light); box-shadow: 0 0 0 2px rgba(210,145,18,.22); }
#profile-message-count { margin-left: 4px; padding: 1px 5px; border-radius: 999px; color: white; background: var(--clay-primary); font-size: .62rem; }
.teacher-account-dropdown { color: var(--text-primary); }
.teacher-main { max-width: 1440px; }
.teacher-portal section > div > h1, .teacher-portal section > div > div > h1, .teacher-portal #class-title, .teacher-portal #student-title { color: var(--forest-dark); }
.teacher-portal .text-brand-700, .teacher-portal .text-health-700 { color: var(--forest-primary); }
.teacher-portal .bg-brand-600, .teacher-portal .bg-health-600 { background: var(--forest-primary); }
.teacher-portal .bg-brand-600:hover, .teacher-portal .bg-health-600:hover { background: var(--forest-dark); }
.teacher-portal section.bg-white, .teacher-portal details.bg-white, .teacher-portal #class-cards > *, .teacher-portal #metrics > *, .teacher-portal #overview-metrics > * { border-color: var(--border-light); border-radius: 12px; background: var(--background-card); box-shadow: none; }
.teacher-portal #class-cards .class-card { min-height: 210px; border-top: 4px solid var(--forest-primary); }
.teacher-portal #class-cards .class-card:hover { border-color: var(--clay-primary); box-shadow: 0 10px 24px rgba(30,60,34,.08); }
.teacher-portal #class-cards .class-card .open-class-card > span:first-child { border-radius: 50%; color: var(--forest-primary); background: var(--background-sage); }
.teacher-portal #class-cards .class-card { position: relative; display: flex; flex-direction: column; overflow: hidden; }
.teacher-portal #class-cards .open-class-card { flex: 1; width: 100%; text-align: left; transform: none; }
.teacher-portal #class-cards .open-class-card::after { content: ""; position: absolute; inset: 0; cursor: pointer; }
.teacher-portal #class-cards .class-card:has(.open-class-card:focus-visible) { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.teacher-portal #class-cards .open-class-card:hover { background: var(--background-soft); }
.teacher-portal .class-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; padding: 12px 14px; border-top: 1px solid var(--border-light); background: var(--background-soft); }
.teacher-portal .class-card-actions button { position: relative; z-index: 1; padding: 8px 10px; border-radius: 8px; font-size: .74rem; font-weight: 700; }
.teacher-portal .archive-class-card { color: var(--forest-dark); background: var(--background-sage); }
.teacher-portal .delete-class-card { color: #9f3434; background: #fff0ed; }
.teacher-portal input, .teacher-portal select, .teacher-portal textarea { border-color: var(--border-medium) !important; background: var(--background-card) !important; }
.teacher-portal input:focus, .teacher-portal select:focus, .teacher-portal textarea:focus { border-color: var(--focus-ring) !important; box-shadow: 0 0 0 3px rgba(199,122,76,.2) !important; }
.teacher-portal table thead { color: var(--forest-dark); background: var(--background-soft); }
.teacher-portal table tbody tr:hover { background: var(--background-soft); }
.teacher-portal #open-class-modal { border: 1px solid var(--sage-dark); border-radius: 8px; color: var(--forest-dark); background: var(--background-sage); box-shadow: inset 0 0 0 1px rgba(47,79,53,.04); }
.teacher-portal #open-class-modal:hover { border-color: var(--forest-primary); background: var(--sage-light); }
.teacher-portal .comment-filter {
    border: 1px solid var(--sage-dark);
    color: var(--forest-dark);
    background: var(--background-sage);
    box-shadow: inset 0 0 0 1px rgba(47,79,53,.04);
}
.teacher-portal .comment-filter:hover {
    border-color: var(--forest-primary);
    background: var(--sage-light);
}
.teacher-portal .comment-filter.bg-rose-600 {
    border-color: var(--forest-dark);
    color: var(--text-on-dark);
    background: var(--forest-primary);
    box-shadow: 0 2px 8px rgba(30,60,34,.18);
}
.teacher-portal .comment-filter.bg-rose-600:hover { background: var(--forest-dark); }
.teacher-portal #completed-work .new-completed-work { background: var(--background-sage); }
.teacher-portal #completed-work .new-completed-work > td:first-child { box-shadow: inset 4px 0 var(--forest-primary); }
.teacher-portal .work-review-header { position: sticky; top: -24px; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; background: var(--background-card); border-bottom: 1px solid var(--border-light); }
.teacher-portal .work-navigation { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--border-medium); border-radius: 10px; background: var(--background-sage); font-size: .78rem; color: var(--text-primary); }
.teacher-portal #close-work-modal { padding: 10px; }
.teacher-portal #previous-student-work, .teacher-portal #next-student-work { padding: 10px 16px; border-radius: 8px; background: var(--forest-primary); color: var(--text-on-dark); font-weight: 700; }
.teacher-portal #previous-student-work:disabled, .teacher-portal #next-student-work:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.teacher-portal .student-mastery-codes { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 8px; }
.teacher-portal .student-mastery-code { padding: 2px 6px; border: 1px solid var(--sage-dark); border-radius: 6px; color: var(--forest-dark); background: var(--background-sage); font-size: .65rem; font-weight: 800; }
.teacher-portal .new-work-badge { color: var(--forest-primary); background: var(--background-sage); }
.student-profile-button { padding: 7px 10px; border: 1px solid var(--border-medium); border-radius: 7px; color: var(--forest-primary); background: var(--background-card); font-size: .72rem; font-weight: 750; white-space: nowrap; }
.student-profile-button:hover { border-color: var(--sage-dark); background: var(--background-sage); }
.student-profile-action { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px; border: 1px solid var(--border-light); border-radius: 10px; background: var(--background-soft); }
.student-profile-action h3 { color: var(--text-primary); font-size: .88rem; font-weight: 750; }
.student-profile-action p { margin-top: 4px; color: var(--text-secondary); font-size: .72rem; line-height: 1.45; }
.student-profile-action button { flex: 0 0 auto; padding: 9px 11px; border: 1px solid var(--forest-primary); border-radius: 7px; color: var(--forest-dark); font-size: .72rem; font-weight: 750; }
.student-profile-action.danger { border-color: #e6bbb5; background: #fff7f5; }
.student-profile-action.danger button { color: #9f3e36; border-color: #c96c62; }
.teacher-portal .class-title-button { display: flex; align-items: center; gap: 10px; margin-top: 2px; padding: 3px 8px 3px 0; border-radius: 8px; text-align: left; }
.teacher-portal .class-title-button i { color: var(--clay-primary); font-size: .85rem; opacity: 0; transform: translateX(-4px); transition: opacity .16s ease, transform .16s ease; }
.teacher-portal .class-title-button:hover { background: var(--background-soft); }
.teacher-portal .class-title-button:hover i, .teacher-portal .class-title-button:focus-visible i { opacity: 1; transform: translateX(0); }
.teacher-portal .class-title-hint { margin-top: 2px; color: var(--text-muted); font-size: .7rem; }
.teacher-portal .class-page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.teacher-portal .class-secondary-action, .teacher-portal .class-delete-action { padding: 9px 13px; border: 1px solid var(--border-medium); border-radius: 9px; font-size: .78rem; font-weight: 700; }
.teacher-portal .class-secondary-action { color: var(--forest-dark); background: var(--background-sage); }
.teacher-portal .class-delete-action { color: #9f3434; background: #fff5f3; }
.teacher-portal .class-secondary-action:hover { border-color: var(--forest-primary); }
.teacher-portal .class-delete-action:hover { border-color: #c96c64; background: #fce8e5; }
.teacher-portal .archived-class-card { border-color: var(--border-light); border-top: 4px solid var(--sage-dark); }
.teacher-portal .archived-class-card.pending-deletion { border-top-color: var(--clay-primary); }
.teacher-portal .archived-card-icon { display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; margin-bottom: 16px; border-radius: 50%; background: var(--background-sage); }
.teacher-portal .archived-card-icon img { width: 25px; height: 25px; object-fit: contain; }
.teacher-portal .archived-class-summary { margin-top: 14px; color: var(--text-secondary); font-size: .75rem; font-weight: 700; }
.teacher-portal .archived-card-actions { display: flex; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border-light); }
.teacher-portal .archived-card-actions button { flex: 1; padding: 8px 10px; border-radius: 8px; font-size: .75rem; font-weight: 700; }
.teacher-portal .restore-class { color: var(--forest-dark); background: var(--background-sage); }
.teacher-portal .delete-archived-class { color: #9f3434; background: #fff0ed; }
.teacher-portal .delete-archived-class:disabled { cursor: not-allowed; color: var(--text-muted); background: var(--background-soft); opacity: .72; transform: none; }
.teacher-portal .deletion-schedule { margin-top: 10px; padding: 9px 10px; border-radius: 8px; color: #8a4c28; background: #f8e7dd; font-size: .72rem; font-weight: 700; }
.teacher-portal .standards-apply-panel { padding: 18px; border: 1px solid var(--border-light); border-radius: 12px; background: var(--background-card); }
.teacher-portal .standards-apply-panel h2 { color: var(--forest-dark); font-size: .9rem; font-weight: 800; }
.teacher-portal .standards-apply-panel > div:first-child p { margin-top: 3px; color: var(--text-secondary); font-size: .75rem; }
.teacher-portal .standards-target-classes { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 8px; margin-top: 14px; }
.teacher-portal .standards-target-classes label { display: flex; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--border-light); border-radius: 8px; background: var(--background-soft); cursor: pointer; }
.teacher-portal .standards-target-classes label:has(input:checked) { border-color: var(--sage-dark); background: var(--background-sage); }
.teacher-portal .standards-target-classes strong, .teacher-portal .standards-target-classes small { display: block; }
.teacher-portal .standards-target-classes strong { color: var(--text-primary); font-size: .75rem; }
.teacher-portal .standards-target-classes small { margin-top: 2px; color: var(--text-muted); font-size: .65rem; }
.teacher-portal .standards-save-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-light); }
.teacher-portal .standards-save-actions span { margin-right: auto; color: var(--text-muted); font-size: .72rem; font-weight: 700; }
.teacher-portal .standards-save-actions button { padding: 9px 13px; border-radius: 8px; color: white; background: var(--forest-primary); font-size: .75rem; font-weight: 700; }
.teacher-portal .standards-save-actions button:last-child { color: var(--forest-dark); background: var(--background-sage); }
.teacher-portal .standards-save-actions #reset-standards { border: 1px solid var(--border-medium); color: #8b4b2a; background: #fff5ef; }
.teacher-portal .standards-save-actions button:disabled { cursor: not-allowed; opacity: .45; transform: none; }

@media (min-width: 768px) {
    .teacher-portal { padding-left: 232px; }
    .teacher-portal .teacher-header { position: fixed; inset: 0 auto 0 0; z-index: 30; width: 232px; min-height: 100vh; border-right: 1px solid rgba(255,255,255,.12); }
    .teacher-portal .teacher-header > div { width: 100%; height: 100%; min-height: 100vh; padding: 28px 16px 22px; flex-direction: column; align-items: stretch; justify-content: flex-start; }
    .teacher-portal .app-brand { padding: 4px 8px 28px; align-items: flex-start; }
    .teacher-portal .app-brand > span:last-child { line-height: 1.35; }
    .teacher-navigation { position: fixed; inset: 116px auto auto 0; z-index: 31; width: 232px; padding: 0 16px; flex-direction: column; align-items: stretch; border: 0; background: transparent; }
    .teacher-navigation .teacher-nav { width: 100%; color: rgba(255,255,255,.82); text-align: left; }
    .teacher-navigation .teacher-nav i { width: 20px; text-align: center; }
    .teacher-navigation .teacher-nav .nav-icon { filter: brightness(0) invert(1); opacity: .82; }
    .teacher-navigation .teacher-nav.bg-brand-600 .nav-icon { filter: brightness(0) saturate(100%) invert(22%) sepia(15%) saturate(1194%) hue-rotate(76deg); opacity: 1; }
    .teacher-navigation .teacher-nav.bg-brand-600:hover { color: var(--forest-dark); background: var(--background-sage); }
}

@media (max-width: 767px) {
    .teacher-portal { padding-bottom: 78px; }
    .teacher-portal .teacher-header, .teacher-portal .teacher-header > div { height: 62px; min-height: 62px; }
    .teacher-navigation { position: fixed; inset: auto 10px 10px; z-index: 45; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 4px; padding: 6px; border: 1px solid var(--border-light); border-radius: 17px; box-shadow: 0 14px 40px rgba(30,60,34,.2); }
    .teacher-navigation .teacher-nav { min-height: 50px; padding: 5px 2px; flex-direction: column; justify-content: center; gap: 3px; font-size: .67rem; text-align: center; }
    .teacher-navigation .teacher-nav i, .teacher-navigation .nav-icon { width: 18px; height: 18px; margin: 0; }
    .teacher-profile-row { width: auto; margin: 14px 14px 0; padding: 16px; align-items: flex-start; flex-direction: column; }
    .teacher-profile-actions { width: 100%; justify-content: space-between; }
    .teacher-profile-actions select { min-width: 155px; max-width: 58vw; }
    .teacher-account-label { min-width: 0; }
    .teacher-account-label strong { max-width: 112px; }
    .teacher-main { padding-inline: 14px; }
    .teacher-portal .class-page-actions { width: 100%; justify-content: flex-start; }
    .teacher-portal .standards-save-actions { align-items: stretch; flex-direction: column; }
    .teacher-portal .standards-save-actions span { margin: 0 0 4px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Administrator portal: uses the same warm shell and component language as the
   student and teacher experiences while keeping its controls purpose-specific. */
.admin-portal { color: var(--text-primary); background: var(--background-page); }
html:has(.admin-portal) { background: var(--background-page); }
.admin-portal .admin-header { border-color: var(--forest-dark); background: linear-gradient(160deg, var(--forest-dark), var(--forest-primary)); }
.admin-portal .admin-header > div { display: flex; align-items: center; max-width: 1440px; margin: auto; padding: 0 24px; }
.admin-portal .app-brand > span:first-child { border: 1px solid rgba(255,255,255,.5); background: transparent; }
.admin-portal .app-brand b, .admin-portal .app-brand small { color: var(--text-on-dark); }
.admin-navigation { position: sticky; top: 72px; z-index: 20; display: flex; gap: 4px; padding: 8px max(16px, calc((100vw - 1440px) / 2)); border-bottom: 1px solid var(--border-light); border-radius: 0; background: var(--background-card); }
.admin-navigation .admin-nav { display: flex; min-height: 42px; align-items: center; gap: 9px; padding: 9px 13px; border-radius: 7px; color: var(--text-secondary); font-size: .82rem; font-weight: 700; }
.admin-navigation .admin-nav:hover, .admin-navigation .admin-nav:focus-visible { color: var(--forest-dark); background: var(--background-sage); }
.admin-navigation .admin-nav.is-active { color: var(--forest-dark); background: var(--background-sage); box-shadow: none; }
.admin-navigation .admin-nav > i { width: 20px; color: currentColor; text-align: center; }
.nav-message-count { min-width: 19px; margin-left: auto; padding: 1px 5px; border-radius: 999px; color: #fff; background: var(--clay-primary); font-size: .65rem; text-align: center; }
.admin-navigation .nav-icon { width: 20px; height: 20px; object-fit: contain; }
.admin-navigation .admin-nav.is-active .nav-icon { filter: brightness(0) saturate(100%) invert(22%) sepia(15%) saturate(1194%) hue-rotate(76deg); opacity: 1; }
.admin-sidebar-search { position: fixed; z-index: 48; width: 280px; padding: 12px; border: 1px solid var(--border-light); border-radius: 12px; background: white; box-shadow: 0 16px 36px rgba(24,37,27,.2); }
.admin-sidebar-search > label { display: block; margin-bottom: 7px; color: var(--forest-dark); font-size: .72rem; font-weight: 800; }
.admin-search-input-wrap { position: relative; display: flex; align-items: center; }
.admin-search-input-wrap > i { position: absolute; left: 11px; z-index: 1; color: var(--text-muted); font-size: .72rem; }
.admin-search-input-wrap input { width: 100%; padding: 9px 34px 9px 32px; border-radius: 8px; font-size: .76rem; }
.admin-search-input-wrap button { position: absolute; right: 5px; display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 6px; color: var(--text-muted); }
.admin-search-results { max-height: 310px; margin-top: 7px; overflow-y: auto; border-top: 1px solid var(--border-light); padding-top: 6px; }
.admin-search-results > button { display: grid; width: 100%; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; padding: 9px 7px; border-radius: 8px; text-align: left; }
.admin-search-results > button:hover, .admin-search-results > button:focus-visible { background: var(--background-sage); }
.admin-search-results strong, .admin-search-results small { display: block; }
.admin-search-results strong { color: var(--text-primary); font-size: .75rem; }
.admin-search-results small { margin-top: 2px; color: var(--text-muted); font-size: .64rem; }
.admin-search-results > button > i { color: var(--clay-primary); font-size: .7rem; }
.admin-search-results > p { padding: 12px 7px; color: var(--text-muted); font-size: .73rem; }
.admin-search-avatar { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 50%; color: white; background: var(--forest-primary); font-size: .68rem; font-weight: 800; }
.admin-portal .account-search-highlight { background: #f6e5d7 !important; box-shadow: inset 4px 0 var(--clay-primary); transition: background .3s ease; }
.admin-profile-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 20px; padding: 18px 22px; border: 1px solid var(--border-light); border-radius: 14px; background: var(--background-card); }
.admin-profile-row h1 { color: var(--text-primary); font-size: clamp(1.3rem,2.2vw,1.7rem); font-weight: 750; letter-spacing: -.025em; }
.admin-profile-row p { margin-top: 3px; color: var(--text-secondary); font-size: .86rem; }
.admin-profile-actions { display: flex; align-items: center; gap: 14px; }
.admin-account-summary { min-height: 48px; padding: 4px 8px; border-radius: 10px; color: var(--text-primary); }
.admin-account-summary:hover { background: var(--background-soft); }
.admin-avatar { display: inline-flex; width: 40px; height: 40px; flex: 0 0 40px; align-items: center; justify-content: center; border-radius: 50%; color: white; background: var(--forest-primary); font-size: .8rem; font-weight: 800; letter-spacing: .04em; }
.admin-account-label { display: flex; min-width: 105px; flex-direction: column; line-height: 1.25; }
.admin-account-label strong { max-width: 170px; overflow: hidden; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.admin-account-label small { margin-top: 2px; color: var(--text-secondary); font-size: .68rem; }
.admin-account-chevron { color: var(--text-secondary); font-size: .65rem; transition: transform .2s ease; }
.admin-account-menu[open] .admin-account-chevron { transform: rotate(180deg); }
.admin-account-dropdown { color: var(--text-primary); }
.admin-account-dropdown > details > summary { width: 100%; border: 1px solid var(--border-light); background: var(--background-soft); }
.admin-account-dropdown > details > div { position: static; width: 100%; max-width: none; margin-top: 8px; box-shadow: none; }
.admin-main { max-width: 1440px; }
.admin-account-form { width: 100%; max-width: 680px; }
.admin-page-heading h1 { color: var(--forest-dark); }
.admin-portal .text-brand-700 { color: var(--forest-primary); }
.admin-portal .text-brand-600 { color: var(--clay-primary); }
.admin-portal .bg-brand-600, .admin-portal .bg-health-600 { background: var(--forest-primary); }
.admin-portal .bg-brand-600:hover, .admin-portal .bg-health-600:hover { background: var(--forest-dark); }
.admin-card { border-color: var(--border-light) !important; border-radius: 12px !important; box-shadow: none; }
.admin-card-heading { display: flex; align-items: center; gap: 12px; padding-bottom: 4px; }
.admin-card-heading p { margin-top: 2px; color: var(--text-secondary); font-size: .75rem; }
.admin-card-icon { display: inline-flex; width: 40px; height: 40px; flex: 0 0 40px; align-items: center; justify-content: center; border-radius: 50%; color: var(--forest-primary); background: var(--background-sage); }
.admin-portal label { color: var(--text-secondary); font-size: .72rem; font-weight: 700; }
.admin-portal input, .admin-portal select, .admin-portal textarea { border: 1px solid var(--border-medium) !important; background: var(--background-card) !important; color: var(--text-primary); font-weight: 400; }
.admin-portal input:focus, .admin-portal select:focus, .admin-portal textarea:focus { border-color: var(--focus-ring) !important; outline: none; box-shadow: 0 0 0 3px rgba(199,122,76,.2) !important; }
.admin-form-note { display: flex; align-items: flex-start; gap: 7px; padding: 10px; border-radius: 8px; color: var(--text-secondary); background: var(--background-soft); font-size: .72rem; }
.admin-form-note i { margin-top: 2px; color: var(--clay-primary); }
.admin-portal table thead { color: var(--forest-dark) !important; background: var(--background-soft) !important; }
.admin-portal table tbody tr:hover { background: var(--background-soft); }
.admin-portal table td { vertical-align: middle; }
.admin-accounts-table { min-width: 760px; }
.admin-portal fieldset { border-color: var(--border-light); background: var(--background-soft); }
.admin-portal fieldset legend { color: var(--forest-dark); }
.admin-role-filters { position: relative; isolation: isolate; display: flex; flex-wrap: wrap; gap: 7px; padding: 6px; border: 1px solid var(--border-light); border-radius: 12px; background: var(--background-card); }
.admin-role-filters::before {
	content: "";
	position: absolute;
	z-index: -1;
	left: 0;
	top: 0;
	width: var(--glider-width, 0px);
	height: var(--glider-height, 0px);
	transform: translate(var(--glider-x, 0px), var(--glider-y, 0px));
	border-radius: 8px;
	background: var(--forest-primary);
	pointer-events: none;
}
.admin-role-filters.is-glider-ready::before { transition: transform 240ms ease, width 240ms ease, height 240ms ease; }
.admin-users-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.admin-users-toolbar > label { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.admin-users-toolbar select { min-width: 150px; padding: 8px 30px 8px 10px; border-radius: 8px; font-size: .75rem; }
.admin-role-filters button { padding: 9px 14px; border-radius: 8px; color: var(--text-secondary); background: transparent; font-size: .78rem; font-weight: 700; }
.admin-role-filters button:hover, .admin-role-filters button:active { transform: none; }
.admin-role-filters button:hover { color: var(--forest-dark); }
.admin-role-filters button.is-active { color: white; }
@media (prefers-reduced-motion: reduce) {
	.admin-role-filters.is-glider-ready::before, .admin-role-filters button { transition: none; }
}
.admin-status { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: .72rem; font-weight: 700; white-space: nowrap; }
.admin-status i { font-size: .45rem; }
.admin-status.is-active i { color: var(--success); }
.admin-status.is-disabled i { color: #a25555; }
.admin-password-due { display: block; margin-top: 3px; color: var(--clay-primary); font-size: .65rem; font-weight: 700; white-space: nowrap; }
.admin-role-badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; color: var(--forest-dark); background: var(--background-sage); font-size: .68rem; font-weight: 800; }
.admin-role-admin { color: #74411f; background: #f4e5dc; }
.admin-role-student { color: #43543f; background: #edf0e8; }
.admin-portal .edit-user { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border-medium); color: var(--forest-dark); background: white; white-space: nowrap; }
.admin-portal .edit-user:hover { border-color: var(--sage-dark); background: var(--background-sage); }
.admin-modal { background: rgba(24,37,27,.62); backdrop-filter: blur(3px); }
.admin-modal-card { border-color: var(--border-light); }
.admin-modal-close { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; color: var(--text-secondary); background: var(--background-soft); }
.admin-modal-close:hover { color: var(--forest-dark); background: var(--background-sage); }
.admin-account-tree { padding: 18px; background: var(--background-soft); }
.admin-account-tree > section + section { margin-top: 20px; }
.admin-account-tree h3 { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; color: var(--forest-dark); font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.admin-account-tree h3 span, .admin-tree-count { color: var(--text-muted); font-size: .67rem; font-weight: 700; text-transform: none; letter-spacing: normal; }
.admin-tree-person, .admin-tree-teacher { margin-bottom: 8px; border: 1px solid var(--border-light); border-radius: 10px; background: var(--background-card); }
.admin-tree-person, .admin-tree-teacher > summary, .admin-tree-student { display: grid; grid-template-columns: auto minmax(130px,1fr) auto auto; align-items: center; gap: 12px; padding: 12px 14px; }
.admin-tree-teacher > summary { grid-template-columns: auto minmax(130px,1fr) auto auto auto; cursor: pointer; list-style: none; }
.admin-tree-person strong, .admin-tree-teacher strong, .admin-tree-student strong, .admin-tree-branch strong { display: block; color: var(--text-primary); font-size: .79rem; }
.admin-tree-person small, .admin-tree-teacher small, .admin-tree-student small, .admin-tree-branch small { display: block; margin-top: 2px; color: var(--text-muted); font-size: .68rem; }
.admin-tree-avatar, .admin-tree-icon { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 50%; color: var(--forest-dark); background: var(--background-sage); font-size: .72rem; font-weight: 800; }
.admin-tree-avatar.teacher { color: white; background: var(--forest-primary); }
.admin-tree-avatar.admin { color: white; background: var(--clay-primary); }
.admin-tree-teacher .tree-chevron { color: var(--text-muted); font-size: .65rem; transition: transform .2s ease; }
.admin-tree-teacher[open] .tree-chevron { transform: rotate(180deg); }
.admin-tree-classes { padding: 0 14px 14px 60px; }
.admin-tree-class { position: relative; padding: 12px; border-left: 2px solid var(--sage-light); background: var(--background-soft); }
.admin-tree-class + .admin-tree-class { margin-top: 7px; }
.admin-tree-branch { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.admin-tree-icon { width: 30px; height: 30px; border-radius: 8px; }
.admin-tree-students { margin-top: 9px; padding-left: 18px; }
.admin-tree-student { position: relative; grid-template-columns: auto minmax(110px,1fr) auto auto; padding: 9px 4px; border-top: 1px solid var(--border-light); }
.admin-tree-student .admin-tree-avatar { width: 28px; height: 28px; }
.admin-tree-line { position: absolute; left: -13px; top: 0; width: 12px; height: 24px; border-bottom: 1px solid var(--sage-medium); border-left: 1px solid var(--sage-medium); }
.admin-tree-empty { padding: 12px 14px; color: var(--text-muted); font-size: .75rem; }
.admin-table-subline { display: block; margin-top: 3px; color: var(--text-muted); font-size: .66rem; }
.admin-tree-level { margin-bottom: 8px; border: 1px solid var(--border-light); border-radius: 10px; background: var(--background-card); }
.admin-tree-level > summary { display: grid; grid-template-columns: auto minmax(150px,1fr) auto auto; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
.admin-tree-level > summary > span:not(.admin-tree-avatar):not(.admin-tree-icon) { color: var(--text-muted); font-size: .7rem; font-weight: 700; }
.admin-tree-level[open] > summary .tree-chevron { transform: rotate(180deg); }
.admin-tree-root > summary { padding: 16px; color: var(--forest-dark); background: var(--background-sage); }
.admin-tree-root-content { padding: 14px; }
.admin-tree-state { margin-left: 14px; }
.admin-tree-state > summary { background: var(--background-soft); }
.admin-tree-state > div { padding: 0 12px 12px 34px; }
.admin-tree-district > div { padding: 0 12px 12px 34px; }
.admin-tree-district .admin-tree-teacher > summary { grid-template-columns: auto minmax(130px,1fr) auto auto; }

/* Teacher and administrator support messaging. */
.message-center-layout { display: grid; grid-template-columns: minmax(220px, 30%) minmax(0, 1fr); min-height: 570px; overflow: hidden; border: 1px solid var(--border-light); border-radius: 14px; background: var(--background-card); }
.message-center-layout > aside { padding: 16px; border-right: 1px solid var(--border-light); background: var(--background-soft); }
.message-primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 14px; border-radius: 8px; color: #fff; background: var(--forest-primary); font-size: .78rem; font-weight: 750; }
.message-center-layout > aside > .message-primary-button { width: 100%; margin-bottom: 12px; }
.message-thread-list { display: grid; gap: 7px; }
.message-thread-list > button { width: 100%; padding: 12px; border: 1px solid transparent; border-radius: 9px; color: var(--text-secondary); background: transparent; text-align: left; }
.message-thread-list > button:hover, .message-thread-list > button.is-active { border-color: var(--border-medium); color: var(--forest-dark); background: #fff; }
.message-thread-list strong, .message-thread-list small { display: block; }
.message-thread-list small { margin-top: 4px; color: var(--text-muted); font-size: .69rem; }
.message-thread-list .thread-unread { float: right; min-width: 20px; padding: 2px 5px; border-radius: 999px; color: #fff; background: var(--clay-primary); font-size: .63rem; text-align: center; }
.message-conversation { min-width: 0; }
.message-conversation > div:not(.message-empty) { height: 100%; }
.message-conversation header { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 22px; border-bottom: 1px solid var(--border-light); }
.message-conversation header h2 { color: var(--text-primary); font-size: 1.05rem; font-weight: 750; }
.message-conversation header p { margin-top: 3px; color: var(--text-muted); font-size: .72rem; }
.message-empty { padding: 70px 24px; color: var(--text-muted); text-align: center; }
.message-history { height: 350px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 22px; background: #faf9f5; }
.message-bubble { max-width: 78%; padding: 11px 13px; border: 1px solid var(--border-light); border-radius: 11px; background: #fff; }
.message-bubble.is-own { align-self: flex-end; color: #fff; border-color: var(--forest-primary); background: var(--forest-primary); }
.message-bubble small { display: block; margin-bottom: 5px; font-size: .66rem; opacity: .75; }
.message-bubble p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .82rem; }
.message-attachment-preview { display: block; margin-top: 9px; }
.message-attachment-preview img { display: block; max-width: 240px; max-height: 180px; border-radius: 7px; object-fit: contain; background: #fff; }
.message-compose { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border-light); }
.message-compose textarea { grid-column: 1 / -1; width: 100%; resize: vertical; padding: 11px; border: 1px solid var(--border-medium); border-radius: 8px; background: #fff; font-size: .82rem; }
.message-attachment-control { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; color: var(--text-secondary); font-size: .75rem; font-weight: 700; }
.message-attachment-control input { max-width: 190px; font-size: .7rem; }
.message-attachment-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.remove-message-attachment { padding: 6px 8px; border: 1px solid #e6bbb5; border-radius: 7px; color: #9f3e36; background: #fff7f5; font-size: .69rem; font-weight: 700; }
.message-filter-row { display: flex; gap: 5px; margin-bottom: 12px; }
.message-filter-row button { flex: 1; padding: 7px; border-radius: 7px; color: var(--text-secondary); font-size: .72rem; font-weight: 750; }
.message-filter-row button.is-active { color: var(--forest-dark); background: var(--background-sage); }
.message-thread-actions { display: flex; gap: 6px; }
.message-thread-actions button { padding: 7px 9px; border: 1px solid var(--border-medium); border-radius: 7px; color: var(--text-secondary); font-size: .68rem; font-weight: 700; }
.message-thread-actions button.danger { color: #9f3e36; border-color: #e6bbb5; }
.message-new-thread { max-width: 520px; display: grid; gap: 14px; margin: 0 auto; padding: 24px; color: var(--text-primary); text-align: left; }
.message-new-thread h2 { font-size: 1.1rem; font-weight: 750; }
.message-new-thread label { display: grid; gap: 5px; color: var(--text-secondary); font-size: .72rem; font-weight: 700; }
.message-new-thread input:not([type="file"]), .message-new-thread textarea { width: 100%; padding: 10px; border: 1px solid var(--border-medium); border-radius: 8px; background: #fff; color: var(--text-primary); font-size: .82rem; font-weight: 400; }

@media (min-width: 768px) {
    .admin-portal { padding-left: 232px; }
    .admin-portal .admin-header { position: fixed; inset: 0 auto 0 0; z-index: 30; width: 232px; min-height: 100vh; border-right: 1px solid rgba(255,255,255,.12); }
    .admin-portal .admin-header > div { width: 100%; height: 100%; min-height: 100vh; padding: 28px 16px 22px; align-items: stretch; }
    .admin-portal .app-brand { padding: 4px 8px 28px; align-items: flex-start; }
    .admin-portal .app-brand > span:last-child { line-height: 1.35; }
    .admin-navigation { position: fixed; inset: 116px auto auto 0; z-index: 31; width: 232px; padding: 0 16px; flex-direction: column; align-items: stretch; border: 0; background: transparent; }
    .admin-navigation .admin-nav { width: 100%; color: rgba(255,255,255,.82); text-align: left; }
    .admin-navigation .admin-nav.is-active { color: var(--forest-dark); }
    .admin-navigation .admin-nav:hover, .admin-navigation .admin-nav:focus-visible { color: var(--forest-dark); }
    .admin-navigation .nav-icon { filter: brightness(0) invert(1); opacity: .82; }
    .admin-navigation .admin-nav:hover .nav-icon,
    .admin-navigation .admin-nav:focus-visible .nav-icon {
        filter: brightness(0) saturate(100%) invert(22%) sepia(15%) saturate(1194%) hue-rotate(76deg);
        opacity: 1;
    }
    .admin-sidebar-search { top: 416px; left: 16px; width: 200px; }
}

@media (max-width: 767px) {
    .admin-portal { padding-bottom: 78px; }
    .admin-portal .admin-header, .admin-portal .admin-header > div { height: 62px; min-height: 62px; }
    .admin-navigation { position: fixed; inset: auto 10px 10px; z-index: 45; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 4px; padding: 6px; border: 1px solid var(--border-light); border-radius: 17px; box-shadow: 0 14px 40px rgba(30,60,34,.2); }
    .admin-navigation .admin-nav { min-height: 50px; padding: 5px 8px; flex-direction: column; justify-content: center; gap: 3px; font-size: .67rem; text-align: center; }
    .admin-navigation .admin-nav i, .admin-navigation .nav-icon { width: 18px; height: 18px; margin: 0; }
    .admin-navigation .nav-icon { filter: brightness(0) saturate(100%) invert(22%) sepia(15%) saturate(1194%) hue-rotate(76deg); opacity: 1; }
    .admin-profile-row { width: auto; margin: 14px 14px 0; padding: 16px; align-items: flex-start; flex-direction: column; }
    .admin-profile-actions { width: 100%; justify-content: flex-end; }
    .message-center-layout { grid-template-columns: 1fr; }
    .message-center-layout > aside { border-right: 0; border-bottom: 1px solid var(--border-light); }
    .message-history { height: 300px; }
    .message-conversation header { align-items: flex-start; flex-direction: column; }
    .message-compose { grid-template-columns: 1fr; }
    .admin-account-label { min-width: 0; }
    .admin-account-label strong { max-width: 140px; }
    .admin-main { padding-inline: 14px; }
    .admin-page-heading h1 { font-size: 1.75rem; }
    .admin-sidebar-search { inset: auto 10px 84px; width: auto; }
    .admin-users-toolbar { align-items: stretch; flex-direction: column; }
    .admin-users-toolbar > label { justify-content: space-between; }
    .admin-tree-person, .admin-tree-teacher > summary, .admin-tree-student { grid-template-columns: auto 1fr auto; gap: 9px; }
    .admin-tree-person > .admin-status, .admin-tree-student > .admin-status, .admin-tree-teacher > summary > .admin-status { display: none; }
    .admin-tree-actions { grid-column: 2 / -1; }
    .admin-tree-teacher .tree-chevron { grid-column: 3; grid-row: 1; }
    .admin-tree-classes { padding-left: 28px; }
    .admin-tree-student > .flex { grid-column: 2 / -1; }
    .admin-tree-level > summary { grid-template-columns: auto 1fr auto; }
    .admin-tree-level > summary > span:not(.admin-tree-avatar):not(.admin-tree-icon) { grid-column: 2; }
    .admin-tree-level > summary > .tree-chevron { grid-column: 3; grid-row: 1; }
    .admin-tree-state { margin-left: 0; }
    .admin-tree-state > div, .admin-tree-district > div { padding-left: 12px; }
}

@media (max-width: 420px) {
    .admin-portal #teacher-form > .grid { grid-template-columns: 1fr; }
    .admin-account-dropdown { right: -8px; }
}

@media print {
    body * { visibility: hidden; }
    #print-certificate-area, #print-certificate-area * { visibility: visible; }
    #print-certificate-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
    }
}

/* Student portal refresh: warm learning dashboard inspired by the supplied guide. */
.student-portal {
    --ink-950: var(--text-primary);
    --ink-900: var(--text-primary);
    --ink-800: #344438;
    --ink-700: var(--text-secondary);
    --ink-600: var(--text-muted);
    --surface: var(--background-card);
    --surface-soft: var(--background-soft);
    --surface-muted: var(--background-sage);
    --line: var(--border-light);
    --line-strong: var(--border-medium);
    --teal-700: var(--forest-dark);
    --teal-600: var(--forest-primary);
    --teal-500: var(--forest-medium);
    --teal-100: var(--background-sage);
    --coral-700: #A95F39;
    --coral-600: var(--clay-primary);
    --coral-500: var(--clay-light);
    --teacher-700: var(--forest-medium);
    --teacher-600: var(--sage-dark);
    --standards-700: var(--ochre-primary);
    color: var(--text-primary);
    background: var(--background-page);
}

html:has(.student-portal) { background: var(--background-page); }
.student-portal ::selection { color: var(--text-on-dark); background: var(--forest-primary); }
.student-portal button:focus-visible,
.student-portal [role="button"]:focus-visible,
.student-portal input:focus-visible,
.student-portal select:focus-visible,
.student-portal textarea:focus-visible,
.student-portal summary:focus-visible {
    outline-color: var(--focus-ring);
}

.student-portal .app-header {
    border-color: var(--forest-dark);
    background: linear-gradient(160deg, var(--forest-dark), var(--forest-primary));
    box-shadow: 4px 0 24px rgba(30, 60, 34, .14);
}
.student-portal .app-brand > div:first-child { background: transparent; border: 1px solid rgba(255,255,255,.5); }
.student-portal .app-brand .text-slate-900,
.student-portal .app-brand .text-slate-500 { color: var(--text-on-dark); }
.student-portal .app-nav { background: transparent; }
.student-portal .app-nav button { color: rgba(255,255,255,.82); text-align: left; }
.student-portal .app-nav button i { color: var(--sage-light); }
.student-portal .app-nav button.bg-white {
    color: var(--forest-dark);
    background: var(--background-page);
    box-shadow: none;
}
.student-portal .app-nav button.bg-white i { color: var(--forest-primary); }
.student-portal .app-nav .nav-icon {
    display: inline-block;
    width: 21px;
    height: 21px;
    margin-right: 10px;
    flex: 0 0 21px;
    object-fit: contain;
    vertical-align: middle;
    /* All inactive sidebar icons use the same soft white treatment. */
    filter: brightness(0) invert(1);
    opacity: .82;
}
.student-portal .app-nav button.bg-white .nav-icon {
    /* Match the deep-green color supplied by Dashboard.png when selected. */
    filter: brightness(0) saturate(100%) invert(22%) sepia(15%) saturate(1194%) hue-rotate(76deg) brightness(91%) contrast(91%);
    opacity: 1;
}
.student-portal .app-header-actions > div,
.student-portal .app-header-actions > button { color: var(--text-on-dark); border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.08); }
.student-portal .app-header-actions input { display: none; }
.student-portal .app-header-actions button { color: rgba(255,255,255,.88); }

.student-portal .app-shell { max-width: 1440px; }
.student-portal .student-profile-row {
    align-items: center;
    margin-top: 20px;
    padding-top: 18px;
    padding-bottom: 18px;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    background: var(--background-card);
}
.student-portal .student-welcome h1 {
    color: var(--text-primary);
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -.025em;
}
.student-portal .student-welcome p {
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: .9rem;
}
.student-portal .student-welcome-actions { margin-left: auto; }
.student-portal .student-streak {
    min-height: 42px;
    padding: 0 14px;
    border-right: 1px solid var(--border-light);
    color: var(--forest-dark);
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}
.student-portal .student-streak i { color: var(--clay-primary); font-size: 1rem; }
.student-portal .student-account-summary {
    min-height: 48px;
    padding: 4px 8px;
    border-radius: 10px;
    color: var(--text-primary);
}
.student-portal .student-account-summary:hover { background: var(--background-soft); }
.student-portal .student-avatar {
    display: inline-flex;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-on-dark);
    background: var(--forest-primary);
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .04em;
}
.student-portal .student-account-label { display: flex; min-width: 105px; flex-direction: column; line-height: 1.25; }
.student-portal .student-account-label strong { max-width: 170px; overflow: hidden; color: var(--text-primary); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.student-portal .student-account-label small { margin-top: 2px; color: var(--text-secondary); font-size: .68rem; }
.student-portal .student-account-chevron { color: var(--text-secondary); font-size: .65rem; transition: transform .2s ease; }
.student-portal .student-account-menu[open] .student-account-chevron { transform: rotate(180deg); }
.student-portal .student-account-dropdown { color: var(--text-primary); }
.student-portal .student-hero {
    min-height: 300px;
    border: 1px solid var(--border-light);
    border-left: 1px solid var(--border-light);
    border-radius: 14px;
    color: var(--text-primary);
    background-image:
        linear-gradient(90deg, rgba(248,246,241,.98) 0%, rgba(248,246,241,.94) 43%, rgba(248,246,241,.76) 61%, rgba(248,246,241,.12) 100%),
        url("../icons/Main%20Banner%20Background.jpg");
    background-position: center, center;
    background-size: cover, cover;
    background-repeat: no-repeat;
    box-shadow: none;
}
.student-portal .student-hero .relative { max-width: 58%; }
.student-portal .student-hero h1 { color: var(--forest-dark); font-family: Georgia, "Times New Roman", serif; font-weight: 700; }
.student-portal .student-hero p { color: var(--text-secondary); }
.student-portal .student-hero .bg-health-500\/20 {
    color: var(--forest-dark);
    border: 1px solid var(--border-light);
    border-left: 1px solid var(--border-light);
    border-radius: 999px;
    background: rgba(229,233,225,.9);
}
.student-portal .student-hero button.bg-health-500,
.student-portal button.bg-health-600,
.student-portal button.bg-brand-600 { color: var(--text-on-dark); background: var(--forest-primary); }
.student-portal .student-hero button.bg-health-500:hover,
.student-portal button.bg-health-600:hover,
.student-portal button.bg-brand-600:hover { background: var(--forest-dark); }
.student-portal .student-hero button.bg-white\/10 {
    color: var(--forest-dark);
    border-color: var(--forest-primary);
    background: rgba(248,246,241,.9);
}
.student-portal .student-hero button.bg-white\/10:hover { background: var(--background-card); }

.student-portal .mastery-panel,
.student-portal .practice-configurator,
.student-portal #skill-cards-container > div,
.student-portal #student-workspace > div:first-child,
.student-portal #scenario-response-container,
.student-portal #stage-1-intro,
.student-portal #stage-2-refresher,
.student-portal #stage-3-scaffold,
.student-portal #stage-5-feedback > div,
.student-portal #print-certificate-area {
    border-color: var(--border-light);
    border-radius: 12px;
    background: var(--background-card);
}
.student-portal .mastery-panel {
    border-top: 1px solid var(--border-light);
    background-image:
        linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.92) 52%, rgba(255,255,255,.68) 100%),
        url("../icons/Your%20Michigan%20Standards%20mastery%20progress.jpg");
    background-position: center, center 60%;
    background-size: cover, cover;
    background-repeat: no-repeat;
}
.student-portal .michigan-state-icon {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    object-fit: contain;
}
.student-portal .practice-configurator { border-left: 1px solid var(--border-light); }
.student-portal #mastery-badges-grid > div { border-color: var(--border-light); background: var(--background-soft); }
.student-portal #skill-cards-container > div { min-height: 224px; }
.student-portal #skill-cards-container > div:hover { border-color: var(--sage-dark); box-shadow: 0 10px 24px rgba(30,60,34,.08); }
.student-portal #skill-cards-container > div::after { background: var(--clay-primary); }
.student-portal #skill-cards-container > div[aria-disabled="true"] {
	opacity: .55;
	cursor: not-allowed;
	pointer-events: none;
}
.student-portal .skill-card-icon {
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    font-size: 1.45rem;
    overflow: hidden;
}
.student-portal .skill-card-icon img,
.student-portal #intro-skill-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.student-portal .skill-card-icon:has(img) { background: transparent; }
.student-portal #intro-skill-icon:has(img) {
    overflow: hidden;
    padding: 0;
    border-radius: 50%;
    background: transparent;
}
.student-portal .skill-card-icon--craap { color: var(--forest-primary); background: var(--background-sage); }
.student-portal .skill-card-icon--decide { color: #9E4E25; background: #F4DDCF; }
.student-portal .skill-card-icon--smart_goals { color: var(--success); background: #DCE8D6; }
.student-portal .skill-card-icon--influences { color: var(--forest-medium); background: #DDE5E2; }
.student-portal .skill-card-icon--communication { color: #9B6908; background: #F7E5B8; }
.student-portal .skill-card-icon--self_management { color: var(--forest-primary); background: var(--background-sage); }
.student-portal .practiced-badge {
    color: var(--text-on-dark);
    background: var(--success);
}
.student-portal #skill-cards-container h3,
.student-portal #student-hub > div:nth-child(3) h2,
.student-portal .practice-configurator > h3 { color: var(--forest-dark); }
.student-portal #skill-cards-container h3 + p { color: var(--forest-primary); }
.student-portal #skill-cards-container > div > div:last-child { color: var(--forest-primary); }
.student-portal input,
.student-portal select,
.student-portal textarea { border-color: var(--border-medium) !important; background: var(--background-card) !important; }
.student-portal input:focus,
.student-portal select:focus,
.student-portal textarea:focus { border-color: var(--focus-ring) !important; box-shadow: 0 0 0 3px rgba(199,122,76,.2) !important; }
.student-portal [class*="text-health-"] { color: var(--forest-primary); }
.student-portal [class*="text-brand-"] { color: var(--clay-primary); }
.student-portal .bg-health-600,
.student-portal .bg-brand-600 { background-color: var(--forest-primary); }
.student-portal .bg-health-100 { background-color: var(--background-sage); }
.student-portal .bg-brand-100 { background-color: #F4E5DC; }
.student-portal .bg-amber-100 { background-color: #F7EBCF; }
.student-portal .step-item.text-health-600 span:first-child { border-color: var(--sage-dark); background: var(--background-sage); color: var(--forest-dark); }
.student-portal #intro-skill-icon,
.student-portal #stage-4-scenario > .bg-gradient-to-br,
.student-portal #stage-5-feedback .bg-gradient-to-r { background: var(--forest-primary); }
.student-portal .app-nav button.has-unread-teacher-message {
    color: var(--forest-dark);
    background: var(--gold-light);
}
.student-portal .app-nav button.has-unread-teacher-message .nav-icon {
    filter: brightness(0) saturate(100%) invert(22%) sepia(15%) saturate(1194%) hue-rotate(76deg) brightness(91%) contrast(91%);
    opacity: 1;
}

@media (min-width: 768px) {
    .student-portal { padding-left: 232px; }
    .student-portal .app-header {
        position: fixed;
        inset: 0 auto 0 0;
        width: 232px;
        min-height: 100vh;
        border-right: 1px solid rgba(255,255,255,.12);
        border-bottom: 0;
    }
    .student-portal .app-header > div {
        width: 100%;
        height: 100%;
        min-height: 100vh;
        padding: 28px 16px 22px;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
    }
    .student-portal .app-brand { padding: 4px 8px 28px; align-items: flex-start; }
    .student-portal .app-brand > div:last-child span { white-space: normal; line-height: 1.4; }
    .student-portal .app-nav { width: 100%; flex-direction: column; align-items: stretch; gap: 7px; padding: 0; }
    .student-portal .app-nav button { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 7px; }
    .student-portal .app-header-actions { width: 100%; margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.22); flex-direction: column; align-items: stretch; gap: 8px; }
    .student-portal .app-header-actions > div,
    .student-portal .app-header-actions > button,
    .student-portal .app-header-actions form,
    .student-portal .app-header-actions form button { width: 100%; }
    .student-portal .app-header-actions > div { display: flex; }
    .student-portal .student-profile-row { max-width: 1440px; }
}

@media (max-width: 767px) {
    .student-portal .app-header { background: var(--forest-dark); }
    .student-portal .app-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); border-color: var(--border-light); background: rgba(255,255,255,.97); }
    .student-portal .app-nav button { color: var(--text-secondary); text-align: center; }
    .student-portal .app-nav button.bg-white { background: var(--background-sage); }
    .student-portal .student-profile-row { margin: 14px 16px 0; width: auto; padding: 16px; align-items: flex-start; flex-direction: column; }
    .student-portal .student-welcome { max-width: 100%; }
    .student-portal .student-welcome h1 { font-size: 1.3rem; }
    .student-portal .student-welcome p { font-size: .8rem; }
    .student-portal .student-welcome-actions { width: 100%; margin-left: 0; justify-content: space-between; }
    .student-portal .student-streak { padding-left: 0; }
    .student-portal .student-account-label { min-width: 0; }
    .student-portal .student-account-label strong { max-width: 120px; }
    .student-portal .app-nav .nav-icon {
        display: block;
        width: 19px;
        height: 19px;
        margin: 0 auto 4px;
        filter: brightness(0) saturate(100%) invert(39%) sepia(9%) saturate(721%) hue-rotate(72deg) brightness(92%) contrast(87%);
        opacity: 1;
    }
    .student-portal .app-nav button.bg-white .nav-icon {
        filter: brightness(0) saturate(100%) invert(22%) sepia(15%) saturate(1194%) hue-rotate(76deg) brightness(91%) contrast(91%);
    }
    .student-portal .student-hero {
        padding: 26px 22px;
        background-image:
            linear-gradient(rgba(248,246,241,.9), rgba(248,246,241,.9)),
            url("../icons/Main%20Banner%20Background.jpg");
        background-position: center;
        background-size: cover;
    }
    .student-portal .student-hero .relative { max-width: 100%; }
    .student-portal .student-hero h1 { font-size: 2rem; }
    .student-portal .mastery-panel,
    .student-portal .practice-configurator { padding: 20px; border-radius: 12px; }
}
.assignment-link code { display: none; }

/* Keep the adaptive-practice focus visible even when utility classes are purged. */
.deep-dive-framework-step {
    color: #475569;
    background-color: #fff;
    border-color: #e2e8f0;
}
.deep-dive-framework-step.is-focused {
    color: #fff;
    background-color: #047857;
    border-color: #065f46;
    box-shadow: 0 0 0 3px #a7f3d0;
}

/* Administrator scenario library. */
.scenario-toolbar, .scenario-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}
.scenario-toolbar label, .scenario-form label {
	display: grid;
	gap: 6px;
	font-size: .85rem;
	font-weight: 700;
}
.scenario-toolbar input, .scenario-toolbar select, .scenario-form input, .scenario-form select, .scenario-form textarea {
	width: 100%;
	min-width: 0;
	padding: 10px 12px;
	border: 1px solid var(--border-light);
	border-radius: 8px;
	background: #fff;
	color: var(--text-primary);
	font: inherit;
	font-weight: 400;
}
.scenario-form textarea { resize: vertical; }
.scenario-actions, .scenario-pagination, .scenario-card-heading, .scenario-editor-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}
.scenario-actions { justify-content: flex-end; }
.scenario-toolbar .scenario-actions { align-self: end; }
.scenario-list { display: grid; gap: 18px; }
.scenario-card, .scenario-empty {
	padding: 22px;
	border: 1px solid var(--border-light);
	border-radius: 14px;
	background: var(--background-card);
	overflow-wrap: anywhere;
}
.scenario-card h2, .scenario-editor-heading h2 { font-size: 1.15rem; font-weight: 700; }
.scenario-card-heading p, .scenario-sources > p { margin: 4px 0; color: var(--text-secondary); font-size: .8rem; }
.scenario-card-heading { align-items: flex-start; }
.scenario-card-heading > div { flex: 1; min-width: 180px; }
.scenario-body { margin: 14px 0; white-space: pre-wrap; line-height: 1.6; font-size: .9rem; }
.scenario-card details { margin-bottom: 18px; }
.scenario-card summary { cursor: pointer; font-size: .85rem; font-weight: 700; }
.scenario-card blockquote { margin-top: 12px; padding: 12px 16px; border-left: 3px solid var(--forest-dark); background: var(--background-soft); }
.scenario-card small { display: block; }
.scenario-card .scenario-actions { padding-top: 12px; border-top: 1px solid var(--border-light); }
.scenario-actions button, .scenario-pagination button, .scenario-form button {
	padding: 9px 14px;
	border: 1px solid var(--border-light);
	border-radius: 8px;
	color: var(--forest-dark);
	background: var(--background-soft);
	font-size: .85rem;
	font-weight: 700;
	cursor: pointer;
}
.scenario-actions .scenario-primary { background: var(--forest-dark); color: #fff; }
.scenario-actions .scenario-danger { color: #9f1239; background: #fff1f2; }
#scenarios-view button:disabled, .scenario-form button:disabled { opacity: .5; cursor: default; }
.scenario-error { padding: 12px 16px; border: 1px solid #fda4af; border-radius: 8px; color: #9f1239; background: #fff1f2; overflow-wrap: anywhere; }
.scenario-dialog {
	width: min(800px, calc(100vw - 32px));
	max-height: calc(100dvh - 40px);
	margin: auto;
	padding: 24px;
	border: 1px solid var(--border-light);
	border-radius: 16px;
	color: var(--text-primary);
	background: var(--background-card);
	overflow-y: auto;
}
.scenario-dialog::backdrop { background: rgba(24, 37, 27, .65); }
.scenario-form { display: grid; gap: 18px; }
.scenario-form [hidden] { display: none !important; }
#scenario-review-fields { display: grid; gap: 14px; }
.scenario-card dd, .scenario-card pre { overflow-wrap: anywhere; }
.scenario-sources { min-width: 0; }
.scenario-sources > legend { font-weight: 700; }
.scenario-source-card { display: grid; gap: 12px; margin: 12px 0; padding: 14px; border: 1px solid var(--border-light); border-radius: 8px; }
.scenario-source-card button { justify-self: start; }
.scenario-form .scenario-check { display: flex; align-items: center; }
.scenario-check input { width: auto; }
@media (max-width: 767px) {
	.admin-navigation { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
	.scenario-toolbar, .scenario-form-grid { grid-template-columns: minmax(0, 1fr); }
	.scenario-dialog { padding: 18px; }
	.admin-navigation .admin-nav { padding-inline: 2px; font-size: .6rem; }
}

.teacher-loading-overlay {
	position: fixed;
	inset: 0;
	z-index: 60;
	display: grid;
	place-items: center;
	background: rgba(245, 247, 245, .72);
	cursor: progress;
	animation: teacher-loading-fade-in .18s ease-out both;
}
.teacher-loading-overlay[hidden] { display: none; }
.teacher-loading-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 20px 28px;
	border: 1px solid var(--border-light);
	border-radius: 14px;
	background: var(--background-card);
	color: var(--forest-dark);
	box-shadow: 0 12px 36px rgba(30, 60, 34, .15);
	font-weight: 700;
}
.teacher-loading-spinner {
	width: 24px;
	height: 24px;
	border: 3px solid var(--border-light);
	border-top-color: var(--forest-dark);
	border-radius: 50%;
	animation: teacher-loading-spin .8s linear infinite;
}
@keyframes teacher-loading-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes teacher-loading-spin { to { transform: rotate(360deg); } }
#rubrics-view:not(.admin-view) .rubric-document > p:has(~ .rubric-table-scroll) { display: none; }
.rubric-table-scroll { overflow-x: auto; margin-top: 1rem; }
.rubric-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.rubric-table th, .rubric-table td { border: 1px solid var(--border-light, #cbd5e1); padding: .8rem; text-align: left; vertical-align: top; min-width: 155px; white-space: pre-wrap; }
.rubric-table thead, .rubric-table tbody th { background: var(--cream, #f8fafc); }
.rubric-field { display: block; font-weight: 600; margin: .8rem 0; }
.rubric-field textarea { display: block; width: 100%; margin-top: .4rem; border: 1px solid var(--border-light, #cbd5e1); border-radius: .6rem; padding: .7rem; font: inherit; font-weight: 400; }
.rubric-edit-component { border: 1px solid var(--border-light, #cbd5e1); border-radius: .8rem; padding: 1rem; margin-top: 1rem; }
.rubric-edit-component legend { font-weight: 700; padding-inline: .4rem; }
#rubrics-view .rubric-level-controls { display: flex; flex-wrap: wrap; gap: .75rem; }
#rubrics-view .rubric-level-controls.hidden { display: none; }
#rubrics-view .rubric-level-controls button { border: 1px solid var(--border-light, #cbd5e1); border-radius: .6rem; padding: .75rem 1rem; background: white; font: inherit; font-weight: 700; cursor: pointer; }
#rubrics-view .rubric-level-controls button[aria-pressed="true"] { background: var(--brand-600, #2563eb); color: white; }
#rubrics-view .rubric-level-controls button:focus-visible { outline: 3px solid var(--brand-600, #2563eb); outline-offset: 3px; }
.admin-view .rubric-shared-fields { margin-top: 1rem; }
.admin-view .rubric-shared-fields summary { cursor: pointer; font-weight: 600; }
.admin-view .rubric-field.hidden { display: none; }
@media (max-width: 767px) {
	.admin-navigation { grid-template-columns: repeat(7, minmax(0, 1fr)); }
	.teacher-navigation { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
	.teacher-loading-overlay, .teacher-loading-spinner { animation: none; }
}
.skill-intro-actions { gap: 1rem; flex-wrap: wrap; }
.skill-intro-actions > button:last-child { margin-left: auto; }
.breakdown-deck { border: 1px solid #dce4dc; border-radius: 1.25rem; background: white; overflow: hidden; }
.breakdown-toolbar, .breakdown-controls { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.25rem; background: #f5f7f5; flex-wrap: wrap; }
.breakdown-toolbar { font-size: .85rem; }
.breakdown-toolbar span { font-weight: 700; color: #243e2a; }
.breakdown-toolbar button { text-decoration: underline; }
.breakdown-slide { padding: clamp(1.25rem, 4vw, 3rem); min-height: 24rem; }
#breakdown-position { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: #526653; }
.breakdown-slide progress { width: 100%; height: .4rem; accent-color: #466d44; margin: .75rem 0 1.5rem; }
.breakdown-slide h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.2; font-weight: 800; color: #243e2a; margin-bottom: 1.5rem; }
#breakdown-content { font-size: 1.05rem; line-height: 1.75; color: #344636; }
#breakdown-content p + p { margin-top: 1rem; }
.breakdown-example-part + .breakdown-example-part { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #dce4dc; }
.breakdown-example-part h3 { font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.25; font-weight: 800; color: #243e2a; margin-bottom: 1rem; }
.breakdown-table-scroll { overflow-x: auto; margin: 1rem 0; }
.breakdown-source-image { display: block; width: 100%; max-width: 1024px; height: auto; margin-inline: auto; }
.breakdown-source-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; align-items: start; }
.breakdown-source-card { min-width: 0; }
.breakdown-source-card h3 { font-size: 1rem; font-weight: 800; line-height: 1.4; margin-bottom: .75rem; color: #243e2a; }
.breakdown-source-card a { display: block; border: 1px solid #dce4dc; border-radius: .5rem; overflow: hidden; }
.breakdown-source-card a:focus-visible { outline: 3px solid #91ad80; outline-offset: 3px; }
@media (max-width: 900px) {
	.breakdown-source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
	.breakdown-source-grid { grid-template-columns: minmax(0, 1fr); }
}
.breakdown-source-transcript { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: normal; border: 0; }
.breakdown-slide table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.breakdown-slide th, .breakdown-slide td { padding: .85rem; border: 1px solid #dce4dc; text-align: left; vertical-align: top; min-width: 9rem; }
.breakdown-slide th { background: #eff4ea; font-weight: 700; }
.breakdown-controls button { border-radius: .75rem; padding: .8rem 1.2rem; background: #466d44; color: white; font-weight: 700; }
.breakdown-controls button:disabled { opacity: .45; cursor: default; }
#breakdown-finish { display: flex; flex-wrap: wrap; gap: .75rem; }
#breakdown-finish[hidden], .breakdown-controls button[hidden] { display: none; }
.breakdown-deck button:focus-visible { outline: 3px solid #91ad80; outline-offset: 3px; }
@media (max-width: 600px) {
	.breakdown-toolbar span { order: -1; flex-basis: 100%; }
	.breakdown-controls { align-items: stretch; }
	.breakdown-controls button { flex: 1; }
	#breakdown-finish { flex: 1; }
}

.mobile-navigation-handle { display: none; }
@media (max-width: 767px) {
	.mobile-navigation-collapsed { visibility: hidden; pointer-events: none; }
	.mobile-navigation-handle:not([hidden]) {
		position: fixed;
		z-index: 45;
		bottom: max(6px, env(safe-area-inset-bottom));
		left: 50%;
		transform: translateX(-50%);
		display: flex;
		align-items: center;
		justify-content: center;
		width: 76px;
		height: 44px;
		padding: 0;
		border: 1px solid var(--border-light, #cbd5e1);
		border-radius: 22px;
		background: var(--background-card, #fff);
		box-shadow: 0 3px 12px rgba(30, 60, 34, .2);
		cursor: pointer;
	}
	.mobile-navigation-handle span { width: 32px; height: 4px; border-radius: 2px; background: var(--forest-dark, #243e2a); }
	.mobile-navigation-handle:focus-visible { outline: 3px solid var(--brand-600, #2563eb); outline-offset: 3px; }
}
