/* Shared CHEM.LK navy/gold identity; state and permission classes stay intact. */
:root{--navy:#0e1528;--blue:#18243c;--gold:#fcb316;--gold-soft:#f9e4b3;--gold-ink:#87600b;--paper:#f5f7fb;--ink:#18243c;--muted:#566477;--line:#dfe5ee;--sky:#eef2f7}
body{font-size:16px;line-height:1.8;background:var(--paper)}
button,a{-webkit-tap-highlight-color:transparent}
.auth-layout{grid-template-columns:minmax(0,1.1fr) minmax(390px,.9fr);grid-template-rows:auto auto;gap:2.3rem clamp(2rem,6vw,6rem);padding:3.5rem clamp(1.25rem,6vw,7rem);background:radial-gradient(ellipse at 14% 80%,#26354b 0%,transparent 50%),var(--navy);align-content:center;overflow:hidden}
.auth-intro{max-width:660px}.brand{gap:.85rem}.brand strong{font-size:1.2rem;letter-spacing:-.04em}.atom{width:44px;height:44px;font-size:1.65rem;flex:none;border-color:var(--gold)}
.auth-intro .brand small{font-size:.8125rem;line-height:1.6;color:#c3cedc}
.auth-intro .eyebrow{font-size:.75rem;letter-spacing:.15em;margin-top:2.8rem;display:flex;align-items:center;gap:.75rem}.auth-intro .eyebrow::before{content:'';height:1px;width:30px;background:var(--gold);flex:none}
.auth-intro h1{font-family:'Noto Sans Sinhala',sans-serif;font-size:clamp(2.1rem,3.4vw,3.45rem);font-weight:700;letter-spacing:-.035em;line-height:1.5;margin:0 0 1rem}
.auth-intro h1 em{color:var(--gold);font-style:normal}.auth-intro>p:not(.eyebrow){font-size:1rem;color:#c2ccdb;max-width:590px;line-height:1.95}
.portal-portrait{max-width:650px;width:100%;grid-template-columns:210px minmax(0,1fr);gap:1.5rem;border-top:1px solid #394357;padding-top:1.75rem;align-items:center}
.portal-portrait img{width:210px;height:220px;object-fit:cover;object-position:62% 25%;border:0;border-radius:18px;box-shadow:0 14px 34px rgba(0,0,0,.18);filter:none;opacity:1;mix-blend-mode:normal}
.portal-portrait figcaption>span{font-size:.8125rem;color:#b8c6d8}.portal-portrait figcaption strong{font-size:1.15rem;font-weight:600}.portal-portrait figcaption small{font-size:.8125rem;color:var(--gold);line-height:1.8}
.auth-card{position:relative;max-width:550px;width:100%;padding:clamp(1.5rem,3vw,3rem);border:1px solid #fff;border-radius:24px;background:#fff;box-shadow:0 28px 90px rgba(0,0,0,.24);margin:0}
.auth-card::before{content:'';position:absolute;left:2.5rem;right:2.5rem;top:0;height:3px;border-radius:0 0 3px 3px;background:var(--gold)}
.auth-kicker{font-size:.75rem;letter-spacing:.14em;color:var(--gold-ink);border-bottom:1px solid var(--line);padding-bottom:1.3rem;margin-bottom:1.6rem}
.auth-card h2{font-family:'Noto Sans Sinhala',sans-serif;font-size:1.6rem;line-height:1.65;font-weight:700;letter-spacing:-.02em}
.auth-card .form-panel>p{font-size:.9375rem;color:var(--muted);line-height:1.9}
.auth-card label{font-size:.9375rem;font-weight:600}.auth-card input{background:#f7f9fc;border:1px solid #d7deea;min-height:54px;border-radius:12px;padding:.85rem 1rem}
.auth-card .primary{border-radius:999px;min-height:54px;font-size:.9375rem;font-weight:700;box-shadow:none;margin-top:1.1rem}
.primary{background:var(--gold);color:var(--navy);border-radius:12px;font-size:.875rem;font-weight:700;box-shadow:none;transition:transform .2s ease,box-shadow .2s ease,background .2s ease}
.primary:hover:not(:disabled){filter:none;background:#ffc13d;box-shadow:0 8px 22px rgba(252,179,22,.17);transform:translateY(-1px)}
.auth-guidance{font-size:.875rem;padding-top:1.2rem;margin-top:1.25rem}.auth-guidance summary{font-weight:600;color:var(--ink)}.auth-guidance li+li{margin-top:.65rem}
.auth-card .teacher-entry{font-size:.875rem;margin-top:1.15rem}.auth-card .message{font-size:.875rem;margin:.9rem 0}
.auth-card .otp-digits{gap:.5rem}.auth-card .otp-digits input{padding:.35rem;text-align:center;font-size:1.35rem;border-radius:10px}
.app{background:#f5f7fb;align-items:stretch}.sidebar{position:sticky;top:1rem;align-self:flex-start;margin:1rem 0 1rem 1rem;width:252px;min-height:calc(100svh - 2rem);max-height:calc(100svh - 2rem);overflow-y:auto;padding:1.5rem 1.15rem;background:var(--navy);border:1px solid #253046;border-radius:22px;box-shadow:0 14px 34px rgba(14,21,40,.12)}
.sidebar .brand{gap:.7rem}.sidebar .brand strong{font-size:1.12rem}.sidebar .brand small{font-size:.75rem;letter-spacing:.07em;color:#aebed2}.sidebar .atom{width:38px;height:38px;font-size:1.4rem}
.sidebar nav{margin-top:2.5rem;gap:.45rem}.nav-link{font-size:.875rem;font-weight:600;line-height:1.65;color:#bac8da;min-height:46px;padding:.85rem 1rem;border-radius:12px;transition:color .2s ease,background .2s ease}
.nav-link:hover{background:#1c2940;color:white}.nav-link.active{background:var(--gold);color:var(--navy);box-shadow:none}
.signout{font-size:.875rem;color:#c6d2e3;padding:1rem .7rem;border-color:#364057;margin-top:2rem}
.workspace{padding:2.5rem clamp(1.25rem,3vw,3.5rem);max-width:1500px;min-width:0}
.topbar{align-items:center;border-bottom:1px solid var(--line);padding-bottom:1.4rem;gap:1.2rem}.topbar .eyebrow{color:var(--gold-ink);font-size:.75rem;letter-spacing:.12em}
.topbar h1,.view h2{font-family:'Noto Sans Sinhala',sans-serif;font-weight:700;letter-spacing:-.025em;line-height:1.6}.topbar h1{font-size:clamp(1.7rem,2.6vw,2.5rem)}.view h2{font-size:1.65rem}.badge{font-size:.75rem;border-radius:999px;padding:.6rem 1rem;white-space:normal;line-height:1.6}
.metric-grid{gap:1rem}.metric-grid article{border:1px solid #e0e6ef;border-top:3px solid var(--gold);border-radius:18px;padding:1.35rem;box-shadow:0 5px 22px rgba(14,21,40,.035)}
.metric-grid span{font-size:.875rem;color:var(--muted)}.metric-grid strong{font-family:'Plus Jakarta Sans',sans-serif;font-size:2.1rem;font-weight:700;letter-spacing:-.05em;line-height:1.6;color:var(--navy)}
.panel,.resource-card,.list-item{border:1px solid #e1e6ef;border-radius:18px;box-shadow:0 6px 24px rgba(14,21,40,.035)}.panel{padding:1.5rem}.panel h3{font-family:'Noto Sans Sinhala',sans-serif;font-size:1.125rem;line-height:1.6}
.panel-head{border-color:#e7ebf2;gap:1rem}.panel-head span,#profileAddress{font-size:.875rem}.resource-card{padding:1.4rem}.resource-card h3{font-family:'Noto Sans Sinhala',sans-serif;font-size:1.125rem;line-height:1.65}.resource-card .type{font-size:.75rem;color:var(--gold-ink)}.resource-card p,.list-item p{font-size:.875rem}.resource-card a,.list-item a{font-size:.875rem}.resource-card:hover{box-shadow:0 14px 32px rgba(14,21,40,.08)}
.secondary,.list-item a{min-height:42px;border:1px solid #c8d1df;color:var(--navy);border-radius:10px;padding:.55rem .85rem;font-size:.8125rem;line-height:1.6;transition:border-color .2s ease,background .2s ease}.secondary:hover,.list-item a:hover{border-color:var(--navy);background:#f2f5f9}
input,select,textarea{border-radius:10px;border-color:#d2dae6;min-height:46px;font-size:.9375rem;line-height:1.65}label{font-size:.875rem}input:focus,select:focus,textarea:focus{border-color:var(--gold-ink);box-shadow:0 0 0 3px rgba(252,179,22,.15)}
.option input,.check input,.pack-select input,.permission-choice input{min-height:0}.text-button{font-size:.875rem}.empty{font-size:.9375rem;border-color:#c9d2df;background:#fff;border-radius:14px}
.chat-launcher{background:var(--navy);border:1px solid #48536a;box-shadow:0 10px 35px rgba(14,21,40,.22);font-size:.875rem;padding:.55rem 1.15rem .55rem .55rem;transition:transform .2s ease,box-shadow .2s ease}.chat-launcher:hover{transform:translateY(-3px);box-shadow:0 15px 40px rgba(14,21,40,.28)}
.chat-panel{border:1px solid #364157;border-radius:22px;box-shadow:0 24px 90px rgba(14,21,40,.3)}.chat-header{padding:1rem;background:var(--navy)}.chat-header strong{font-size:1rem}.chat-header small{font-size:.75rem;line-height:1.6;color:#c1ccdc}.chat-messages{background:#f3f6fa}.chat-message{font-size:.9375rem;line-height:1.85;border-radius:15px 15px 15px 4px}.chat-message.formatted-reply{font-size:.9375rem}.chat-message.user{background:var(--navy);border-color:var(--navy);border-radius:15px 15px 4px 15px}.chat-disclosure{font-size:.75rem}.chat-form textarea{font-size:.9375rem;border-radius:12px}.chat-attach span{font-size:.625rem}
.view.active,.form-panel.active,.chat-panel:not(.hidden){animation:surface-enter .32s ease both}
@media(max-width:1100px){.auth-layout{gap:2rem 2.5rem;padding:3rem 2rem}.auth-intro h1{font-size:2.5rem}.portal-portrait{grid-template-columns:160px minmax(0,1fr);gap:1.1rem}.portal-portrait img{width:160px;height:185px}.portal-portrait figcaption strong{font-size:1rem}.sidebar{width:228px;padding:1.3rem 1rem}.workspace{padding:2rem 1.5rem}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1000px){.auth-layout{grid-template-columns:1fr;grid-template-rows:auto auto auto;padding:2.4rem clamp(1.25rem,6vw,4rem);gap:2rem}.auth-intro{width:min(100%,650px);grid-column:1;grid-row:1;justify-self:center}.auth-intro .eyebrow{margin-top:1.8rem}.auth-intro h1{font-size:clamp(2rem,4.6vw,2.8rem)}.auth-card{grid-column:1;grid-row:2;width:min(100%,650px);max-width:650px;justify-self:center;padding:2rem}.portal-portrait{grid-column:1;grid-row:3;width:min(100%,650px);grid-template-columns:150px minmax(0,1fr);justify-self:center;padding-top:1.5rem}.portal-portrait img{width:150px;height:160px}.resource-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.app{display:block}.sidebar{position:static;width:calc(100% - 1.5rem);min-height:0;max-height:none;margin:.75rem;padding:1.2rem;border-radius:18px}.sidebar nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin:1.2rem 0 .6rem;gap:.4rem}.nav-link{font-size:.8125rem;min-height:44px;padding:.7rem .8rem}.signout{margin-top:.7rem;padding:.75rem .5rem}.workspace{padding:1.4rem 1.1rem}.topbar{align-items:flex-start;gap:.7rem}.topbar h1{font-size:1.7rem}.badge{font-size:.6875rem;padding:.5rem .7rem}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem}.metric-grid article{padding:1rem}.metric-grid span{font-size:.8125rem}.metric-grid strong{font-size:1.8rem}.panel{padding:1.1rem}.resource-grid,.pack-grid{grid-template-columns:1fr}.panel,.resource-card,.list-item{border-radius:14px}.view h2{font-size:1.4rem}.chat-panel{border-radius:18px;width:calc(100vw - 1.1rem)}.chat-message{max-width:94%}.chat-launcher{bottom:1rem;right:1rem}.auth-card{border-radius:20px}.permission-choices>div{grid-template-columns:1fr}.list-item{align-items:flex-start}}
@media(max-width:480px){.auth-layout{padding:1.6rem 1.25rem 2rem;gap:1.6rem}.auth-intro .eyebrow{font-size:.6875rem;margin-top:1.6rem}.auth-intro h1{font-size:2.15rem;line-height:1.5}.auth-intro .brand small{font-size:.75rem}.auth-card{padding:1.5rem 1.25rem;border-radius:18px}.auth-card h2{font-size:1.35rem}.auth-kicker{margin-bottom:1.25rem;font-size:.6875rem}.auth-card input{min-height:52px}.auth-card .otp-digits{gap:.35rem}.auth-card .otp-digits input{padding:.25rem;min-height:48px;font-size:1.25rem}.portal-portrait{grid-template-columns:125px minmax(0,1fr);gap:1rem}.portal-portrait img{width:125px;height:145px;border-radius:14px}.portal-portrait figcaption strong{font-size:1rem}.portal-portrait figcaption small{font-size:.75rem}.portal-portrait figcaption>span{font-size:.75rem}.auth-guidance{font-size:.8125rem}.auth-card .form-panel>p{font-size:.9375rem}}
@media(prefers-reduced-motion:reduce){.view.active,.form-panel.active,.chat-panel:not(.hidden){animation:none}.primary,.secondary,.chat-launcher,.nav-link{transition:none}.chat-launcher:hover,.primary:hover:not(:disabled){transform:none}}

.portal-portrait .portrait-qualifications{display:grid;gap:.25rem;max-width:100%;line-height:1.8}

/* Text-free syllabus artwork: retain the entire square illustration at icon size. */
.pack-card{min-width:0}
.pack-artwork{display:block;align-self:center;width:152px;height:152px;max-width:100%;aspect-ratio:1;object-fit:contain;border-radius:16px;background:var(--navy);margin:0 auto 1.2rem;box-shadow:0 8px 20px rgba(14,21,40,.12)}
@media(max-width:680px){.pack-artwork{width:140px;height:140px;border-radius:14px}}
