/* Teacher portal styles, moved out of educator.html so the browser caches them. */
 html, body { height: 100%; }
 body { margin: 0; display: flex; overflow: hidden; background: var(--ag-bg); color: var(--ag-text); font: 15px/1.5 var(--ag-font); -webkit-font-smoothing: antialiased; }
 .material-symbols-outlined { font-size: 22px; }

 /* Sidebar */
 .edu-side { display: none; width: 260px; flex-shrink: 0; flex-direction: column; justify-content: space-between; padding: 20px 14px; border-right: 1px solid var(--ag-hairline); background: var(--ag-glass); -webkit-backdrop-filter: var(--ag-blur); backdrop-filter: var(--ag-blur); }
 @media (min-width: 900px) { .edu-side { display: flex; } }
 .edu-brand { padding: 4px 12px 18px; }
 .edu-brand strong { display: block; font-family: var(--ag-font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
 .edu-brand span { font-size: 13px; color: var(--ag-text-3); }
 .edu-nav { display: flex; flex-direction: column; gap: 2px; }
 .edu-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--ag-text-2); font-size: 15px; font-weight: 500; text-decoration: none; transition: background-color 0.2s, color 0.2s; }
 .edu-link:hover { background: var(--ag-fill); color: var(--ag-text); }
 .edu-link.is-active { background: var(--ag-fill-strong); color: var(--ag-text); font-weight: 600; }
 .edu-me { display: flex; align-items: center; gap: 10px; padding: 12px; border-top: 1px solid var(--ag-hairline); }
 .edu-avatar { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; background: var(--ag-accent); color: var(--ag-text-inverse); font-weight: 700; }
 .edu-me-text { flex: 1; min-width: 0; line-height: 1.25; }
 .edu-me-text div { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
 .edu-me-text small { font-size: 12px; color: var(--ag-text-3); }

 /* Main */
 .edu-shell { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
 .edu-top { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; padding: 10px 20px; border-bottom: 1px solid var(--ag-hairline); background: rgba(238, 242, 247, 0.8); -webkit-backdrop-filter: var(--ag-blur); backdrop-filter: var(--ag-blur); }
 @media (min-width: 768px) { .edu-top { padding: 12px 40px; } }
 .edu-top h1 { margin: 0; font-family: var(--ag-font-display); font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
 .edu-top p { margin: 0; font-size: 13px; color: var(--ag-text-3); }
 .edu-icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--ag-text); cursor: pointer; }
 .edu-icon-btn:hover { background: var(--ag-fill); }
 @media (min-width: 900px) { .edu-menu-btn { display: none; } }
 .edu-main { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
 .edu-inner { width: 100%; max-width: 1120px; margin: 0 auto; padding: 24px 20px 140px; display: flex; flex-direction: column; gap: 40px; box-sizing: border-box; }
 @media (min-width: 768px) { .edu-inner { padding: 40px 40px 96px; gap: 48px; } }

 .edu-hero { display: flex; flex-direction: column; gap: 20px; }
 @media (min-width: 768px) { .edu-hero { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
 .edu-hero h2 { margin: 0 0 8px; font-family: var(--ag-font-display); font-size: clamp(28px, 5vw, 38px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.12; text-wrap: balance; }
 .edu-hero p { margin: 0; max-width: 52ch; font-size: 16px; color: var(--ag-text-2); }
 .edu-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; flex-shrink: 0; }
 .edu-stat { min-width: 140px; padding: 16px 18px; border-radius: 20px; background: var(--ag-glass-solid); border: 1px solid var(--ag-hairline); box-shadow: var(--ag-shadow); }
 .edu-stat span { display: block; font-size: 13px; color: var(--ag-text-3); }
 .edu-stat strong { display: block; margin-top: 2px; font-size: 30px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

 .edu-section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 16px; }
 .edu-section-head h3 { margin: 0; font-family: var(--ag-font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
 .edu-section-head span { font-size: 14px; color: var(--ag-text-3); }

 .edu-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
 @media (min-width: 1024px) { .edu-tools { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }
 .edu-tool { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; min-height: 150px; padding: 20px; border: 1px solid var(--ag-hairline); border-radius: 22px; background: var(--ag-glass-solid); box-shadow: var(--ag-shadow); text-align: left; color: var(--ag-text); cursor: pointer; transition: transform 0.25s var(--ag-ease), box-shadow 0.25s; }
 .edu-tool:hover { transform: translateY(-2px); box-shadow: var(--ag-shadow-lg); }
 .edu-tool-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--ag-fill); }
 .edu-tool b { display: block; font-size: 16px; line-height: 1.3; }
 .edu-tool small { display: block; margin-top: 4px; font-size: 14px; line-height: 1.4; color: var(--ag-text-3); }

 .edu-classes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
 @media (min-width: 720px) { .edu-classes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
 @media (min-width: 1200px) { .edu-classes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
 .edu-class { display: flex; flex-direction: column; gap: 18px; padding: 20px; border-radius: 22px; background: var(--ag-glass-solid); border: 1px solid var(--ag-hairline); box-shadow: var(--ag-shadow); }
 .edu-class-top { display: flex; align-items: center; gap: 14px; }
 .edu-class-icon { display: grid; place-items: center; width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px; background: var(--ag-accent); color: var(--ag-text-inverse); }
 .edu-class-text { min-width: 0; }
 .edu-class-text h4 { margin: 0; font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
 .edu-class-text p { margin: 0; font-size: 14px; color: var(--ag-text-3); }
 .edu-class-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--ag-hairline); }
 .edu-code { padding: 4px 10px; border-radius: 999px; background: var(--ag-fill); font-size: 14px; font-weight: 700; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
 .edu-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 24px; border-radius: 22px; border: 2px dashed var(--ag-hairline-strong); text-align: center; }
 .edu-empty h4 { margin: 6px 0 0; font-size: 19px; font-weight: 600; color: var(--ag-text); }
 .edu-empty p { margin: 0; max-width: 44ch; color: var(--ag-text-2); }
 .edu-error { grid-column: 1 / -1; margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--ag-danger-soft); color: var(--ag-danger); }

 /* Popups */
 .edu-modal { position: fixed; inset: 0; z-index: 110; align-items: flex-end; justify-content: center; background: rgba(15, 23, 42, 0.3); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
 .edu-modal:not(.hidden) { display: flex; }
 @media (min-width: 720px) { .edu-modal { align-items: center; padding: 24px; } }
 .edu-sheet { width: 100%; max-height: 94vh; display: flex; flex-direction: column; overflow: hidden; background: var(--ag-glass-solid); color: var(--ag-text); border-radius: 28px 28px 0 0; box-shadow: var(--ag-shadow-lg); animation: edu-up 0.45s var(--ag-ease) both; }
 @media (min-width: 720px) { .edu-sheet { border-radius: 28px; max-height: 90vh; animation-name: ag-sheet-in; } }
 @keyframes edu-up { from { transform: translateY(100%); } to { transform: none; } }
 .edu-sheet.is-wide { max-width: 1000px; }
 .edu-sheet.is-mid { max-width: 680px; }
 .edu-sheet.is-small { max-width: 480px; }
 .edu-sheet-head { flex-shrink: 0; display: flex; align-items: center; gap: 14px; padding: 18px 14px 14px 24px; border-bottom: 1px solid var(--ag-hairline); }
 .edu-sheet-head h3 { margin: 0; font-family: var(--ag-font-display); font-size: 20px; font-weight: 700; }
 .edu-sheet-head p { margin: 0; font-size: 14px; color: var(--ag-text-3); }
 .edu-sheet-head .grow { flex: 1; min-width: 0; }
 .edu-sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 24px; }
 .edu-sheet-foot { flex-shrink: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px calc(18px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--ag-hairline); }

 #modal-inputs label { display: block; margin-bottom: 6px; font-size: 14px !important; font-weight: 600; color: var(--ag-text-2) !important; }
 #modal-inputs input, #modal-inputs textarea, #marks-term-select { width: 100%; box-sizing: border-box; padding: 12px 14px !important; border: 1px solid var(--ag-hairline-strong) !important; border-radius: 14px !important; background: var(--ag-glass-solid) !important; color: var(--ag-text) !important; font: 400 16px/1.4 var(--ag-font) !important; outline: none; }
 #modal-inputs input:focus, #modal-inputs textarea:focus { border-color: var(--ag-accent) !important; box-shadow: 0 0 0 4px var(--ag-accent-soft); }
 #result-area { margin-top: 16px; padding: 18px; border-radius: 18px; border: 1px solid var(--ag-hairline); background: var(--ag-bg); color: var(--ag-text); font: 15px/1.6 var(--ag-font); white-space: normal; overflow-x: auto; }
 #result-area h1, #result-area h2, #result-area h3 { margin: 14px 0 6px; font-size: 17px; }
 #result-area ul, #result-area ol { padding-left: 20px; }

 .edu-tabs { flex-shrink: 0; display: flex; gap: 4px; padding: 8px 16px 0; border-bottom: 1px solid var(--ag-hairline); overflow-x: auto; }
 .edu-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; font-size: 15px; font-weight: 600; color: var(--ag-text-3); white-space: nowrap; cursor: pointer; }
 .edu-tab.is-active { color: var(--ag-text); border-bottom-color: var(--ag-accent); }
 .edu-tab .material-symbols-outlined { font-size: 19px; }
 .edu-table-wrap { overflow-x: auto; border-radius: 18px; border: 1px solid var(--ag-hairline); }
 .edu-table { width: 100%; border-collapse: collapse; font-size: 14px; }
 .edu-table th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ag-text-3); border-bottom: 1px solid var(--ag-hairline); white-space: nowrap; }
 .edu-table td { border-bottom: 1px solid var(--ag-hairline); vertical-align: middle; }
 .edu-table tr:last-child td { border-bottom: 0; }
 .edu-mark-input { width: 76px !important; min-height: 40px !important; padding: 6px 10px !important; text-align: center; font-variant-numeric: tabular-nums; }
 .edu-note { padding: 16px; border-radius: 18px; background: var(--ag-fill); }
 .edu-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
 #hub-ai-content { font-size: 15px; line-height: 1.6; white-space: normal; }

 /* Drawer */
 #mobile-sidebar-drawer { position: fixed; inset: 0; z-index: 120; }
 .edu-drawer-bg { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.3); }
 .edu-drawer { position: absolute; inset: 0 auto 0 0; width: min(300px, 86vw); display: flex; flex-direction: column; justify-content: space-between; padding: 20px 14px calc(20px + env(safe-area-inset-bottom, 0px)); background: var(--ag-glass-solid); box-shadow: var(--ag-shadow-lg); animation: edu-in 0.35s var(--ag-ease) both; overflow-y: auto; }
 @keyframes edu-in { from { transform: translateX(-100%); } to { transform: none; } }
    /* Teacher resources: a plan you can teach from, not a wall of markdown. */
    .edu-doc { font-size: 13px; line-height: 1.6; color: var(--on-surface, #e8e8e8); }
    .edu-title { margin: 0 0 4px; font-size: 20px; font-weight: 700; }
    .edu-meta { margin: 0 0 18px; font-size: 11px; opacity: .6; }
    .edu-doc h4 { margin: 22px 0 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .55; }
    .edu-doc ul { margin: 0; padding-left: 18px; }
    .edu-doc li { margin-bottom: 5px; }
    .edu-doc p { margin: 0 0 8px; }
    .edu-stage { padding: 12px 0; border-top: 1px solid rgba(255,255,255,.08); }
    .edu-stage-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 12px; font-weight: 700; }
    .edu-stage-head span:last-child { opacity: .5; font-weight: 500; white-space: nowrap; }
    .edu-stage b { opacity: .55; font-weight: 600; margin-right: 4px; }
    .edu-qa { padding: 10px 0; border-top: 1px solid rgba(255,255,255,.06); }
    .edu-a { margin: 4px 0 0; padding-left: 12px; border-left: 2px solid rgba(255,255,255,.15); opacity: .7; }
    .edu-notes { margin: 8px 0 0; padding-left: 12px; border-left: 2px solid rgba(255,255,255,.15); font-size: 12.5px; opacity: .72; }
    .edu-pptx { display: block; width: 100%; margin: 0 0 16px; padding: 11px; border: 0; border-radius: 12px; background: #fff; color: #000; font-size: 13px; font-weight: 600; cursor: pointer; }
 
 /* The same opening as ARIA's and School OS's homes: the date in small capitals, then the greeting. */
 .edu-hero .edu-eyebrow { margin: 0; font: 500 11px/1.4 var(--mono-code, "Geist Mono", ui-monospace, monospace); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ag-text-3); }
 .edu-hero .edu-greet { margin: 12px 0 10px; text-wrap: balance; }
 .edu-greet em { font-style: italic; }
