@font-face{font-family:'David Libre';src:url('/DavidLibre-Regular.ttf') format('truetype');font-weight:400;font-display:swap}
@font-face{font-family:'David Libre';src:url('/DavidLibre-Bold.ttf') format('truetype');font-weight:700;font-display:swap}
@font-face{font-family:'Dyslexic-Kriah';src:url('/Dyslexic-Kriah.otf') format('opentype');font-display:swap}
:root{--ink:#42392e;--muted:#736754;--gold:#967139;--border:#ded3c0;--hebrew-font:'David Libre'}
*{box-sizing:border-box}body{margin:0;color:var(--ink);font:14px/1.4 Arial,sans-serif;background:radial-gradient(ellipse at 50% 10%,#fff 0%,#fcfaf5 52%,#f0e9d8 100%);min-height:100vh}
.bg-pattern{position:fixed;inset:0;z-index:-1;opacity:.08;background-image:url("data:image/svg+xml,%3Csvg width='300' height='300' xmlns='http://www.w3.org/2000/svg'%3E%3Ctext x='20' y='70' font-size='45' fill='%238b7355'%3Eא%3C/text%3E%3Ctext x='190' y='230' font-size='60' fill='%238b7355'%3Eש%3C/text%3E%3C/svg%3E")}
a{color:#73501f;text-underline-offset:3px}button,input,select{font:inherit}button,a,input,select,summary{-webkit-tap-highlight-color:transparent}button{cursor:pointer;border-radius:6px;border:1px solid var(--border);padding:10px 15px;font-weight:700}button:disabled{opacity:.5;cursor:not-allowed}button:hover:not(:disabled){filter:brightness(.95)}:focus-visible{outline:3px solid #947139;outline-offset:3px}
.app-header{max-width:1440px;margin:auto;padding:12px 24px;display:flex;gap:12px;align-items:center;border-bottom:1px solid var(--border)}.brand img{width:72px;height:64px;object-fit:contain}.app-header h1{font:normal 25px/1.15 Georgia,serif;margin:4px 0 8px}.app-header p{margin:0}.eyebrow{color:#81643e;font-size:12px;letter-spacing:1.5px;font-weight:bold}.app-header nav{margin-left:auto;display:flex;gap:18px;font-size:14px;flex-wrap:wrap}
main{max-width:1440px;margin:16px auto;display:grid;grid-template-columns:minmax(350px,510px) minmax(0,1fr);gap:20px;padding:0 24px;align-items:start}.panel{background:rgba(255,255,255,.9);border:1px solid var(--border);border-radius:10px;margin-bottom:12px;padding:14px;box-shadow:0 5px 18px #70532d06}h2{font-size:18px;margin:0 0 8px;line-height:1.3}.step{display:inline-flex;align-items:center;justify-content:center;width:27px;height:27px;background:#eee5d6;color:#765727;border-radius:50%;margin-right:7px;font-size:14px}.panel p{margin:6px 0;font-size:14px}.upload-box{border:1px dashed #af956e;border-radius:7px;background:#fcfaf5;display:flex;flex-direction:column;align-items:center;text-align:center;padding:9px;gap:3px;cursor:pointer}.upload-box span{font-size:14px;color:var(--muted)}.upload-box .upload-symbol{font-size:25px;line-height:1.1;color:#806031}.upload-box input{font-size:14px;max-width:100%;margin-top:9px}.upload-links{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:12px;font-size:14px}.text-button{padding:0;background:none;border:0;color:#73501f;text-decoration:underline;font-weight:400;font-size:14px}.muted{color:var(--muted)}.small{font-size:13px!important}.hebrew{font-family:var(--hebrew-font),serif;font-size:25px;line-height:1.65}.mode-options{border:0;padding:0;margin:0;display:grid;gap:6px}.mode-card{display:flex;align-items:flex-start;gap:7px;padding:8px;border:1px solid var(--border);border-radius:7px;cursor:pointer}.mode-card:has(input:checked){background:#f5efdf;border-color:#a18251;box-shadow:inset 3px 0 #967139}.mode-card input{margin-top:5px;accent-color:var(--gold)}.mode-card span span{display:block;color:var(--muted);font-size:14px;margin-top:3px}.pair-picker{display:grid;grid-template-columns:1.2fr 1fr;gap:12px}.pair-picker button{grid-column:1/-1}.pair-picker label,.finish-fields label,.output-tools label{font-size:14px;font-weight:bold}select,input[type=text]{width:100%;border:1px solid var(--border);border-radius:5px;background:#fff;color:var(--ink);padding:6px;margin-top:3px;min-width:0}#group{font-family:'David Libre',serif;font-size:21px;padding:6px 10px}select:disabled{background:#f2eee6}.secondary{background:#f7f3e9;color:#624719}.pairs{display:flex;flex-wrap:wrap;gap:7px;margin-top:15px}.pair-chip{display:inline-flex;align-items:center;gap:8px;background:#f2eadb;border:1px solid #e1d1b5;border-radius:5px;padding:5px 8px;font-size:14px}.pair-chip button{border:0;background:transparent;padding:0 3px;font-size:21px;line-height:1.2}.finish-fields{display:grid;grid-template-columns:1fr 100px;gap:15px}.primary{background:#806132;color:#fff;border-color:#806132;width:100%;margin-top:10px;padding:9px}.preview-top{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 18px}.preview-top p{margin:0 0 4px}.preview-top h2{font:normal 27px Georgia,serif;margin:0}.badge{font-size:12px;padding:4px 10px;border:1px solid var(--border);border-radius:20px;background:#faf7ef;white-space:nowrap}.paper{background:white;border:1px solid #ddd4c4;box-shadow:0 10px 30px #5744240c;min-height:0;padding:18px;margin-bottom:14px;overflow-wrap:anywhere}.empty-preview{padding:65px 40px;text-align:center;border-top:4px solid #b59664}.empty-preview h3{font:normal 26px/1.4 Georgia,serif;margin:30px 0 15px}.empty-preview p{max-width:400px;margin:15px auto}.pattern-example{display:flex;justify-content:center;gap:16px;align-items:center;font:33px 'David Libre',serif;color:#846533}.pattern-example .example-divider{font:20px Arial;color:#baa27d}.preview-outline{margin:38px auto;max-width:350px;text-align:left}.preview-outline div{display:flex;gap:16px;padding:15px 0;border-bottom:1px solid #eee6d9}.preview-outline b{color:#a28454;font-size:14px}.preview-outline span{font-size:14px}.output-tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:8px;background:#f2ecdf;border:1px solid var(--border);border-radius:6px}.output-tools label{flex:1;min-width:120px}.output-tools input{accent-color:var(--gold)}.output-tools select{font-size:14px;padding:7px}.review-note{font-size:13px;color:var(--muted)}.worksheet-heading{border-bottom:2px solid #b69a6f;padding-bottom:15px;margin-bottom:20px}.worksheet-heading h2{font:normal 26px/1.3 Georgia,serif;margin:5px 0 10px}.worksheet-heading p{margin:7px 0;font-size:14px}.name-line{display:flex;gap:24px;justify-content:space-between;margin-top:22px;font-size:14px}.lesson{margin:24px 0;break-inside:avoid}.lesson h3{font-size:17px;margin-bottom:8px}.lesson p{font-size:15px}.model-table{border-collapse:collapse;width:100%;margin:10px 0}.model-table th,.model-table td{border:1px solid var(--border);padding:6px 12px;text-align:center}.model-table th{background:#f8f4ec;font-size:14px}.model-table td{font-family:var(--hebrew-font),serif;font-size:24px;line-height:1.55}.question{padding:17px 0;border-bottom:1px solid #e8e0d3;break-inside:avoid}.question-top{display:flex;gap:12px;align-items:baseline;font-size:14px;flex-wrap:wrap}.question-number{font-weight:bold;color:#7e6033}.question-prompt{display:flex;justify-content:space-between;align-items:baseline;gap:15px;margin-top:8px;flex-wrap:wrap}.answer-line{display:inline-block;min-width:180px;flex:1;border-bottom:1px solid #8a8174;height:40px;max-width:300px}.hint{font-size:13px;color:var(--muted);margin:8px 0 0}.key-answer{font-family:var(--hebrew-font),serif;font-size:27px;line-height:1.7}.error{color:#a12c23!important}footer{text-align:center;color:var(--muted);font-size:13px;padding:15px 20px 35px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}[hidden]{display:none!important}
@media(max-width:1100px){main{gap:22px;padding:0 22px;grid-template-columns:minmax(330px,420px) minmax(0,1fr)}.app-header nav{display:none}.paper{padding:16px}.pattern-example{gap:8px;font-size:27px}}
@media(max-width:800px){main{display:block;margin-top:20px;padding:0 16px}.app-header{padding:16px;gap:5px}.brand img{width:75px;height:75px}.app-header h1{font-size:25px}.app-header .eyebrow{font-size:10px}.app-header p{font-size:14px}.workspace{margin-top:30px}.empty-preview{min-height:400px;padding:30px 20px}.panel{padding:12px}.upload-links{flex-wrap:wrap}.paper{padding:14px}.preview-top h2{font-size:24px}.name-line{flex-wrap:wrap}.finish-fields{grid-template-columns:1fr 85px}}
@page{size:letter;margin:16mm 16mm 16mm .75in}
@media print{body{background:white;color:#000;font-size:12pt}.bg-pattern,.app-header,.builder,.preview-top,.output-tools,.review-note,footer,#empty-preview{display:none!important}main{display:block;margin:0;padding:0;max-width:none}.workspace{margin:0}.paper{display:block;border:0;box-shadow:none;padding:0;margin:0;min-height:0}.paper .eyebrow{color:#333}#answer-sheet{break-before:page}body[data-print=student] #answer-sheet{display:none!important}body[data-print=key] #student-sheet{display:none!important}body[data-print=key] #answer-sheet{break-before:auto;display:block!important}body[data-print=both] #answer-sheet{display:block!important}.lesson{break-inside:auto}.model-table tr,.question{break-inside:avoid}.model-table thead{display:table-header-group}h2,h3{break-after:avoid}.model-table td{font-size:21pt}.question{padding:13px 0}.hebrew{font-size:22pt}.answer-line{height:35px}.worksheet-heading{border-color:#777}}

.mix-toggle{display:flex;align-items:center;gap:8px;font-size:14px;margin:14px 0;cursor:pointer}.mix-toggle input{accent-color:var(--gold)}

.exercise-picker{border:0;padding:0;margin:0 0 12px;min-width:0}.exercise-picker legend{font-weight:700;font-size:15px}.exercise-picker label{display:flex;align-items:center;gap:7px;margin:5px 0;font-weight:400;font-size:14px}.exercise-picker input{accent-color:var(--gold);flex:none}.exercise-section{margin:28px 0}.exercise-section>h3{border-bottom:2px solid #b69a6f;padding-bottom:7px}.exercise-instructions,.self-check,.sample-label{font-size:14px}.sentence-line{font-family:var(--hebrew-font),serif;font-size:28px;line-height:2.2;margin:14px 0;overflow-wrap:normal}.sentence-blank{display:inline-block;width:145px;border-bottom:1px solid #777;margin:0 8px;vertical-align:baseline}.choice-line{display:flex;align-items:baseline;gap:24px;margin:15px 0;flex-wrap:wrap}.choice-options{display:inline-flex;gap:12px;align-items:baseline;flex-wrap:wrap}.choice-options bdi{padding:3px 9px}.choice-divider{font-size:24px}.writing-lines span{display:block;border-bottom:1px solid #aaa;height:43px;width:100%}.sample-label{font-style:italic;color:var(--muted)}
@media(max-width:800px){.sentence-line{font-size:25px}.sentence-blank{width:105px}.choice-line{gap:12px}.choice-options{gap:5px}}
@media print{.exercise-section{margin:20px 0}.sentence-line{font-size:22pt}.writing-lines span{height:13mm}.self-check{break-before:avoid}}

/* Compact worksheets: 14pt is the maximum on screen and in print. */
.paper{font-size:11pt;line-height:1.35}
.paper .hebrew,.paper .key-answer,.paper .sentence-line,.paper .model-table td{font-size:14pt;line-height:1.4}
.paper .worksheet-heading{padding-bottom:6px;margin-bottom:10px;border-bottom-width:1px}
.paper .worksheet-heading h2{font-size:14pt;margin:3px 0 5px}
.paper .worksheet-heading p{font-size:10pt;margin:3px 0}
.paper .eyebrow{font-size:8pt;letter-spacing:.8px}
.paper .name-line{font-size:10pt;margin-top:8px;gap:12px}
.paper .lesson{margin:10px 0}
.paper .lesson h3{font-size:11pt;margin:4px 0}
.paper .lesson p{font-size:10pt;margin:4px 0}
.paper .model-table{margin:5px 0}
.paper .model-table th,.paper .model-table td{padding:2px 8px}
.paper .model-table th{font-size:10pt}
.paper .exercise-section{margin:12px 0}
.paper .exercise-section>h3{font-size:12pt;margin:0 0 4px;padding-bottom:3px;border-bottom-width:1px}
.section-tense{font-size:10pt;font-weight:400}
.paper .exercise-instructions,.paper .self-check,.paper .sample-label{font-size:10pt;margin:4px 0;line-height:1.3}
.paper .question{display:grid;grid-template-columns:1.4em minmax(0,1fr);gap:5px;padding:5px 0;border:0;align-items:baseline}
.paper .question-number{font-size:10pt}
.question-content{min-width:0}
.question-tense{font-size:9pt;color:var(--muted);display:block;margin-bottom:1px}
.paper .question-prompt{justify-content:flex-start;gap:8px;margin:0;flex-wrap:wrap}
.paper .choice-line{gap:14px;margin:0;line-height:1.4}
.paper .choice-options{gap:5px}
.paper .choice-options bdi{padding:0 3px}
.paper .choice-divider{font-size:12pt}
.paper .sentence-line{margin:0;line-height:1.6}
.paper .sentence-blank{width:95px;margin:0 4px}
.paper .answer-line{height:21px;min-width:100px;max-width:190px;flex:0 1 190px}
.paper .hint{font-size:9pt;margin:2px 0 0;line-height:1.3}



.paper .writing-prompt{margin:0;font-size:10pt}
.paper .writing-lines span{height:25px}
.paper .root-cue{font-family:var(--hebrew-font),serif;font-size:12pt}
@media print{
    .paper{font-size:11pt;padding:0;margin:0;min-height:0}
    .paper .hebrew,.paper .key-answer,.paper .sentence-line,.paper .model-table td{font-size:14pt}
    .paper .question{padding:4px 0;break-inside:avoid}
    .paper .exercise-section{margin:10px 0}
    .paper .writing-lines span{height:7mm}
    .paper .answer-line{height:6mm}
}
.question-content:has(.question-tense){display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:10px;align-items:baseline}
.question-content>.question-tense{grid-column:1;grid-row:1}
.question-content:has(.question-tense)>.choice-line,.question-content:has(.question-tense)>.question-prompt,.question-content:has(.question-tense)>.sentence-line,.question-content:has(.question-tense)>.writing-prompt{grid-column:2;grid-row:1}
.question-content:has(.question-tense)>.hint,.question-content:has(.question-tense)>.writing-lines,.question-content:has(.question-tense)>.sample-label{grid-column:1/-1}
