/* LAMA Education • E-Sheet workspace — cool, mobile-first UI.
   This stylesheet does not control the canvas-rendered PDF. */
:root{color-scheme:light;--ink:#172b46;--muted:#52647a;--blue:#2456b8;--teal:#087f83;--indigo:#5146b9;--line:#d5e0ee;--paper:#fff;--ice:#f3f8ff;--radius:20px;--shadow:0 12px 35px rgba(31,60,106,.075)}
*{box-sizing:border-box}
body{margin:0;min-height:100vh;background:radial-gradient(ellipse at 12% 0%,#dcecff 0,transparent 36%),radial-gradient(ellipse at 100% 14%,#d8f6f2 0,transparent 32%),#f4f7fd;color:var(--ink);font:16px/1.65 system-ui,-apple-system,"Segoe UI",sans-serif}
header,main{max-width:1000px;margin:auto;padding:20px}
a{color:#2456a5;text-underline-offset:3px}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #3475ce;outline-offset:3px}
.hero{margin:14px auto 0;max-width:960px;padding:clamp(22px,5vw,44px);border:1px solid #c9dff2;border-radius:28px;background:linear-gradient(125deg,#eaf2ff,#f0f3ff 55%,#e0f7f4);box-shadow:var(--shadow);position:relative}
.hero small{display:inline-flex;align-items:center;gap:7px;letter-spacing:.075em;font-weight:800;font-size:12px;color:#2453a4}
.hero small:before{content:"";width:9px;height:9px;border-radius:50%;background:#149b91}
.hero h1{font-size:clamp(29px,5vw,47px);letter-spacing:-.045em;line-height:1.13;max-width:700px;margin:12px 0;color:#16335b}
.hero p{margin:10px 0;color:#425975}
.hero .ur{color:#175b68;font-size:16px;text-align:right}
.hero-meta{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}
.hero-meta span{border:1px solid #b9d1e8;border-radius:999px;background:#ffffffb8;font-size:12px;font-weight:750;color:#25496f;padding:5px 11px}
.hero-nav{display:flex;flex-wrap:wrap;gap:8px 18px;font-size:14px;font-weight:700;margin-top:18px}
.hero-nav a{text-decoration:none;min-height:32px;display:inline-flex;align-items:center}
.hero-nav a:hover{text-decoration:underline}
section{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:clamp(17px,3vw,27px);margin-bottom:20px;box-shadow:var(--shadow);min-width:0}
h2{font-size:clamp(19px,3vw,23px);line-height:1.35;letter-spacing:-.025em;margin:0 0 15px;color:#1b3d68}
#quickGuide ol{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;list-style:none;padding:0!important;counter-reset:guide;margin:14px 0}
#quickGuide li{counter-increment:guide;border:1px solid #d6e5f4;background:linear-gradient(150deg,#f3f8ff,#f5fcfc);border-radius:15px;padding:14px;font-size:14px;color:var(--muted)}
#quickGuide li:before{content:counter(guide);display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:#dcecff;color:#224fa3;font-weight:800;margin-bottom:9px}
#quickGuide li b{display:block;color:var(--ink);font-size:15px;margin-bottom:5px}
.fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 16px}
label{display:block;font-weight:650;font-size:14px;color:#28415f;min-width:0;overflow-wrap:anywhere}
input:not([type=checkbox]),select{display:block;width:100%;min-width:0;min-height:49px;border:1px solid #c0d0e3;border-radius:12px;padding:12px 13px;margin-top:7px;background:#f8fbff;color:var(--ink);font:inherit;font-size:16px;transition:border-color .15s,background .15s,box-shadow .15s}
input:not([type=checkbox]):focus,select:focus{border-color:#5786d2;background:white;box-shadow:0 0 0 3px #dceaff;outline:0}
input::placeholder{color:#687c94}
input[dir=auto]{font-family:system-ui,"Noto Nastaliq Urdu",sans-serif}
input[type=file]{padding:10px;background:#f0f7ff;border:1px dashed #9db8d8;white-space:normal}
input[type=file]::file-selector-button{border:0;border-radius:8px;padding:9px 10px;margin-right:8px;background:#dcecff;color:#234d8b;font-weight:750;cursor:pointer}
input[type=checkbox]{width:19px;height:19px;vertical-align:middle;accent-color:var(--teal);margin:0 8px 0 0;flex-shrink:0}
#settings>label{display:flex;align-items:center;min-height:40px;padding:8px 12px;border:1px solid #e0e9f4;background:#f6faff;border-radius:10px;margin:8px 0}
#settings>h2:not(:first-child){margin-top:28px!important;padding-top:20px;border-top:1px solid #e3eaf3}
button,.action{font:inherit;font-weight:750;background:linear-gradient(120deg,#285cc1,#087e89);color:#fff;border:1px solid transparent;border-radius:12px;padding:12px 18px;min-height:48px;cursor:pointer;text-decoration:none;display:inline-flex;justify-content:center;align-items:center;text-align:center;gap:7px;transition:box-shadow .18s,filter .18s}
button:hover,.action:hover{filter:brightness(.96);box-shadow:0 4px 12px #2456b81c}
button:disabled{opacity:.55;cursor:not-allowed;box-shadow:none}
.secondary{background:#edf4ff;color:#244a82;border-color:#cddced}
.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px;align-items:center}
#make{width:100%;min-height:59px;font-size:clamp(16px,3vw,19px);box-shadow:0 8px 20px #226da52b}
.hint{color:var(--muted);font-size:14px;line-height:1.7;margin:12px 0}
.warn{background:#eff6ff;border:1px solid #cbdcf1;border-left:4px solid #6386bb;border-radius:12px;padding:12px 15px;color:#3a5273;font-size:14px;margin:0 0 23px}
.hidden{display:none!important}
.themes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}
.theme{background:#f8fbff;color:#253b5a;border:1px solid #d2dfef;font-size:14px;padding:11px 12px;display:flex;align-items:center;justify-content:flex-start;gap:9px;min-width:0;text-align:left;overflow-wrap:anywhere}
.theme[aria-pressed=true]{border:2px solid #3764b5;background:#e8f0ff;box-shadow:0 0 0 2px #e3ecfa}
.swatch{width:24px;height:24px;flex:0 0 24px;border-radius:50%;border:1px solid #172b4620}
#headerPreview,#preview img{display:block;width:100%;height:auto;border:1px solid #cfdced;border-radius:12px;background:white}
#headerPreview{box-shadow:0 4px 14px #183d7010}
#preview{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:16px}
#preview img{box-shadow:0 5px 14px #163c6912}
#schoolMode{background:#f0f6ff;border:1px solid #d0e0f3;border-radius:16px;padding:16px;margin-bottom:22px}
#schoolMode p{font-size:14px;line-height:1.7}
#students{max-height:240px;overflow:auto;padding:10px;border:1px solid #cddced;background:#fff;border-radius:12px}
#students label{display:flex;align-items:center;padding:8px;font-weight:400;border-bottom:1px solid #edf2f7}
.ur{font-family:"Noto Nastaliq Urdu","Noto Naskh Arabic",serif;line-height:2.5;overflow-wrap:anywhere}
progress{display:block;width:100%;height:13px;border:0;border-radius:999px;overflow:hidden;accent-color:var(--teal);background:#dce9f5}
progress::-webkit-progress-bar{background:#dce9f5;border-radius:999px}
progress::-webkit-progress-value{background:linear-gradient(90deg,#4b72cb,#159b98);border-radius:999px}
#status,#loadStatus{font-size:14px;color:#425c7c;overflow-wrap:anywhere}
details{padding:14px 0;border-bottom:1px solid #e0e9f3}
details:last-child{border-bottom:0}
summary{cursor:pointer;font-weight:700;color:#254c7e}
#logoPreview{width:82px;height:82px;object-fit:contain;vertical-align:middle;border:1px solid #d3e2ef;border-radius:14px;background:white;padding:6px}
#result{background:#eef9f8;border:1px solid #a6d9d4;padding:18px;border-radius:16px;margin-top:16px}
#resultText{display:block;color:#175e64;font-size:19px;line-height:1.4;overflow-wrap:anywhere}
#result .actions>*{flex:1 1 150px}
.site-end{text-align:center;color:#536982;font-size:13px;padding:8px 18px 25px}
@media(min-width:800px){.themes{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:600px){header,main{padding:14px}.hero{margin:12px 12px 0;padding:20px 17px;border-radius:20px}.fields{grid-template-columns:1fr;gap:14px}#quickGuide ol{grid-template-columns:1fr;gap:8px}#quickGuide li{padding:12px 12px 12px 53px;position:relative}#quickGuide li:before{position:absolute;left:12px;top:12px}.actions>*{flex:1 1 120px}.actions>#logoPreview{flex:0 0 82px}#preview{grid-template-columns:1fr}.theme{font-size:13px;padding:10px 8px;gap:6px}.swatch{width:20px;height:20px;flex-basis:20px}}
@media(max-width:340px){.themes{grid-template-columns:1fr}.hero{margin:8px}.hero h1{font-size:27px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;scroll-behavior:auto!important}}

/* Board resource library and sharing */
.resource-intro{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.resource-tile{background:linear-gradient(145deg,#edf4ff,#f0fbfa);border:1px solid #cbdced;border-radius:16px;padding:17px;display:flex;flex-direction:column;align-items:flex-start;gap:7px;min-width:0}
.resource-tile h3,.board-card h3{margin:0;color:#1b3d68;font-size:17px;line-height:1.35}
.resource-tile p,.board-card p{margin:0;color:var(--muted);font-size:14px;line-height:1.55}
.resource-tile .action{margin-top:auto;width:100%}
.board-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:15px 0}
.board-card{border:1px solid #d5e0ee;background:#f8fbff;border-radius:15px;padding:14px;display:flex;flex-direction:column;gap:10px;min-width:0}
.board-title{display:flex;align-items:center;gap:10px}
.board-code{display:grid;place-items:center;flex:0 0 42px;height:42px;border-radius:12px;background:#dcecff;color:#254d89;font-size:12px;font-weight:800}
.board-card .source-note{font-size:12px;color:#52647a}
.board-card .board-links{display:flex;flex-wrap:wrap;gap:8px 14px;font-size:14px;font-weight:700;margin-top:auto}
.board-card .board-links a{padding:7px 0}
.share-area{border-top:1px solid #c5e0df;margin-top:16px;padding-top:14px}
.share-area h3{font-size:15px;color:#175e64;margin:0 0 8px}
.share-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.share-actions>*{min-width:0;font-size:14px;overflow-wrap:anywhere}
.share-whatsapp{background:#087b52;color:white}
.share-facebook{background:#2859ad;color:white}
.share-status{font-size:13px;color:#425c7c;margin:8px 0 0;overflow-wrap:anywhere}
#boardSearch{margin-bottom:14px}
@media(max-width:600px){.resource-intro,.board-grid{grid-template-columns:1fr}.share-actions{gap:7px}.share-actions>*{padding:10px 8px}}

/* Revision 7: clearer scan order and compact school-printing controls. */
:root{--blue:#2456b8;--teal:#087f83}
.hero{background:linear-gradient(130deg,#e1edff 0%,#edf0ff 48%,#ddf5f2 100%)}
.hero h1{max-width:760px;text-wrap:balance}
.resource-tile:first-child{background:linear-gradient(150deg,#edf4ff,#f1efff)}
.resource-tile:last-child{background:linear-gradient(150deg,#e9f8f6,#eff8ff)}
.resource-tile .action,.board-links a{min-height:44px}
.board-card{border-left:3px solid #a4bfdc}
.board-card:focus-within{border-left-color:var(--blue)}
#schoolMode{background:linear-gradient(145deg,#edf5ff,#f2faf9)}
#studentTools{background:#fff;border:1px solid #d5e0ee;border-radius:12px;padding:12px;margin:12px 0}
#studentTools .fields{gap:10px}
#batchInfo,#selectionInfo{font-size:13px;font-weight:650;color:#315573}
.batch-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:8px}
.batch-nav button{min-width:0;padding:10px 8px}
#students label:last-child{border-bottom:0}
#students label:has(input:checked){background:#e8f6f4;border-radius:8px}
#students label{min-height:44px}
#make:not(:disabled){background:linear-gradient(120deg,#2959bd,#087b83)}
#result .actions>a{min-height:54px}
#previewPanel{scroll-margin-top:12px}
#settings,#boardResources,#schoolMode{scroll-margin-top:14px}
#studentTools[hidden],#schoolMode[hidden]{display:none!important}
@media(max-width:600px){#schoolMode{padding:12px}#studentTools{padding:10px}.batch-nav button{font-size:13px}.hero h1{font-size:clamp(27px,7vw,34px)}.hero-nav{gap:4px 14px}#result .actions>a{flex:1 1 100%}}

/* Student-first resource centre */
.student-download{background:linear-gradient(145deg,#eff5ff,#e7f7f4);border:1px solid #bcd7e7;border-radius:16px;padding:18px;display:flex;flex-direction:column;gap:10px}
.student-download h3,.institute-promo h3{margin:0;font-size:clamp(19px,4vw,24px);line-height:1.3}
.student-download p,.institute-promo p{margin:0}
.student-download .action{width:100%}
.institute-promo{margin-top:13px;background:linear-gradient(120deg,#193f72,#12686d);color:#fff;border-radius:16px;padding:18px;display:flex;gap:14px;align-items:center;justify-content:space-between}
.institute-promo p{font-size:14px;color:#e0f2fa}
.institute-promo .action{background:#fff;color:#164d68;flex-shrink:0}
.study-guide .guide-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.study-guide .guide-step{background:#f2f7fd;border:1px solid #d5e0ee;border-radius:13px;padding:14px;min-width:0}
.study-guide .guide-step strong{display:block;color:#214b83}
.study-guide .guide-step p{margin:7px 0;font-size:14px}
.study-guide .guide-rules{padding-inline-start:1.5rem}
.study-guide .guide-rules li{padding:8px 0;border-bottom:1px solid #e4edf4}
.study-guide .guide-rules li p{margin:4px 0}
.study-guide .ur{color:#245c65;font-size:15px}
#studentSampleResult #result{margin-top:0}
#studentSampleResult #status{margin:8px 0}
#studentSampleResult .actions{margin-top:12px}
#studentSampleResult .actions>a{flex:1 1 100%}
#studentSampleResult #progress{margin-bottom:10px}
#sampleRetry{width:100%}
@media(max-width:600px){.study-guide .guide-grid{grid-template-columns:1fr}.institute-promo{align-items:stretch;flex-direction:column}.institute-promo .action{width:100%}.student-download{padding:14px}}

/* Compact public entry; full builder available only when requested. */
[hidden]{display:none!important}
.hero.compact-hero{padding:22px 24px;margin-top:12px}
.compact-hero h1{font-size:clamp(30px,5vw,44px);margin:7px 0}
.compact-hero p{margin:5px 0;font-size:15px}
.compact-hero .hero-meta{margin:10px 0}
.compact-hero .hero-nav{margin-top:8px;font-size:13px;gap:6px 16px}
#resourceHub{padding:0;background:transparent;border:0;box-shadow:none}
.student-download{background:#fff;border:1px solid #c5d8eb;box-shadow:0 5px 20px #214b8310}
.student-download h3{color:#193d69}
.student-download .action{min-height:52px}
.student-download .hint{margin:0}
.institute-promo{background:linear-gradient(120deg,#203e77,#087c83)}
#boardResources .board-grid{gap:9px}
#boardResources .board-card{padding:12px;gap:5px}
#boardResources .board-card h3{font-size:16px}
#boardResources .board-card p{font-size:13px}
#boardResources .board-links a{font-size:13px;min-height:36px;padding:4px 0}
#boardResources .board-code{flex-basis:38px;height:38px}
#boardToggle{width:100%;margin-top:5px}
#studentGuide details{padding:10px 0}
#studentGuide details p{margin:8px 0}
#studentGuide summary{font-size:15px}
#studentGuide .guide-rules{margin:8px 0}
#studentGuide .guide-rules li{padding:5px 0}
#studentSampleResult #result{background:#f0faf9}
#studentSampleResult #result .share-area .hint{font-size:12px}
#builderPanel .back-link{display:inline-block;font-weight:700;margin-bottom:10px}
#advancedSettings{border:1px solid #d5e0ee;border-radius:12px;padding:13px;margin:20px 0}
#advancedSettings .fields{margin-top:12px}
#advancedSettings summary{font-size:15px}
@media(max-width:600px){.hero.compact-hero{padding:16px;margin:10px 12px 0}.compact-hero h1{font-size:30px}.compact-hero .hero-meta span{font-size:11px;padding:4px 8px}.compact-hero .hero-nav{gap:4px 12px}.institute-promo{flex-direction:row;align-items:center;padding:14px;gap:10px}.institute-promo .action{width:auto;min-width:80px;padding:10px 12px}.institute-promo h3{font-size:18px}.institute-promo p{font-size:13px}#resourceHub{margin-bottom:15px}#boardResources{padding:14px}#boardResources .board-card{padding:10px}#studentGuide{padding:14px}}

/* Revision 10 — richer light/dark contrast; PDF canvas is unaffected. */
:root{--ink:#142a45;--muted:#425671;--blue:#214fb0;--teal:#08736e;--line:#c4d4e7;--shadow:0 8px 24px #16345b12}
body{background:linear-gradient(160deg,#dce8f8 0,#edf4fc 350px,#f4f7fb 850px);color:var(--ink)}
.hero.compact-hero{background:linear-gradient(125deg,#102542 0%,#183e70 64%,#145b67 100%);border:1px solid #17365a;border-top:4px solid #49ddce;box-shadow:0 10px 24px #10254228}
.hero small{color:#8af2df}.hero small:before{background:#49ddce}
.hero h1{color:#fff}.hero p{color:#e0ebfa}.hero .ur{color:#b6f3ea}
.hero-meta span{background:#ffffff13;border-color:#ffffff48;color:#fff}
.hero-nav a{color:#d8e9ff}.hero-nav a:hover{color:#fff}
.hero a:focus-visible{outline-color:#85f3e4}
.student-download{border:1px solid #a8bfdc;border-top:4px solid #214fb0;background:#fff;box-shadow:0 8px 24px #16345b16}
.student-download h3{color:#142f58}.student-download>.ur{color:#12645f}
#getSample,#download,#make:not(:disabled){background:linear-gradient(115deg,#214fb0,#23479a);color:white;box-shadow:0 5px 12px #214fb028}
#view,.secondary{background:#e8effa;color:#183e70;border-color:#aebfda}
.institute-promo{background:linear-gradient(125deg,#113d47,#08665e);border:1px solid #08665e;border-left:4px solid #50dfbb;box-shadow:0 8px 20px #113d4720}
.institute-promo h3{color:#fff}.institute-promo p{color:#e0f7f2}
.institute-promo .action{background:#9bf3db;color:#103f39;border:1px solid #9bf3db}
#boardResources,#studentGuide,#builderPanel{border-color:#b7cbe2}
#boardResources h2,#studentGuide h2{color:#142f58}
#boardResources .board-card{background:#fff;border:1px solid #c3d2e6;border-left:4px solid #466eb3}
#boardResources .board-card:nth-child(2){border-left-color:#7253ad}
#boardResources .board-card:nth-child(3){border-left-color:#08736e}
#boardResources .board-code{background:#193c70;color:white}
#boardResources .board-card:nth-child(2) .board-code{background:#58418f}
#boardResources .board-card:nth-child(3) .board-code{background:#08665e}
#boardResources .board-links a{color:#214b98}
#boardToggle{background:#e4edf9;color:#193c70;border-color:#a8bfdc}
#studentGuide details{background:#f1f5fc;border:1px solid #c7d6e9;border-radius:10px;padding:12px;margin:8px 0}
#studentGuide details[open]{background:#fff;border-color:#7c9bc7}
#studentGuide summary{color:#193c70}
#studentGuide .guide-step{background:#e9f3f9;border-color:#b6d1df}
#settings>h2{color:#193c70}
#settings input:not([type=checkbox]),#settings select{background:#f5f8fd;border-color:#aebfd7}
#settings input:focus,#settings select:focus{background:#fff;border-color:#214fb0}
.theme{background:#fff;border-color:#b8c9e0}
.theme[aria-pressed=true]{background:#e3edff;border-color:#214fb0;color:#163b85}
#advancedSettings{background:#f0f5fc;border-color:#b8cbe3}
#result,#studentSampleResult #result{background:#e8f7f1;border-color:#86c9b4}
#resultText,.share-area h3{color:#125a49}
.share-whatsapp{background:#08734d}.share-facebook{background:#214fa7}
.site-end{background:#142c4a;border-radius:15px;color:#d8e6f9;padding:15px;margin-bottom:12px}
.site-end a{color:#a6e9e1}
@media(max-width:600px){.hero.compact-hero{border-radius:17px}.student-download,.institute-promo{border-radius:14px}#studentGuide details{padding:10px}}

/* Registered-school profile: use configuration instead of duplicate branding inputs. */
.saved-profile{display:grid;gap:5px;background:linear-gradient(120deg,#14345c,#12665f);color:#fff;border-radius:14px;padding:16px;margin-bottom:15px}.saved-profile strong{font-size:19px}.saved-profile p{margin:0;color:#e0effa;overflow-wrap:anywhere}.saved-profile small{color:#d0f7ed}.saved-profile a{color:#bcf6e4;font-size:13px;font-weight:700}.saved-profile a:focus-visible{outline-color:#fff}#classSlot{margin-bottom:12px}#lookupPanel{margin-top:12px}#lookupResult{overflow-wrap:anywhere}
