:root{color-scheme:light;font-family:Inter,Arial,sans-serif;--navy:#071b34;--blue:#155aa2;--orange:#e59a28;--ink:#18334f;--panel:#f2f7ff}*{box-sizing:border-box}body{margin:0;color:#fff;background:linear-gradient(115deg,#051426e3,#07284bc2),url(./background-melec-tools.webp) center/cover fixed;font-family:Inter,Arial,sans-serif;min-height:100vh}button,input,textarea,select{font:inherit}a{color:inherit}.portal-shell{width:min(1180px,100%);margin:auto;padding:clamp(18px,4vw,46px)}.portal-header{display:flex;align-items:center;gap:22px;margin:0 0 38px}.portal-header img{flex:0 0 auto;width:clamp(76px,10vw,110px);height:auto;border-radius:24px}.portal-header h1{font-size:clamp(27px,5vw,48px);line-height:1.05;margin:3px 0 8px}.portal-header p{margin:0;max-width:690px;line-height:1.45}.eyebrow{text-transform:uppercase;letter-spacing:.17em;font-size:12px;font-weight:800;color:#ffc275}.portal-hero h2{font-size:clamp(29px,4vw,46px);line-height:1.1;margin:9px 0}.portal-hero>p:not(.eyebrow){font-size:clamp(16px,2vw,20px);color:#d9e9ff}.portal-cards{display:grid;gap:18px;margin:28px 0 42px}.portal-card{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:18px;padding:23px;border:1px solid #8aaed6;border-radius:25px;text-decoration:none;background:linear-gradient(130deg,#153d69,#1d6ab1);box-shadow:0 14px 35px #0005;transition:transform .18s,box-shadow .18s}.portal-card:hover,.portal-card:focus-visible{transform:translateY(-3px);box-shadow:0 18px 42px #0008;outline:2px solid #ffc275;outline-offset:3px}.student-card{background:linear-gradient(130deg,#143f62,#117e8f)}.portal-card-icon{display:grid;place-items:center;width:60px;height:60px;border-radius:18px;background:#f5a833;color:#10283f;font-size:29px}.portal-card strong{display:block;font-size:clamp(20px,2.4vw,28px);margin-bottom:6px}.portal-card small{display:block;color:#edf5ff;font-size:15px;line-height:1.42}.portal-card>span:last-child{font-size:33px;color:#ffc275}.portal-panel{border:1px solid #bdd5ed;border-radius:27px;background:var(--panel);color:var(--ink);padding:clamp(20px,4vw,38px);box-shadow:0 14px 35px #0004}.portal-panel h2{font-size:clamp(24px,3vw,32px);margin:4px 0 7px}.portal-panel p{line-height:1.5}.portal-panel .eyebrow{color:#a75b0b}.portal-form{display:grid;gap:16px}.portal-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.portal-form label{display:grid;gap:7px;color:#1b3855;font-weight:700}.portal-form input,.portal-form textarea,.portal-form select{width:100%;min-height:46px;padding:11px 13px;border:1px solid #a8c0da;border-radius:12px;background:#fff;color:#162d45}.portal-form textarea{resize:vertical;min-height:116px}.portal-form input:focus,.portal-form textarea:focus,.portal-form select:focus{outline:3px solid #95c8ff}.portal-button{min-height:46px;justify-self:start;padding:10px 22px;border:0;border-radius:99px;background:linear-gradient(120deg,#1258a9,#177ba9);color:#fff;font-weight:800;cursor:pointer}.portal-button:hover,.portal-button:focus-visible{filter:brightness(1.14);outline:2px solid #da8c25;outline-offset:2px}.portal-button:disabled{opacity:.55;cursor:wait}.field-help{font-size:13px;color:#536981;margin-top:-12px}.form-status{margin:0;min-height:20px;color:#0b653d}.form-status.error{color:#ad2525}.honeypot{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.portal-top-link{display:inline-flex;align-items:center;gap:7px;margin-bottom:22px;text-decoration:none;color:#d8edff;font-weight:700}.portal-top-link:hover{text-decoration:underline}.portal-auth{width:min(560px,100%);margin:0 auto 26px}.portal-auth>h2{margin-top:0}.portal-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}.portal-tabs button{border:1px solid #92b7df;background:#e5f0ff;color:#1b456c;padding:10px 16px;border-radius:99px;cursor:pointer;font-weight:700}.portal-tabs button.active{background:#165a9d;color:#fff}.portal-dashboard{margin-top:22px}.portal-dashboard[hidden],.portal-auth[hidden],.student-pane[hidden]{display:none!important}.student-pane{display:grid;gap:16px}.student-pane h2{margin:0}.portal-list{display:grid;gap:10px}.portal-list details{background:#fff;border:1px solid #a8c8e8;border-radius:15px;padding:12px;color:#173550}.portal-list summary{cursor:pointer;font-weight:800}.portal-list a{color:#135a9b}.portal-message{padding:15px;border-radius:13px;background:#dcecff;color:#163b5e}.portal-warning{background:#fff0d6;color:#733f0e}.portal-small{font-size:13px;color:#4f6480}.portal-actions{display:flex;gap:9px;flex-wrap:wrap}.portal-actions button{min-height:42px;padding:9px 15px;border:1px solid #a3c0df;border-radius:99px;background:#175b9b;color:#fff;cursor:pointer}.portal-actions .subtle{background:#e3effd;color:#17436f}.lesson-content{overflow-wrap:anywhere;line-height:1.55}.lesson-content img{max-width:100%;height:auto}.lesson-content table{border-collapse:collapse;width:100%}.lesson-content td,.lesson-content th{border:1px solid #aac4df;padding:9px}.lesson-content iframe{width:100%;min-height:310px;border:0;border-radius:12px}.lesson-block{margin:12px 0}.lesson-file{display:flex;align-items:center;gap:10px;padding:12px;border-radius:12px;background:#deecfa}.lesson-file button{border:0;border-radius:99px;background:#155e9e;color:#fff;padding:8px 13px;cursor:pointer}.contact-panel .portal-form[hidden],.student-class-name[hidden]{display:none!important}.contact-panel #openContactForm{margin:.5rem 0}.contact-panel #contactForm{margin-top:1rem}.student-class-name{display:inline-flex;align-items:center;margin:.45rem 0 1rem;padding:.5rem .85rem;border:1px solid #84b7dd;border-radius:99px;background:#e3f2ff;color:#123b61;font-weight:800}.student-code-form{display:flex;align-items:end;gap:.7rem;flex-wrap:wrap}.student-code-form label{flex:1 1 220px}.student-code-form .portal-button{flex:0 0 auto}#studentCodePane{gap:.55rem;padding:1rem;border:1px solid #9bc3e3;border-radius:1rem;background:#e8f4ff}#studentCodePane h2{font-size:1.3rem}#studentCodePane p{margin:0}@media(max-width:560px){.student-code-form .portal-button{width:100%}}@media(max-width:700px){.portal-header{align-items:flex-start;gap:13px;margin-bottom:26px}.portal-header p:not(.eyebrow){font-size:13px}.portal-cards,.portal-form-grid{grid-template-columns:1fr}.portal-card{padding:17px;gap:13px}.portal-shell{padding:17px}.portal-panel{border-radius:19px}.portal-button{width:100%}}.student-readonly .lesson-content{font:16px/1.55 Arial,sans-serif;overflow-wrap:anywhere}.student-readonly .lesson-content p{margin:.35em 0;line-height:1.55}.student-readonly .lesson-content table{table-layout:fixed;max-width:100%;overflow-wrap:anywhere}.student-readonly .lesson-file{display:grid;justify-items:start;max-width:100%;overflow:hidden}.student-readonly .lesson-image{display:block;width:auto;height:auto;max-width:100%;max-height:90vh;object-fit:contain;border-radius:.4rem}.student-tp-card{padding:1rem;border:2px solid #74b8df;border-radius:1rem;background:#e4f5ff;color:#143553;overflow-wrap:anywhere}.student-tp-card h3{margin:.1rem 0 .5rem}.student-tp-card button{margin:.35rem .4rem .35rem 0;padding:.6rem 1rem;border:0;border-radius:99px;background:#1765a3;color:#fff;font-weight:700;cursor:pointer}.student-tp-card button:disabled{opacity:.55;cursor:wait}.student-tp-viewer{display:grid;gap:1rem;margin-top:.8rem}.student-tp-viewer section{padding:.8rem;border-radius:.8rem;background:#fff;border:1px solid #9ac7e2}.student-tp-viewer h4{margin:.1rem 0 .5rem}.student-tp-viewer iframe{display:block;width:100%;height:min(75vh,900px);border:1px solid #acc7db;border-radius:.5rem;background:#fff}.student-tp-viewer iframe{height:clamp(360px,78dvh,1200px)}.student-readonly .lesson-file iframe{display:block;width:100%;height:clamp(360px,78dvh,1200px);min-height:0}.student-pdf-preview{position:fixed;inset:0;z-index:10000;overflow:auto;padding:clamp(8px,2vw,28px);background:#fff;color:#143553}.student-pdf-preview-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px;padding:12px 16px;border-radius:12px;background:#dceeff;color:#143553}.student-pdf-preview-heading strong{min-width:0;overflow-wrap:anywhere}.student-pdf-preview-card{padding:clamp(8px,1.3vw,16px);border:1px solid #91bee5;border-radius:12px;background:#eaf5ff}.student-pdf-preview-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}.student-pdf-preview button,.student-pdf-preview-actions a{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:7px 13px;border:0;border-radius:99px;background:#1765a3;color:#fff;font-weight:700;text-decoration:none;cursor:pointer}.student-pdf-preview button:focus-visible,.student-pdf-preview-actions a:focus-visible{outline:3px solid #e59a28;outline-offset:2px}.student-pdf-preview-frame{display:block;width:100%;height:calc(100dvh - 165px);min-height:320px;border:1px solid #94b8d8;border-radius:5px;background:#fff}.student-pdf-preview-frame[hidden]{display:none!important}@media(max-width:600px){.student-pdf-preview-heading{margin-bottom:8px;padding:9px 11px}.student-pdf-preview-frame{height:calc(100dvh - 145px);min-height:280px}.student-pdf-preview-actions{margin-bottom:8px}}@media(max-width:600px){.student-tp-viewer section{padding:.5rem}.student-tp-viewer iframe,.student-readonly .lesson-file iframe{height:72dvh;min-height:320px}}.portal-tabs button:disabled{opacity:.55;cursor:not-allowed}@media(max-width:600px){.student-readonly .lesson-content{font-size:15px}.student-readonly .lesson-content td,.student-readonly .lesson-content th{padding:.35rem}}.portal-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(10px,1.5vw,18px)}.portal-card{width:100%;min-width:0;min-height:136px;padding:clamp(13px,1.6vw,22px);gap:clamp(9px,1vw,16px);text-align:left;font:inherit;color:#fff;cursor:pointer}.portal-card-icon{width:clamp(43px,4vw,56px);height:clamp(43px,4vw,56px);font-size:clamp(23px,2vw,29px)}.portal-card strong{font-size:clamp(17px,1.5vw,24px);overflow-wrap:anywhere}.portal-card small{font-size:clamp(12px,1vw,15px)}.contact-card{background:linear-gradient(130deg,#594075,#7953a2)}.teacher-card .portal-card-icon svg{display:block;width:29px;height:32px;fill:#07345c;filter:drop-shadow(0 1px 0 #fff7)}.contact-card{grid-template-columns:43px minmax(0,1fr) 14px;gap:10px;padding-inline:14px}.contact-card .portal-card-icon{width:43px;height:43px;font-size:22px}.contact-card strong{font-size:clamp(16px,1.1vw,20px);white-space:nowrap;letter-spacing:-.02em}.contact-card>span:last-child{font-size:25px}.contact-panel[hidden],.portal-form[hidden],.portal-tabs[hidden]{display:none!important}.contact-panel{margin-top:18px}.auth-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.auth-tabs button{width:100%;min-width:0;min-height:44px;padding:8px 10px;white-space:normal;line-height:1.2}.portal-auth{width:min(700px,100%)}@media(max-width:900px){.portal-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.contact-card{grid-column:1/-1}.portal-card{min-height:116px}}@media(max-width:700px){.portal-cards{grid-template-columns:1fr}.contact-card{grid-column:auto}.portal-card{min-height:92px}.portal-card-icon{width:43px;height:43px}.portal-card>span:last-child{font-size:26px}.auth-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.auth-tabs #studentContactTab{grid-column:1/-1}.portal-actions button{flex:1 1 140px}}@media(max-width:390px){.portal-header img{width:60px}.portal-header{gap:10px}.portal-header h1{font-size:25px}.portal-panel{padding:17px}.auth-tabs{grid-template-columns:1fr}.auth-tabs #studentContactTab{grid-column:auto}}@media(max-width:390px){.contact-card strong{font-size:clamp(14px,4.4vw,17px)}.contact-card{gap:7px;padding-inline:11px}}
