@font-face{font-family:Thmanyah;src:url('/assets/thmanyah-regular.woff2') format('woff2');font-display:swap}
@font-face{font-family:Thmanyah;src:url('/assets/thmanyah-medium.woff2') format('woff2');font-weight:500;font-display:swap}
@font-face{font-family:Thmanyah;src:url('/assets/thmanyah-bold.woff2') format('woff2');font-weight:700;font-display:swap}
@font-face{font-family:Naskh;src:url('/assets/naskh.woff') format('woff');font-display:swap}
@font-face{font-family:Alyamama;src:url('/assets/alyamama.woff') format('woff');font-display:swap}
@font-face{font-family:Alyamama;src:url('/assets/alyamama-bold.woff') format('woff');font-weight:700;font-display:swap}
@font-face{font-family:ActivityTajawal;src:url('/assets/tajawal-light.woff') format('woff');font-display:swap}
@font-face{font-family:ActivityManuscript;src:url('/assets/manuscript-swash.otf') format('opentype');font-display:swap}
@font-face{font-family:ActivityMath;src:url('/assets/activity-math.woff2') format('woff2');font-display:swap}

:root{color-scheme:light;--ink:#14362f;--green:#164c3f;--green-2:#226554;--muted:#53675f;--border:#dbe5df;--soft:#eef4ef;--base:#f4f6f1;--accent:#8e303c}
*,*::before,*::after{box-sizing:border-box}
body{margin:0;background:var(--base);color:var(--ink);font:1rem/1.58 Thmanyah,Arial,sans-serif}
button,input,textarea,select{font:inherit}
button,a,input,select,summary,textarea{touch-action:manipulation}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #397f6f;outline-offset:2px}
a{color:inherit}
.activity-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:74px;padding:10px clamp(15px,4.4vw,68px);border-bottom:1px solid var(--border);background:#fff}
.activity-brand{display:flex;align-items:center;gap:10px;text-decoration:none}
.activity-brand img{height:42px;width:42px;object-fit:contain}
.activity-brand span{display:grid;line-height:1.27}
.activity-brand small{color:var(--muted);font-size:.87rem}
.activity-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:42px;padding:8px 13px;border:1px solid var(--border);border-radius:10px;text-decoration:none;white-space:nowrap;font-weight:700;font-size:.91rem;cursor:pointer}
.activity-button.quiet{background:#fff;color:var(--green)}
.activity-button.quiet:hover{background:var(--soft);border-color:#97b2a5}
.activity-button.primary{border-color:var(--green);background:var(--green);color:#fff}
.activity-button.primary:hover{background:var(--green-2)}
.activity-button[aria-pressed=true]{background:#dceae1;border-color:#74998a}
.activity-button:disabled{cursor:not-allowed;opacity:.48}
.activity-button.compact{min-height:34px;padding:5px 8px;font-size:.84rem}

#activityApp{max-width:1580px;margin:0 auto;padding:20px clamp(12px,3.8vw,58px) 72px}
.activity-nav{display:flex;gap:7px;overflow:auto;scrollbar-width:thin;padding:2px 2px 8px}
.activity-nav a{display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;border:1px solid var(--border);border-radius:9px;background:#fff;color:var(--green);font-size:.89rem;font-weight:700;padding:8px 10px;text-decoration:none}
.activity-nav a[aria-current=page]{color:#fff;border-color:var(--green);background:var(--green)}
.activity-nav a:not([aria-current]):hover{background:var(--soft)}
.activity-nav svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round}
.activity-intro{display:flex;align-items:end;justify-content:space-between;gap:18px;margin:20px 0 21px}
.activity-intro h1{margin:0;font-size:clamp(1.85rem,3.4vw,3.25rem);line-height:1.22;letter-spacing:-.03em;color:var(--ink)}
.activity-intro p{color:var(--muted);margin:8px 0 0}
.intro-actions,.editor-actions,.preview-actions,.item-controls{display:flex;flex-wrap:wrap;gap:7px}
.preview-shortcut{display:none}
.activity-workspace{display:grid;grid-template-columns:minmax(360px,.86fr) minmax(0,1.14fr);align-items:start;gap:17px}
.activity-editor{display:grid;gap:14px;min-width:0}
.editor-card,.activity-preview{border:1px solid var(--border);border-radius:16px;background:#fff;box-shadow:0 8px 22px #173d2e08}
.editor-card{padding:17px}
.editor-title{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:5px 11px;margin-bottom:13px}
.editor-title h2,.preview-header h2{margin:0;color:var(--ink);font-size:1.18rem;line-height:1.35}
.editor-title small{color:var(--muted);font-size:.82rem}
.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:10px;row-gap:9px}
.field-grid .wide{grid-column:1/-1}
.editor-field{display:grid;align-content:start;gap:4px;min-width:0}
.editor-field>span,.option-editor legend{font-size:.9rem;font-weight:700}
.editor-card :is(input:not([type=radio]):not([type=checkbox]),select,textarea){width:100%;min-width:0;min-height:40px;border:1px solid #ccdcd3;border-radius:8px;background:#fbfdfb;color:var(--ink);padding:6px 9px}
.editor-card input::placeholder,.editor-card textarea::placeholder{color:#63766d;opacity:1}
.editor-card textarea{resize:vertical;min-height:58px}
.editor-card select{appearance:none;padding-inline-end:28px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 7'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23164c3f' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:11px 7px;background-position:left 9px center}
.editor-card :is(#identityFields,.observation-settings){margin-top:13px;border:1px solid var(--border);border-radius:10px;padding:0 10px;background:#fbfdfb}
.editor-card :is(#identityFields,.observation-settings) summary{padding:7px 0;font-size:.9rem;font-weight:700;cursor:pointer}
.editor-card #identityFields[open]{padding-bottom:10px}
.tool-fields{margin-top:12px;padding-top:10px;border-top:1px solid var(--border)}
.tool-fields h3{margin:0 0 8px;font-size:1rem}
.observation-settings>div{display:grid;grid-template-columns:minmax(78px,1fr) 1fr 1fr;align-items:center;gap:5px;margin-bottom:5px}
.observation-settings>div b{font-size:.83rem}
.observation-settings>div:last-child{margin-bottom:9px}
.question-count{background:var(--soft);color:var(--green);border-radius:8px;padding:3px 8px;font-weight:700;font-size:.83rem}
.generation-panel{display:grid;gap:8px;padding:10px;margin-bottom:12px;border:1px solid var(--border);border-radius:11px;background:var(--soft)}
#generationSummary{font-size:.91rem;color:#294d41}
.activity-status{margin:0;font-size:.9rem;color:var(--green);line-height:1.45}
.activity-status:empty{display:none}
.question-list{display:grid;gap:7px}
.question-card{border:1px solid var(--border);border-radius:10px;background:#fff;overflow:hidden}
.question-card>summary{display:flex;align-items:center;gap:10px;justify-content:space-between;position:relative;cursor:pointer;list-style:none;padding:8px 10px 8px 25px;min-height:40px}
.question-card>summary::-webkit-details-marker{display:none}
.question-card>summary::after{content:'';display:block;position:absolute;inset-inline-end:11px;width:7px;height:7px;border-bottom:1.5px solid var(--green);border-right:1.5px solid var(--green);transform:rotate(45deg)}
.question-card[open]>summary::after{transform:rotate(225deg)}
.question-card>summary span{font-size:.82rem;color:var(--muted)}
.question-card[open]>summary{background:#f1f7f3;border-bottom:1px solid var(--border)}
.question-fields{display:grid;gap:8px;padding:10px}
.item-controls{justify-content:flex-end}
.item-source,.empty-editor{color:var(--muted)}
.option-editor{display:grid;gap:6px;border:1px solid var(--border);padding:7px;border-radius:8px;margin:0;min-inline-size:0}
.option-row{display:grid;grid-template-columns:20px minmax(0,1fr) auto;gap:6px;align-items:center}
.option-row input[type=radio]{width:16px;height:16px;accent-color:var(--green)}
.option-editor>button{justify-self:start}

.activity-preview{position:sticky;top:12px;min-width:0;overflow:hidden}
.preview-header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;border-bottom:1px solid var(--border)}
.preview-header p{margin:2px 0 0;color:var(--muted);font-size:.86rem}
.preview-header p.warning{color:#8a2735;font-weight:700}
.preview-stage{display:flex;justify-content:center;align-items:start;padding:12px;background:#e2e9e5;overflow:hidden}
#previewSizer{position:relative;flex-shrink:0}
#previewSheet{position:absolute;inset:0 0 auto auto;width:210mm;transform-origin:top right}
#previewSheet>.activity-sheet{box-shadow:0 7px 30px #142c2440}
#activityPrint{display:none}
.activity-dialog{max-width:min(440px,calc(100vw - 28px));width:100%;border:1px solid var(--border);border-radius:13px;background:#fff;padding:18px;color:var(--ink)}
.activity-dialog::backdrop{background:#132e28a1}
.activity-dialog h2,.activity-dialog p{margin:0 0 10px}

/* The same CSS draws the fixed-size paper in preview and in the browser's PDF. */
.activity-sheet{--paper-ink:#172f2b;--paper-green:#164c3f;--paper-wine:#8c3040;--paper-line:#d5e0da;--paper-faint:#f3f7f4;--sheet-font:17px;--sheet-gap:10px;--sheet-pad:10px;display:flex;flex-direction:column;width:210mm;height:296.8mm;padding:9mm 10mm 7mm;overflow:hidden;background:#fff;color:var(--paper-ink);font:var(--sheet-font)/1.44 Thmanyah,Naskh,Arial,sans-serif}
.activity-sheet[data-density=compact]{--sheet-font:15.5px;--sheet-gap:8px;--sheet-pad:7px}
.activity-sheet[data-density=tight]{--sheet-font:14px;--sheet-gap:5px;--sheet-pad:5px}
.activity-sheet[data-audience=learning],.activity-sheet[data-audience=language]{--sheet-font:18px}
.activity-sheet:is([data-audience=learning],[data-audience=language])[data-density=compact]{--sheet-font:16.5px}
.activity-sheet:is([data-audience=learning],[data-audience=language])[data-density=tight]{--sheet-font:15px}
.sheet-body{min-height:0;flex:1 1 auto;overflow:hidden}
.sheet-content{display:grid;gap:var(--sheet-gap);overflow-wrap:anywhere}
.sheet-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;border-block-start:1px solid var(--paper-line);border-inline-start:1px solid var(--paper-line);background:#f9fbf9}
.sheet-field{min-width:0;border-inline-end:1px solid var(--paper-line);border-block-end:1px solid var(--paper-line);padding:4px 7px;display:grid;gap:1px;font-size:.89em}
.sheet-field b,.sheet-footer b{color:var(--paper-green)}
.sheet-field>span{min-height:1.25em}
.sheet-dots{display:inline-block;inline-size:84%;max-inline-size:140px;border-bottom:1px dotted #879d92;height:.78em;vertical-align:baseline}
.sheet-instructions{margin:0;font-size:.91em;color:#364d43}
.sheet-passage{margin:0;border:1px solid var(--paper-line);padding:var(--sheet-pad);background:#f3f7f4;border-radius:7px}
.sheet-passage h3,.sheet-section h3,.sheet-observation h3{margin:0;font-size:.92em;color:var(--paper-green)}
.sheet-passage p{margin:3px 0 0;font:1.17em/1.55 Naskh,Thmanyah,serif;white-space:pre-wrap}
.bank-context{white-space:pre-wrap;margin:.35rem 0;line-height:1.6}
#openActivityQuestionReview[hidden]{display:none}
.sheet-questions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--sheet-gap);align-items:stretch}
.sheet-question,.sheet-section{grid-column:1/-1;min-width:0}
.sheet-question.sheet-half,.sheet-section.sheet-half{grid-column:auto}
.sheet-question{padding:var(--sheet-pad);padding-block:calc(var(--sheet-pad) + var(--sheet-supplement,0px));border:1px solid var(--paper-line);border-radius:8px;display:grid;align-content:start;gap:5px}
.sheet-prompt{display:grid;grid-template-columns:auto minmax(0,1fr);gap:7px;align-items:start}
.sheet-prompt p{margin:0;white-space:pre-wrap;font-weight:700}
.sheet-no{display:grid;place-items:center;width:1.47em;height:1.47em;border-radius:4px;background:var(--paper-green);color:#fff;font-size:.86em;line-height:1}
.sheet-section{padding:5px 9px;background:#eaf1ec;border-radius:5px}
.sheet-section p{margin:2px 0 0;font-size:.93em;white-space:pre-wrap}
.sheet-blank{display:inline-block;border-bottom:1px dotted #658575;vertical-align:baseline;min-width:66px;height:.93em;margin-inline:2px}
.sheet-options,.sheet-order,.sheet-match{display:grid;gap:3px;font-size:.95em}
.sheet-options{grid-template-columns:repeat(2,minmax(0,1fr))}
.sheet-options>div,.sheet-order>div{display:flex;gap:5px;align-items:baseline;min-width:0}
.sheet-options>div span:last-child,.sheet-order>div span{min-width:0}
.sheet-option-mark{flex:0 0 1.35em;min-height:1.35em;color:var(--paper-green);font-weight:700;text-align:center;border:1px solid var(--paper-line);border-radius:4px;line-height:1.15}
.sheet-match>div{display:grid;grid-template-columns:minmax(0,1fr) minmax(12px,19%) minmax(0,1fr);align-items:center;gap:5px}
.sheet-match>div i,.sheet-order>div i{border-bottom:1px dotted #8ca196;min-width:14px}
.sheet-lines{display:grid}
.sheet-lines i{min-height:1.5em;border-bottom:1px solid #a9bbb1}
.sheet-writing-area{padding:1px 9px 7px;border:1px solid #adbbb4;border-radius:6px}
.sheet-key{font-size:.95em;color:#305a4e;white-space:pre-wrap}
.sheet-observation h3{margin:0 0 4px}
.sheet-observation table{width:100%;border-collapse:collapse;font-size:.84em}
.sheet-observation :is(td,th){border:1px solid var(--paper-line);padding:3px 7px;text-align:right}
.sheet-observation thead th{background:var(--paper-green);color:#fff}
.sheet-observation tbody th{background:var(--paper-faint)}
.sheet-observation .sheet-dots{width:75%}
.sheet-footer{margin-top:7px;display:grid;grid-template-columns:1fr auto 1fr;align-items:start;gap:8px;padding-top:5px;border-top:1px solid var(--paper-line);font-size:12px;color:#304d42}
.sheet-footer>a{color:var(--paper-wine);text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
.sheet-footer>span{min-width:0;overflow-wrap:anywhere}
.sheet-footer>span:last-child{text-align:left}
.sheet-footer .sheet-dots{width:54px}
.sheet-followup{width:100%;border:2px solid #17274a;border-collapse:collapse;table-layout:fixed;color:#131919;font:13px/1.2 Thmanyah,Arial,sans-serif;margin-top:5px}
.sheet-followup .follow-description{width:29%}
.sheet-followup .follow-encouragement{width:37%}
.sheet-followup .follow-development{width:34%}
.sheet-followup .follow-top th{height:25px;padding:2px 6px;text-align:right;border-bottom:1px solid #131919;font-size:12px}
.follow-top th div{display:flex;align-items:center;gap:7px}
.follow-top th:nth-child(2) div{justify-content:space-between}
.follow-top th div>i{display:block;width:12px;height:12px;border-radius:50%;background:#c8d6cb}
.follow-score-empty{display:inline-block;width:25px;border-bottom:1px dotted #596a61}
.follow-headings th{height:23px;background:#c8d6cb;border:1px solid #131919;font-size:13px;text-align:center}
.sheet-followup tbody td{border:1.4px dashed #161b18;vertical-align:top;padding:3px 6px}
.sheet-followup tbody ul{list-style:none;padding:0;margin:0;display:grid;gap:2px}
.sheet-followup tbody li{display:grid;grid-template-columns:11px minmax(0,1fr);align-items:start;gap:4px;overflow-wrap:anywhere;font-size:1em;line-height:1.32}
.follow-check{width:9px;height:9px;border:1px solid #242c27;border-radius:2px;display:grid;place-items:center;font:700 8px/1 Arial,sans-serif;margin-top:2px}
.sheet-followup tfoot :is(th,td){border:1.4px dashed #161b18;padding:2px 6px;text-align:right}
.sheet-followup tfoot th{text-align:center}
.sheet-followup tfoot :is(th,td:nth-child(2)){background:#c8d6cb}
.sheet-followup tfoot .sheet-dots{width:58px}
.follow-editor{display:grid;gap:9px}
.follow-column{border:1px solid var(--border);border-radius:8px;padding:0 7px}
.follow-column summary{cursor:pointer;font-weight:700;padding:6px}
.follow-row{display:grid;grid-template-columns:19px minmax(0,1fr) auto;gap:5px;align-items:center;margin-bottom:5px}
.follow-row input[type=checkbox]{accent-color:var(--green);width:16px;height:16px}
.follow-column .activity-button[data-follow-action=add]{margin-bottom:7px}
.curriculum-note{grid-column:1/-1;margin:0;color:var(--muted);font-size:.84rem}

@media(max-width:1050px){
  .activity-workspace{grid-template-columns:minmax(330px,.92fr) minmax(0,1.08fr);gap:12px}
  .activity-intro{align-items:start}
  .preview-header{align-items:start;flex-wrap:wrap}
}
@media(max-width:810px){
  #activityApp{padding-top:12px}
  .activity-workspace{grid-template-columns:minmax(0,1fr)}
  .activity-preview{position:static}
  .preview-shortcut{display:inline-flex}
  .activity-intro{flex-direction:column;gap:10px;margin-block:14px}
  .preview-header{align-items:center}
  .preview-stage{padding:8px}
}
@media(max-width:425px){
  .activity-bar{min-height:62px}
  .activity-brand img{height:36px;width:36px}
  .editor-card{padding:11px}
  .field-grid{column-gap:7px}
  .activity-button{padding-inline:9px}
  .preview-header{gap:5px;padding:9px}
}
@media print{
  @page{size:A4;margin:0}
  html,body{margin:0!important;padding:0!important;width:210mm!important;height:296.8mm!important;min-height:0!important;background:#fff!important}
  body>*{display:none!important}
  body .global-site-menu,body .global-mobile-dock{display:none!important}
  body>#activityPrint{display:block!important;margin:0!important;padding:0!important}
  .activity-sheet{margin:0!important;box-shadow:none!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
