.platform-page { min-height:100vh; }
.platform-main { padding-block:48px 80px; }
.platform-main h1 { font-size:clamp(30px,4vw,44px); }
.platform-top { display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap; margin-bottom:32px; }
.platform-top p { color:var(--muted); }
.platform-page .site-header .header-container { gap:12px; }
.platform-links { display:flex; align-items:center; flex-wrap:wrap; gap:20px; }
.platform-page button,.platform-page input,.platform-page select { font:inherit; }
.platform-page button { cursor:pointer; }
.platform-page button:disabled { opacity:.5; cursor:wait; }
.platform-form { display:grid; gap:18px; }
.platform-form label { display:grid; gap:7px; font-size:14px; color:#eddbca; }
.platform-form input,.platform-form select { width:100%; padding:12px 14px; border:1px solid #967354; border-radius:9px; color:#fff6ef; background:#2b1e18; min-height:48px; box-sizing:border-box; }
.platform-form .check-label { display:flex; flex-direction:row; align-items:center; }
.platform-form input[type=checkbox] { width:18px; min-height:18px; height:18px; }
.login-panel { width:min(100%,480px); margin:24px auto; box-sizing:border-box; }
.platform-form .btn { width:100%; }
.platform-message { margin:18px 0; color:#fff2e4; border-left:3px solid #dfb083; background:#452d22; padding:12px 16px; border-radius:4px; }
.platform-message:empty { display:none; }
.platform-error { border-color:#e38b9c; }
.portal-grid { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.portal-grid .school-card { display:flex; flex-direction:column; align-items:flex-start; }
.portal-grid .school-card .btn { margin-top:auto; }
.portal-meta { color:var(--muted); font-size:14px; }
.portal-actions { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.portal-outline { border:1px solid #b38861; border-radius:12px; background:rgba(40,28,22,.94); padding:22px; margin:20px 0; }
.portal-outline h2 { font-size:24px; }
.portal-lessons { display:grid; gap:10px; }
.portal-lesson { display:flex; justify-content:space-between; gap:16px; padding:15px 18px; border:1px solid #8c6749; border-radius:9px; background:#3c291f; text-decoration:none; color:#fff4e7; }
.portal-lesson:hover { background:#513225; }
.portal-lesson small { color:#e0bea4; white-space:nowrap; }
.admin-layout { display:grid; grid-template-columns:minmax(260px,360px) 1fr; gap:28px; align-items:start; }
.admin-student { padding:24px; margin-bottom:18px; }
.admin-student h2 { font-size:22px; overflow-wrap:anywhere; }
.admin-student .portal-meta { overflow-wrap:anywhere; }
.admin-grant { border-top:1px solid #79553d; margin-top:16px; padding-top:16px; }
.admin-student form { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:22px; }
.admin-student form button { grid-column:1/-1; }
.temporary-password { display:block; overflow-wrap:anywhere; user-select:all; color:#fff; background:#281912; border-radius:8px; padding:12px; margin-block:10px; }
.lesson-media { display:grid; gap:24px; margin-block:28px; }
.lesson-media article { border:1px solid #8b6547; padding:18px; border-radius:14px; background:rgba(35,24,19,.96); }
.lesson-media img { max-width:100%; height:auto; display:block; margin:auto; }
.lesson-media video,.lesson-media audio { width:100%; display:block; }
.lesson-media iframe { width:100%; height:75vh; border:0; }
.video-shell { position:relative; }
.media-watermark { position:absolute; right:14px; top:14px; padding:4px 8px; border-radius:4px; color:rgba(255,255,255,.7); background:rgba(0,0,0,.25); font-size:12px; pointer-events:none; }
.lesson-path { display:flex; justify-content:space-between; flex-wrap:wrap; gap:16px; margin-top:28px; }
[hidden] { display:none!important; }
.editor-heading { padding:28px; margin-bottom:24px; }
.editor-label { display:block; margin-bottom:8px; color:var(--muted); }
.editor-heading > select { width:100%; padding:12px; color:#fff3e6; border:1px solid #ac8563; border-radius:8px; background:#2b1e18; }
.editor-title-form,.editor-add-section,.editor-section-form,.editor-new-lesson,.editor-move-form { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:16px; }
.editor-title-form { margin-top:22px; }
.editor-heading .portal-meta { margin:20px 0 0; }
.editor-add-section { margin-bottom:30px; }
.editor-section { padding:26px; margin-bottom:26px; }
.editor-section-form { margin-bottom:24px; }
.editor-lesson { border:1px solid #926d50; border-radius:12px; background:rgba(33,22,17,.6); margin-bottom:14px; }
.editor-lesson > summary { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px; cursor:pointer; }
.editor-lesson > summary::before { content:'◇'; color:#e0b182; }
.editor-lesson > summary span { flex:1; overflow-wrap:anywhere; }
.editor-lesson > summary small { font-size:12px; color:#e0b182; }
.editor-lesson-content { padding:0 20px 22px; }
.platform-form textarea { resize:vertical; width:100%; padding:12px 14px; border:1px solid #967354; border-radius:9px; color:#fff6ef; background:#2b1e18; box-sizing:border-box; }
.editor-lesson-form { margin-block:18px; }
.editor-checks { display:flex; flex-wrap:wrap; gap:12px 24px; }
.editor-toolbar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:12px; }
.editor-small,.editor-drag,.editor-file-replace { border:1px solid #9e7758; border-radius:7px; padding:7px 11px; color:#fff4e8; background:#3a271e; font-size:13px; cursor:pointer; min-height:36px; box-sizing:border-box; }
.editor-small:hover,.editor-file-replace:hover { background:#603b2a; }
.editor-drag { cursor:grab; font-size:22px; padding:1px 10px; }
.editor-filename { display:block; color:var(--muted); font-size:12px; overflow-wrap:anywhere; }
.editor-assets { list-style:none; padding:0; margin:12px 0 24px; display:grid; gap:12px; }
.editor-assets > li { border:1px solid #75533d; border-radius:9px; background:#302119; padding:14px; min-width:0; }
.editor-asset-heading { display:flex; align-items:center; gap:14px; margin-bottom:10px; }
.editor-file-replace input { display:none; }
.editor-material-title { margin-top:26px!important; font-size:21px!important; }
.editor-drop-target { outline:3px solid #d7a776; outline-offset:2px; }
.editor-upload-progress { display:grid; gap:10px; margin-top:16px; }
.editor-upload-progress progress { width:100%; accent-color:#aa2348; }
.editor-upload-progress span { overflow-wrap:anywhere; color:var(--muted); }
.portal-lesson-group { margin-top:24px; }
.portal-lesson-group h3 { font-size:20px; }
.lesson-description { white-space:pre-wrap; }
.certificate-lesson article { width:100%; max-width:900px; margin-inline:auto; box-sizing:border-box; }
.certificate-instructions { max-width:900px; margin:0 auto 32px; }
@media(max-width:640px) { .editor-title-form,.editor-add-section,.editor-section-form,.editor-new-lesson,.editor-move-form { grid-template-columns:1fr; } .editor-section,.editor-heading { padding:18px; } .editor-lesson-content { padding-inline:14px; } .editor-lesson > summary { gap:9px; padding:14px; } }
@media(max-width:800px) { .admin-layout,.portal-grid { grid-template-columns:1fr; } }
@media(max-width:480px) { .platform-main { padding-top:30px; } .login-panel,.admin-student { padding:24px; } .portal-lesson { flex-direction:column; gap:6px; } .admin-student form { grid-template-columns:1fr; } .platform-links { gap:12px; font-size:13px; } }

.lesson-resource { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:22px 26px; border:1px solid rgba(208,161,116,.55); border-radius:14px; background:linear-gradient(125deg,rgba(79,52,37,.9),rgba(41,29,23,.86)); color:#fff3e7; }
.lesson-resource span { font-size:18px; font-weight:600; }
.lesson-resource .btn { flex-shrink:0; }
@media(max-width:640px) { .lesson-resource { align-items:flex-start; flex-direction:column; padding:20px; gap:16px; } }

.month-constants { max-width:460px; margin:8px auto; padding:8px 12px; }
.month-constants h2 { margin:0 0 22px; font-size:26px; font-weight:700; color:#fff3e7; }
.month-constants dl { margin:0; }
.month-constants dl > div { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:10px 0; border-bottom:1px solid rgba(208,161,116,.18); }
.month-constants dl > div:last-child { border-bottom:0; }
.month-constants dt { font-size:18px; font-weight:500; color:#fff3e7; }
.month-constants dd { display:flex; align-items:center; justify-content:center; min-width:48px; min-height:36px; margin:0; padding:2px 10px; box-sizing:border-box; border:1px solid rgba(213,170,123,.5); border-radius:8px; color:#f2cfa6; font-size:20px; font-weight:700; font-variant-numeric:tabular-nums; }
@media(max-width:480px) { .month-constants { padding:4px; } .month-constants h2 { font-size:23px; } }

.admin-student-list { min-width:0; }
.student-search { padding:22px 24px; margin-bottom:20px; }
.student-search .portal-meta { margin:0; }
.admin-student[hidden] { display:none; }
