@font-face{font-family:Cairo;src:url('cairo-400.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:Cairo;src:url('cairo-600.woff2') format('woff2');font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:Cairo;src:url('cairo-800.woff2') format('woff2');font-weight:800;font-style:normal;font-display:swap}
:root{
 --petrol:#103f4b;--petrol-dark:#0a3542;--petrol-mid:#176373;
 --teal:#247e80;--aqua:#45a8a2;--mint:#dbece8;
 --light:#f3f9f7;--line:#d4e5e1;--text:#204854;--muted:#618184;
 --font:Cairo,Tahoma,sans-serif;
}
*{box-sizing:border-box}
html{direction:rtl;-webkit-text-size-adjust:100%}
body{margin:0;background:#f1f5f4;color:var(--text);font:400 12px/1.65 var(--font)}
button,input,textarea,select{font:inherit;color:inherit}
button{cursor:pointer}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #d2b077;outline-offset:2px}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.workspace{width:min(100%,865px);margin:23px auto 40px;padding:0 12px}
.paper{position:relative;width:210mm;max-width:100%;min-height:297mm;margin-inline:auto;background:#fff;border:1px solid #d8e5e1;border-radius:12px;overflow:hidden;box-shadow:0 18px 48px #123f4b17}
/* One centered three-part identity, rather than distant independent blocks. */
.sheet-header{position:relative;width:100%;min-height:35mm;height:35mm;padding:3mm 6mm;display:flex;align-items:center;justify-content:center;background:var(--petrol-dark);color:white}
.sheet-header::before{content:"";position:absolute;top:0;left:0;right:0;height:2.5mm;background:linear-gradient(90deg,#3389b0 0%,#2d9d9c 50%,#42ac85 100%)}
.brand-area{direction:rtl;display:grid;grid-template-columns:26mm 1.3px 43mm;align-items:center;justify-content:center;column-gap:2.6mm;width:max-content;max-width:100%;margin-inline:auto}
.brand-logo{width:26mm;height:24mm;display:flex;align-items:center;justify-content:center;min-width:0}
.brand-logo img{display:block;width:26mm;height:23mm;object-fit:contain}
.brand-separator{width:1.3px;height:18mm;background:linear-gradient(to bottom,#5cb7ac,#58a1c8);border-radius:4px}
.institution{width:43mm;max-width:100%;display:grid;gap:0;text-align:center;min-width:0}
.brand-input{min-width:0}.brand-input input{width:100%;height:27px;display:block;padding:1px 2px;text-align:center;border:1px solid transparent;border-radius:4px;background:transparent;color:#fff;font-size:13px;font-weight:800;line-height:1.6}
.brand-input:last-child input{font-size:11.8px;color:#a6e0de;font-weight:600}
.brand-input input::placeholder{color:#d4e8e4;opacity:.85}.brand-input input:focus{background:#ffffff14;border-color:#65b8ad;outline:none}
.sheet-main{padding:5mm 9mm 5mm}
.report-title{display:grid;place-items:center;text-align:center;min-height:15mm;margin-bottom:3.1mm;padding:6px 8px;background:linear-gradient(113deg,#0d4351,#1b6672);border:1px solid #236774;border-radius:9px}
.title-inline{display:flex;align-items:center;justify-content:center;min-width:0;max-width:100%;font-size:18px;line-height:1.6;font-weight:800;text-align:center;margin:0}
.title-editor{display:flex;align-items:center;justify-content:center;gap:4px;max-width:100%;min-width:0;flex-wrap:wrap}
.title-prefix{color:#fff;white-space:nowrap}
.title-fill{display:inline-flex;align-items:center;justify-content:flex-start;min-width:0;max-width:100%;width:auto}
.title-fill input{display:inline-block;min-width:84px;max-width:100%;height:34px;padding:2px 5px;border:0;border-bottom:1px solid #d9ba82;border-radius:0;background:transparent;color:#f2deb4;font-weight:800;line-height:1.45;text-align:right;direction:rtl}
.title-fill input::placeholder{color:#c8dfdc;font-size:11px;font-weight:600}
.title-fill input:focus{outline:none;background:#ffffff10;border-bottom-color:#f0dfbf}
.print-title-combined{display:none}
.form-section{margin-top:3mm;min-width:0}
.program-section{margin-top:2mm}
/* Center the entire label. No decorative 01/02/03 to break RTL centering. */
table{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0;direction:rtl}
th,td{border:1px solid var(--line);text-align:center;vertical-align:middle;overflow-wrap:anywhere}
th{font-weight:800;line-height:1.6}
/* Each program row now contains two adjacent label/answer pairs. */
.program-table .program-label-col{width:20%}
.program-table .program-value-col{width:30%}
.program-table th{padding:7px 5px;font-size:10.1px;color:#205966;background:linear-gradient(112deg,#e4f2ef,#f0f8f6)}
.program-table td{padding:4px 5px;background:linear-gradient(118deg,#fff,#fcfefd)}
.program-table tr:nth-child(even) th{background:linear-gradient(112deg,#eaf5f3,#f4faf8)}
.program-table tr:nth-child(even) td{background:#fcfefd}
.program-table th label{display:block;max-width:100%;text-align:center;line-height:1.75}
textarea{width:100%;max-width:100%;min-width:0;min-height:28px;padding:4px 6px;display:block;resize:none;overflow:hidden;field-sizing:content;border:1px solid transparent;border-radius:5px;background:transparent;color:#204b57;text-align:center;font-size:11.4px;font-weight:600;line-height:1.6}
textarea:hover{background:#f4f9f7;border-color:#cfe4dc}
textarea:focus{outline:none;background:#fff;border-color:#5ea9a4;box-shadow:0 0 0 2px #2c948619}
textarea[aria-invalid="true"],input[aria-invalid="true"],select[aria-invalid="true"]{background:#fff1ef!important;border-color:#b94c48!important}
.target-table thead th,.results-table thead th{padding:7px 4px;font-size:10.7px;color:#205865;border-color:var(--line);background:linear-gradient(111deg,#e6f3f1,#f0f8f6 55%,#e7f2f0)}
.target-table tbody td,.results-table tbody td{background:linear-gradient(180deg,#fff,#fcfefd);padding:4px}
.target-table tbody textarea{min-height:38px}.results-table tbody textarea{min-height:42px}
.date-strip,.measurement-tool,.completion-row{width:100%;min-width:0;min-height:38px;display:grid;grid-template-columns:35% 65%;direction:rtl;border:1px solid var(--line)}
.date-strip{margin-top:7px;border-radius:7px;overflow:hidden}.measurement-tool{margin-bottom:7px;border-radius:7px;overflow:hidden}.completion-row{margin-top:7px;border-radius:7px;overflow:hidden}
.date-label,.measurement-tool>label,.completion-row>label{display:flex;align-items:center;justify-content:center;gap:5px;text-align:center;padding:6px 8px;border-left:1px solid var(--line);font-size:10.7px;line-height:1.65;font-weight:800;color:#205966;background:linear-gradient(110deg,#e4f2ef,#f0f8f6)}
.date-calendar{font-size:9px;font-weight:600;color:#547b81}
.date-content,.measurement-input,.completion-input{min-width:0;display:flex;align-items:center;justify-content:center;padding:3px 7px;background:#fff}
.date-selects{display:flex;align-items:center;justify-content:center;gap:4px;direction:rtl;width:100%;white-space:nowrap}
.date-selects>span{color:#83a3a0}
.date-selects select{min-width:0;max-width:33%;height:32px;text-align:center;text-align-last:center;direction:rtl;background:#f9fcfb;border:1px solid #c5dfd8;border-radius:6px;color:#245a64;padding:1px 4px;font-size:10.5px;font-weight:600}
.date-selects #day{width:25%}.date-selects #month{width:34%}.date-selects #year{width:32%}
.measurement-input,.completion-input{padding:3px 6px}.measurement-input textarea,.completion-input textarea{min-height:28px}
.notes-section{display:grid;gap:7px;margin-top:3mm}
.note{border:1px solid var(--line);border-radius:8px;overflow:hidden;background:#fff}
.note>label{display:flex;align-items:center;justify-content:center;padding:6px 9px;background:linear-gradient(105deg,#e4f2ef,#f0f8f6 55%,#e7f3f0);border-bottom:1px solid var(--line);color:#205966;font-weight:800;font-size:10.7px;text-align:center;line-height:1.6}
.note textarea{min-height:37px;text-align:center;padding:5px 9px;font-weight:400}
.signatures{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:3.5mm}
.signature{display:flex;flex-direction:column;min-width:0;border:1px solid var(--line);border-radius:8px;overflow:hidden;text-align:center}
.signature label,.signature:last-child label{padding:6px;background:linear-gradient(110deg,#195a67,#277d7d);color:#fff;border-bottom:1px solid #679b9c;font-weight:800;font-size:11px}
.signature textarea{min-height:35px}
.sheet-footer{min-height:7mm;margin-top:3mm;background:var(--petrol-dark);position:relative}
.sheet-footer .footer-accent{height:2.5px;width:100%;display:block;background:linear-gradient(90deg,#3389b0,#2d9d9c,#42ac85)}
.print-value{display:none}
.control-panel{width:210mm;max-width:100%;margin:14px auto 0;padding:12px 15px;border:1px solid #d6e6df;border-radius:12px;background:#fff}
.actions{display:flex;justify-content:center;gap:9px;flex-wrap:wrap}
.actions button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;border-radius:9px;padding:8px 14px;font-size:11px;font-weight:800;border:1px solid transparent}
.actions svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.export-btn{color:#fff;background:linear-gradient(110deg,#124956,#247b78)}
.reset-btn{color:#ae4040;border-color:#ebc9c2!important;background:#fff1ef}
.design-btn{color:#416968;border-color:#d5e6dd!important;background:#eef6f2}
.helper-text{margin:9px 0 0;text-align:center;color:#6f8785;font-size:10px}
.error-msg{margin:8px auto 0;padding:9px;border-radius:8px;background:#fff1ef;color:#a43130;text-align:center;font-size:11px;font-weight:800}.error-msg[hidden]{display:none!important}
@media(max-width:760px){
 .workspace{margin:10px auto 20px;padding:0 8px}.paper{width:100%;min-height:0;border-radius:11px}
 .sheet-header{height:100px;min-height:100px;padding:7px 4px}
 .brand-area{grid-template-columns:70px 1px minmax(0,134px);column-gap:7px}
 .brand-logo{width:70px;height:64px}.brand-logo img{width:69px;height:61px}.brand-separator{height:51px}.institution{width:134px}
 .brand-input input{font-size:10.5px;height:24px}.brand-input:last-child input{font-size:9.6px}
 .sheet-main{padding:12px 10px}.title-inline{font-size:15px}.title-fill input{height:30px}
 .target-table thead th,.results-table thead th{font-size:9.4px}
 .program-table th{font-size:9.6px}.date-label,.measurement-tool>label,.completion-row>label{font-size:9.8px;padding:4px}
 .note>label{font-size:10px}
}
@media(max-width:390px){
 .sheet-main{padding:10px 7px}.report-title{padding:5px 3px}
 .title-inline{font-size:14px}.title-editor{gap:2px}.title-fill input{padding:2px}
 .program-table .program-label-col{width:22%}.program-table .program-value-col{width:28%}
 .program-table th{padding:4px 2px;font-size:8.35px}.program-table td{padding:2px}
 .program-table textarea{font-size:9.2px;padding:3px 2px}
 .date-strip,.measurement-tool,.completion-row{grid-template-columns:39% 61%}
 .date-label,.measurement-tool>label,.completion-row>label{font-size:9px;padding:3px}
 .date-calendar{font-size:8px}.date-selects{gap:2px}.date-selects select{font-size:9px;padding-inline:1px}
 .target-table thead th,.results-table thead th{font-size:9px}
 .actions button{flex:1 1 130px}.actions .design-btn{flex-basis:100%}
}
/* Prevent Chromium's automatic URL/date/title running header.
   A zero top margin on the first page makes the petrol masthead flush with the sheet's sides.
   Subsequent pages retain a small top safe margin. Only the intentional bottom-left pagination is printed. */
@page{size:A4 portrait;margin:7mm 0 11mm;
 @bottom-left{content:"الصفحة " counter(page) " من " counter(pages);font:600 8pt Cairo,Tahoma,sans-serif;color:#f4f9f6;background:#0a3542;border-top:.7mm solid #318ea9;padding-left:7mm}
 @bottom-center{content:"";background:#0a3542;border-top:.7mm solid #2d9d9c}
 @bottom-right{content:"";background:#0a3542;border-top:.7mm solid #42ac85}
}
@page:first{margin-top:0}
@media print{
 *,*::before,*::after{print-color-adjust:exact!important;-webkit-print-color-adjust:exact!important;box-shadow:none!important;text-shadow:none!important}
 html,body,.workspace,form,.paper{width:100%!important;max-width:none!important;min-width:0!important;height:auto!important;min-height:0!important;overflow:visible!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:#fff!important}
 body{font-family:Cairo,Tahoma,sans-serif!important;color:var(--text)!important}
 .control-panel,.helper-text,.error-msg{display:none!important}
 .sheet-header{width:100%!important;min-width:0!important;height:35mm!important;min-height:35mm!important;max-height:35mm!important;padding:3mm 6mm!important;margin:0 0 4mm!important;border:0!important;border-radius:0!important;background:#0a3542!important;break-inside:avoid-page!important}
 .sheet-header::before{height:2.5mm!important}
 .brand-area{grid-template-columns:26mm 1.3px 43mm!important;column-gap:3.3mm!important;width:max-content!important;max-width:100%!important;min-width:0!important;align-items:center!important;justify-content:center!important;margin:auto!important}
 .brand-logo{width:26mm!important;height:23mm!important}.brand-logo img{width:26mm!important;height:23mm!important}
 .brand-separator{height:18mm!important;width:1.3px!important}.institution{width:43mm!important;max-width:43mm!important}
 .brand-input input{display:none!important}
 .brand-input .print-value{display:block!important;min-height:6mm!important;padding:0!important;margin:0!important;text-align:center!important;color:#fff!important;font-size:10.2pt!important;font-weight:800!important;line-height:1.6!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important;break-inside:avoid!important}
 .brand-input:last-child .print-value{font-size:9.4pt!important;color:#a6e0de!important;font-weight:600!important}
 .sheet-main{width:100%!important;max-width:none!important;margin:0!important;padding:0 9mm 5mm!important}
 .report-title{min-height:12mm!important;margin:0 0 2.5mm!important;padding:1.4mm 2mm!important;border-radius:2mm!important;background:linear-gradient(110deg,#0e4050,#176373)!important;break-inside:avoid-page!important}
 .title-inline{display:block!important;margin:0!important;padding:0!important;font:800 14.2pt/1.55 Cairo,Tahoma,sans-serif!important;text-align:center!important}
 .title-editor{display:none!important}
 .print-title-combined{display:inline!important;color:#fff!important;font:inherit!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important;unicode-bidi:plaintext!important}
 .form-section{margin-top:2.5mm!important}
 .program-section{margin-top:1.5mm!important}
 table{width:100%!important;table-layout:fixed!important;border-collapse:collapse!important}
 th,td{border-color:#c6ddd7!important;vertical-align:middle!important;text-align:center!important;overflow-wrap:anywhere!important}
 .program-table .program-label-col{width:20%!important}.program-table .program-value-col{width:30%!important}
 .program-table th{width:auto!important;padding:1.1mm .8mm!important;font-size:7.9pt!important;line-height:1.55!important}.program-table td{width:auto!important;padding:0!important}
 .target-table thead th,.results-table thead th{padding:1.4mm 1mm!important;font-size:8.2pt!important}
 .target-table tbody td,.results-table tbody td{padding:0!important}
 /* Let extraordinarily long answer content flow across page boundaries instead of forcing blank pages. */
 .program-table tbody tr,.results-table tbody tr{break-inside:auto!important}
 .target-table tr{break-inside:avoid-page!important}
 textarea,input,select{display:none!important}
 .print-value{display:block!important;min-height:5mm!important;padding:1mm 1.3mm!important;text-align:center!important;direction:rtl!important;font:600 8.6pt/1.5 Cairo,Tahoma,sans-serif!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important;word-break:normal!important}
 .program-table .print-value{min-height:5.5mm!important}
 .target-table .print-value{min-height:8mm!important}
 .results-table .print-value{min-height:10mm!important}
 .date-strip,.measurement-tool,.completion-row{grid-template-columns:35% 65%!important;min-height:8mm!important;break-inside:avoid-page!important;margin-top:1.2mm!important;margin-bottom:0!important;border-radius:1.6mm!important;overflow:visible!important}
 .date-label,.measurement-tool>label,.completion-row>label{font-size:8.5pt!important;padding:1mm!important}
 .date-calendar{font-size:7.5pt!important}
 .date-selects{display:none!important}
 .date-content,.measurement-input,.completion-input{padding:0!important}
 .print-date{display:flex!important;justify-content:center!important;align-items:center!important;direction:rtl!important;unicode-bidi:isolate!important;min-height:8mm!important}
 .measurement-input .print-value,.completion-input .print-value{min-height:8mm!important}
 .notes-section{gap:2mm!important;margin-top:2.7mm!important}
 .note{overflow:visible!important;border-radius:2mm!important;break-inside:auto!important}
 .note>label{display:flex!important;justify-content:center!important;align-items:center!important;padding:1mm 2mm!important;font-size:8.5pt!important;text-align:center!important;break-after:avoid-page!important}
 .note>.print-value{padding:1.3mm 2mm!important;min-height:8mm!important;font-weight:400!important;text-align:center!important;break-inside:auto!important}
 .signatures{gap:3mm!important;margin-top:3mm!important;break-inside:avoid-page!important}
 .signature{border-radius:2mm!important;break-inside:avoid-page!important}
 .signature label{padding:1mm 2mm!important;font-size:8.8pt!important}
 .signature .print-value{min-height:8mm!important}
 .sheet-footer{display:none!important}
}


/* V5: refined calm teal tables and balanced footer; preserve the established print engine. */
:root{--line:#cedfdb;--text:#204954}
/* Richer visual hierarchy without dark or mismatched table header colors. */
.program-table,.target-table,.results-table{
 border:1px solid #c4dad5;
 border-collapse:separate;
 border-spacing:0;
 border-radius:12px;
 background:#fff;
 box-shadow:0 4px 16px rgba(19,84,89,.055);
}
.program-table th,.target-table thead th,.results-table thead th{
 color:#275c67;
 font-weight:800;
 background:linear-gradient(116deg,#e4f0ee 0%,#eff7f4 48%,#e5f1ef 100%);
}
.program-table tr:nth-child(even) th{
 background:linear-gradient(116deg,#e8f3f0 0%,#f3f9f6 52%,#eaf4f2 100%);
}
.program-table td,.target-table tbody td,.results-table tbody td{
 background:linear-gradient(160deg,#fff 0%,#fbfefc 100%);
}
.program-table tr:nth-child(even) td{background:#fafdfe}
.program-table th,.program-table td,.target-table th,.target-table td,.results-table th,.results-table td{
 border:0;
 border-inline-end:1px solid #d8e7e2;
 border-bottom:1px solid #d8e7e2;
 text-align:center;
 vertical-align:middle;
}
.program-table tr>*:last-child,.target-table tr>*:last-child,.results-table tr>*:last-child{border-inline-end:0}
.program-table tbody tr:last-child>* ,.target-table tbody tr:last-child>* ,.results-table tbody tr:last-child>* {border-bottom:0}
.program-table tr:first-child>*:first-child,.target-table thead tr:first-child>*:first-child,.results-table thead tr:first-child>*:first-child{border-start-start-radius:11px}
.program-table tr:first-child>*:last-child,.target-table thead tr:first-child>*:last-child,.results-table thead tr:first-child>*:last-child{border-start-end-radius:11px}
.program-table tbody tr:last-child>*:first-child,.target-table tbody tr:last-child>*:first-child,.results-table tbody tr:last-child>*:first-child{border-end-start-radius:11px}
.program-table tbody tr:last-child>*:last-child,.target-table tbody tr:last-child>*:last-child,.results-table tbody tr:last-child>*:last-child{border-end-end-radius:11px}
.program-table tbody tr:hover td,.target-table tbody tr:hover td,.results-table tbody tr:hover td{background:linear-gradient(112deg,#f9fdfc,#f5faf9)}
.date-strip,.measurement-tool,.completion-row{
 border-color:#c5ded8;
 border-radius:11px;
 box-shadow:0 3px 11px rgba(19,84,89,.04);
 background:#fff;
}
.date-label,.measurement-tool>label,.completion-row>label{
 background:linear-gradient(117deg,#e7f3f0 0%,#f1f8f6 55%,#e7f2f0 100%);
 color:#275b64;
 border-color:#d4e5e0;
}
.date-content,.measurement-input,.completion-input{background:linear-gradient(125deg,#fff,#fbfefd)}
.note,.signature{border-color:#cbdeda;border-radius:11px;box-shadow:0 3px 11px rgba(19,84,89,.035)}
.note>label{background:linear-gradient(115deg,#e8f4f1,#f2f9f6 55%,#e7f3f0);color:#285d66}
.signature label,.signature:last-child label{background:linear-gradient(115deg,#205f6c,#288180);color:#fff}
@media screen{
 /* A4 preview is a column: the footer must sit at the sheet bottom, never above a blank white tail. */
 .paper{display:flex;flex-direction:column;overflow:hidden}
 .sheet-header{flex:0 0 auto}
 .sheet-main{flex:1 0 auto}
 .sheet-footer{flex:0 0 auto;margin-top:auto}
 .program-table,.target-table,.results-table{overflow:hidden}
}
@media print{
 /* Revert flexbox to normal block fragmentation across A4 pages. */
 .paper{display:block!important;overflow:visible!important}
 .sheet-main{display:block!important}
 .sheet-footer{display:none!important}
 .program-table,.target-table,.results-table{
  border-collapse:separate!important;
  overflow:visible!important;
  border-radius:2.5mm!important;
  box-shadow:none!important;
 }
 .program-table tr:first-child>*:first-child,.target-table thead tr:first-child>*:first-child,.results-table thead tr:first-child>*:first-child{border-start-start-radius:2.3mm!important}
 .program-table tr:first-child>*:last-child,.target-table thead tr:first-child>*:last-child,.results-table thead tr:first-child>*:last-child{border-start-end-radius:2.3mm!important}
 .program-table tbody tr:last-child>*:first-child,.target-table tbody tr:last-child>*:first-child,.results-table tbody tr:last-child>*:first-child{border-end-start-radius:2.3mm!important}
 .program-table tbody tr:last-child>*:last-child,.target-table tbody tr:last-child>*:last-child,.results-table tbody tr:last-child>*:last-child{border-end-end-radius:2.3mm!important}
 .note,.signature,.date-strip,.measurement-tool,.completion-row{box-shadow:none!important;border-radius:2.5mm!important}
}


/* V6 — balanced on-screen composition, optically aligned centered masthead.
   Preserve the same print dimensions, PDF pagination, text and data semantics. */
:root{--line:#d4e4e1;--text:#214d56}
/* Both structural gaps on either side of the divider are explicitly identical. */
.brand-area{
  grid-template-columns:28mm 1.3px 39mm;
  column-gap:3.5mm;
  width:max-content;
  max-width:100%;
  margin-inline:auto;
  justify-content:center;
  align-items:center;
}
.brand-logo{width:28mm;height:24mm;display:flex;align-items:center;justify-content:flex-end}
.brand-logo img{width:28mm;height:22mm;max-height:100%;object-fit:contain}
.brand-separator{height:18mm}
.institution{width:39mm;max-width:39mm;text-align:right;align-items:center}
.brand-input{width:100%}
.brand-input input{padding-inline:0;text-align:right}
/* Uniform rhythm, gentle tonal hierarchy, and rounded table silhouettes. */
.sheet-main{padding-block:5mm 5mm}
.report-title{margin-bottom:3.6mm}
.form-section{margin-top:3.5mm}
.program-section{margin-top:2mm}
.program-table,.target-table,.results-table{
 border:1px solid #cbdeda;
 border-collapse:separate;
 border-spacing:0;
 border-radius:12px;
 overflow:hidden;
 box-shadow:0 4px 15px rgba(26,82,84,.04);
}
.program-table th,.target-table thead th,.results-table thead th{
 background:linear-gradient(115deg,#e4f1ee 0%,#eff7f5 52%,#e5f1ee 100%);
 color:#255b64;
}
.program-table td,.target-table tbody td,.results-table tbody td{background:#fff}
.program-table th,.program-table td,.target-table th,.target-table td,.results-table th,.results-table td{
 text-align:center;vertical-align:middle;border-color:#d8e6e2;
}
.program-table th{padding:8px 5px}
.program-table td{padding:5px 6px}
.target-table thead th,.results-table thead th{padding:8px 6px}
.target-table tbody td,.results-table tbody td{padding:5px 6px}
.date-strip,.measurement-tool,.completion-row{
 border:1px solid #cbdeda;border-radius:11px;overflow:hidden;
 box-shadow:0 3px 12px rgba(24,75,78,.035);
}
.date-strip,.completion-row{margin-top:9px}
.measurement-tool{margin-bottom:9px}
.date-label,.measurement-tool>label,.completion-row>label{
 background:linear-gradient(114deg,#e6f2ef,#f1f8f6 52%,#e7f2ef);
 color:#255b65;
}
.notes-section{gap:9px;margin-top:3.5mm}
.note,.signature{border-color:#cbdeda;border-radius:11px;overflow:hidden}
.note>label{background:linear-gradient(112deg,#e5f2ef,#f2f8f6 52%,#e7f3f0)}
.note textarea{min-height:39px}
.signatures{gap:11px;margin-top:4mm}
.signature label,.signature:last-child label{background:linear-gradient(115deg,#205e69,#287b7c);color:#fff}
.signature textarea{min-height:37px}
@media screen{
  /* Flex is deliberately limited to screen, so print page breaks remain native. */
  .paper{display:flex;flex-direction:column;min-height:297mm;overflow:hidden}
  .sheet-header{flex:0 0 auto}
  .sheet-main{flex:1 0 auto}
  .sheet-footer{flex:0 0 auto;margin-top:auto}
}
@media screen and (max-width:760px){
  .paper{min-height:0}
  .brand-area{grid-template-columns:72px 1px minmax(0,132px);column-gap:8px}
  .brand-logo{width:72px;height:64px}
  .brand-logo img{width:72px;height:57px}
  .brand-separator{height:51px}
  .institution{width:132px;max-width:132px}
  .sheet-main{padding:13px 10px 15px}
  .report-title{margin-bottom:11px}
  .form-section{margin-top:11px}
  .program-section{margin-top:7px}
  .notes-section{margin-top:11px;gap:8px}
  .signatures{margin-top:12px}
  .program-table th{padding:6px 3px}
  .program-table td{padding:3px}
  .target-table thead th,.results-table thead th{padding:6px 3px}
  .target-table tbody td,.results-table tbody td{padding:3px}
}
@media screen and (max-width:390px){
  .sheet-main{padding:11px 7px 14px}
  .brand-area{grid-template-columns:68px 1px minmax(0,132px);column-gap:7px}
  .brand-logo{width:68px}
  .brand-logo img{width:68px}
  .institution{width:132px;max-width:132px}
}
@media print{
  .paper{display:block!important;overflow:visible!important;min-height:0!important}
  .sheet-main{display:block!important;min-height:0!important;padding:0 9mm 5mm!important}
  .brand-area{
    grid-template-columns:28mm 1.3px 39mm!important;
    column-gap:3.5mm!important;
    justify-content:center!important;
    margin-inline:auto!important;
    max-width:100%!important;
    width:max-content!important;
  }
  .brand-logo{width:28mm!important;height:23mm!important;justify-content:flex-end!important}
  .brand-logo img{width:28mm!important;height:22mm!important;object-fit:contain!important}
  .brand-separator{height:18mm!important}
  .institution{width:39mm!important;max-width:39mm!important;align-items:center!important;text-align:right!important}
  .brand-input .print-value{text-align:right!important;padding:0!important;margin:0!important}
  .form-section{margin-top:3mm!important}
  .program-section{margin-top:2mm!important}
  .program-table,.target-table,.results-table{
    width:100%!important;border-collapse:separate!important;border-spacing:0!important;
    border-radius:2.6mm!important;overflow:visible!important;box-shadow:none!important;
  }
  .program-table th{padding:1.5mm .9mm!important}
  .target-table thead th,.results-table thead th{padding:1.6mm 1mm!important}
  .notes-section{margin-top:3mm!important;gap:2.4mm!important}
  .note>.print-value{min-height:9mm!important}
  .signatures{margin-top:3.5mm!important}
  .signature .print-value{min-height:9mm!important}
  .sheet-footer{display:none!important}
}


/* V7 — increased clarity of the MAIN LABEL CELLS only, requested after reviewing PDF.
   Preserve white answer fields, rounded table geometry, RTL, page breaks and export behavior. */
:root{--main-cell-ink:#1b525d;--main-cell-line:#b6d1cc}
.program-table th,
.target-table thead th,
.results-table thead th{
  background:linear-gradient(115deg,#bfdad5 0%,#d6e8e3 52%,#c4ded8 100%);
  color:var(--main-cell-ink);
  border-color:var(--main-cell-line);
}
/* Keep alternate program rows softly varied but never washed out. */
.program-table tr:nth-child(even) th{
  background:linear-gradient(115deg,#c9e1db 0%,#deede8 52%,#cce3dd 100%);
}
.date-label,
.measurement-tool>label,
.completion-row>label{
  background:linear-gradient(113deg,#c3ddd7 0%,#d7e9e3 52%,#c7dfd9 100%);
  color:var(--main-cell-ink);
  border-color:var(--main-cell-line);
}
.note>label{
  background:linear-gradient(112deg,#c5ded8 0%,#d9e9e4 53%,#c8e1da 100%);
  color:var(--main-cell-ink);
  border-bottom-color:var(--main-cell-line);
}
/* Same colors when printed; no printer-only pale version. */
@media print{
 .program-table th,.target-table thead th,.results-table thead th,
 .date-label,.measurement-tool>label,.completion-row>label,.note>label{
   -webkit-print-color-adjust:exact!important;print-color-adjust:exact!important;
 }
}

/* V7: preserve the entered impact-topic text color in PDF as it appears on screen.
   Separate semantic spans avoid recoloring the fixed title prefix. */
@media print {
  .report-title .print-title-combined{display:inline!important;white-space:pre-wrap!important;unicode-bidi:isolate!important}
  .report-title .print-title-prefix{color:#fff!important;-webkit-text-fill-color:#fff!important;font:inherit!important}
  .report-title .print-title-subject{color:#f2deb4!important;-webkit-text-fill-color:#f2deb4!important;font:inherit!important;white-space:pre-wrap!important}
}


/* V8: Six individual program rows (one label + one editable answer per row).
   Visual proportions are kept identical between desktop, phone, and A4 output. */
.program-table .program-label-col{width:34%}
.program-table .program-value-col{width:66%}
.program-table th{padding:8px 9px}
.program-table td{padding:4px 8px}
.program-table th label{line-height:1.55}
.program-table textarea{min-height:29px;text-align:center}
@media screen and (max-width:760px){
 .program-table .program-label-col{width:39%}
 .program-table .program-value-col{width:61%}
 .program-table th{padding:7px 5px;font-size:10px}
 .program-table td{padding:4px 5px}
 .program-table textarea{font-size:10.5px}
}
@media screen and (max-width:390px){
 .program-table .program-label-col{width:41%}
 .program-table .program-value-col{width:59%}
 .program-table th{padding:7px 4px;font-size:9.7px}
 .program-table textarea{font-size:10px}
}
@media print{
 .program-table .program-label-col{width:34%!important}
 .program-table .program-value-col{width:66%!important}
 .program-table th{padding:1.6mm 1.4mm!important;font-size:8.3pt!important}
 .program-table td{padding:.25mm 1mm!important}
 .program-table .print-value{min-height:7.5mm!important;padding:1.6mm 1.2mm!important}
 /* A reasonable baseline for a six-row layout even with shorter answers. */
 .target-table .print-value{min-height:9.5mm!important}
 .results-table .print-value{min-height:11.5mm!important}
 .note>.print-value{min-height:12mm!important}
 .signature .print-value{min-height:10mm!important}
 /* A class added only when the actual natural print height is known to fit
    avoids forcing long-text reports to spill or clip on page two. */
 .sheet-main.print-balanced{
   min-height:237mm!important;
   display:flex!important;flex-direction:column!important;justify-content:space-between!important;
   padding-bottom:4mm!important;
 }
 .sheet-main.print-balanced .form-section,
 .sheet-main.print-balanced .notes-section,
 .sheet-main.print-balanced .signatures{flex-shrink:0}
}

/* V9 — six clear independent rows, balanced A4 output and proportionate masthead.
   No absolute positions: tables and long entries can flow without overlapping. */
:root{--main-cell-line:#bad8d1}
.program-table{table-layout:fixed}
.program-table tbody tr{height:auto}
.program-table tbody th,.program-table tbody td{height:auto;vertical-align:middle}
.program-table th label{line-height:1.6;overflow-wrap:break-word}
/* Keep editable cells open and never let manual resizing produce overlap. */
.program-table textarea{min-height:30px;line-height:1.75}
@media screen {
  .brand-area{grid-template-columns:28mm 1.3px 45mm;column-gap:3.5mm}
  .institution{width:45mm;max-width:45mm}
  .brand-input:first-child input{font-size:14px;line-height:1.65}
  .brand-input:last-child input{font-size:12.8px;line-height:1.65;font-weight:800}
}
@media screen and (max-width:760px){
  .brand-area{grid-template-columns:72px 1px minmax(0,146px);column-gap:8px}
  .institution{width:146px;max-width:146px}
  .brand-input:first-child input{font-size:12.5px}
  .brand-input:last-child input{font-size:11.5px}
}
@media screen and (max-width:390px){
  .brand-area{grid-template-columns:68px 1px minmax(0,142px);column-gap:7px}
  .institution{width:142px;max-width:142px}
  .brand-input:first-child input{font-size:12px}
  .brand-input:last-child input{font-size:11px}
}
@media print {
  /* Symmetrical 3.5mm distances from logo -> divider -> institution. */
  .brand-area{grid-template-columns:28mm 1.3px 45mm!important;column-gap:3.5mm!important}
  .institution{width:45mm!important;max-width:45mm!important;min-width:0!important}
  .brand-input .print-value{font-size:11.2pt!important;line-height:1.45!important;font-weight:800!important;min-height:6.5mm!important;overflow-wrap:break-word!important}
  .brand-input:last-child .print-value{font-size:10.3pt!important;line-height:1.45!important;font-weight:800!important;color:#b9e6df!important}
  /* Each row has one field label and a full-width response in the same row. */
  .program-table .program-label-col{width:34%!important}
  .program-table .program-value-col{width:66%!important}
  .program-table th{padding:1.7mm 1.4mm!important;line-height:1.55!important;font-size:8.6pt!important}
  .program-table td{padding:.35mm 1.1mm!important}
  .program-table .print-value{min-height:7.2mm!important;line-height:1.6!important;padding:1.4mm 1.3mm!important}
  /* Do not force heights on whole table rows: large answers may paginate naturally. */
  .program-table tbody tr{height:auto!important;min-height:0!important}
  .program-table td,.program-table th{position:static!important;vertical-align:middle!important}
  .target-table .print-value{min-height:9mm!important}
  .results-table .print-value{min-height:10.5mm!important}
  .note>.print-value{min-height:11mm!important}
  .signature .print-value{min-height:9.5mm!important}
  .sheet-main.print-balanced{min-height:244mm!important;justify-content:space-between!important;padding-bottom:3mm!important}
  .sheet-main.print-balanced .form-section,.sheet-main.print-balanced .notes-section,.sheet-main.print-balanced .signatures{flex-shrink:0!important}
}


/* V10 — cross-browser print stability fix for the three independent two-cell rows.
   Printed CSS grids could produce inconsistent fragment/border sizing in macOS Quartz;
   physical HTML tables give both cells one shared row box and common borders. */
.date-strip.stable-two-cell,.measurement-tool.stable-two-cell,.completion-row.stable-two-cell{
 display:table;
 direction:rtl;
 table-layout:fixed;
 border-collapse:separate;
 border-spacing:0;
 width:100%;
 max-width:100%;
 box-sizing:border-box;
 background:#fff;
 border:1px solid #bddbd3;
 border-radius:11px;
 overflow:hidden;
 box-shadow:0 2px 8px rgba(19,84,89,.035);
}
.stable-two-cell .stable-label-col{width:35%}
.stable-two-cell .stable-value-col{width:65%}
.stable-two-cell tbody,.stable-two-cell tbody tr{width:100%}
.stable-two-cell tbody tr{break-inside:avoid;page-break-inside:avoid}
.stable-two-cell th,.stable-two-cell td{
 display:table-cell;
 vertical-align:middle;
 min-width:0;
 height:auto;
 max-width:none;
 border:0;
 border-bottom:0;
 background-clip:padding-box;
 text-align:center;
 overflow-wrap:anywhere;
}
.stable-two-cell th{
 padding:6px 8px;
 font-size:10.7px;
 font-weight:800;
 line-height:1.65;
 color:#1b525d;
 background:linear-gradient(113deg,#c3ddd7 0%,#d7e9e3 52%,#c7dfd9 100%);
 border-inline-end:1px solid #bddbd3;
}
.stable-two-cell th label{display:block;font:inherit;line-height:inherit;text-align:center;overflow-wrap:anywhere}
.stable-two-cell td{padding:3px 7px;background:#fff}
.stable-two-cell td textarea{width:100%;max-width:100%;min-height:28px;margin:0;line-height:1.65}
.stable-two-cell .date-content{padding:3px 6px;white-space:normal}
.stable-two-cell .date-selects{display:flex;align-items:center;justify-content:center;width:100%}
.stable-two-cell .date-calendar{white-space:nowrap}
/* Independent rows must have stable, visible outer edges in both directions. */
.stable-two-cell tbody tr>*:first-child{border-radius:0 10px 10px 0}
.stable-two-cell tbody tr>*:last-child{border-radius:10px 0 0 10px}
@media(max-width:760px){
 .stable-two-cell .stable-label-col{width:39%}
 .stable-two-cell .stable-value-col{width:61%}
 .stable-two-cell th{font-size:9.7px;padding:4px}
 .stable-two-cell td{padding:3px 4px}
}
@media print{
 /* Remove flex page stretching: it caused variable table-row fragmentation
    in some print engines. Normal document flow retains natural measured heights. */
 .sheet-main.print-balanced{display:block!important;min-height:0!important;height:auto!important;justify-content:normal!important;align-items:normal!important;padding-bottom:5mm!important}
 .sheet-main.print-balanced .form-section,.sheet-main.print-balanced .notes-section,.sheet-main.print-balanced .signatures{flex-shrink:1!important}
 .date-strip.stable-two-cell,.measurement-tool.stable-two-cell,.completion-row.stable-two-cell{
   display:table!important;
   table-layout:fixed!important;
   width:100%!important;
   min-width:0!important;
   max-width:100%!important;
   min-height:0!important;
   border-collapse:separate!important;
   border-spacing:0!important;
   direction:rtl!important;
   overflow:visible!important;
   border:1px solid #b8d3ce!important;
   border-radius:1.8mm!important;
   margin:1.5mm 0 0!important;
   box-shadow:none!important;
   break-inside:avoid-page!important;
   page-break-inside:avoid!important;
 }
 .measurement-tool.stable-two-cell{margin:0 0 1.5mm!important}
 .stable-two-cell .stable-label-col{width:35%!important}
 .stable-two-cell .stable-value-col{width:65%!important}
 .stable-two-cell tbody{display:table-row-group!important}
 .stable-two-cell tbody tr{display:table-row!important;break-inside:avoid-page!important;page-break-inside:avoid!important}
 .stable-two-cell th,.stable-two-cell td{
   display:table-cell!important;
   vertical-align:middle!important;
   box-sizing:border-box!important;
   min-height:0!important;
   height:auto!important;
   overflow:visible!important;
 }
 .stable-two-cell th{
   padding:1.25mm 1.2mm!important;
   font:800 8.3pt/1.55 Cairo,Tahoma,sans-serif!important;
   color:#1b525d!important;
   background:linear-gradient(113deg,#c3ddd7 0%,#d7e9e3 52%,#c7dfd9 100%)!important;
   border-inline-end:1px solid #b8d3ce!important;
   text-align:center!important;
 }
 .stable-two-cell td{padding:0 .8mm!important;background:#fff!important}
 .stable-two-cell th label{font:inherit!important;display:block!important}
 .stable-two-cell .date-selects{display:none!important}
 .stable-two-cell .date-content .print-date{display:flex!important;justify-content:center!important;align-items:center!important;min-height:8mm!important}
 .stable-two-cell .measurement-input .print-value,.stable-two-cell .completion-input .print-value{
   display:block!important;min-height:8mm!important;padding:1mm 1.2mm!important;
   font:600 8.6pt/1.55 Cairo,Tahoma,sans-serif!important;
   line-height:1.55!important;
   white-space:pre-wrap!important;
   overflow-wrap:anywhere!important;
   text-align:center!important;
 }
 .stable-two-cell tbody tr>*:first-child{border-radius:0 1.5mm 1.5mm 0!important}
 .stable-two-cell tbody tr>*:last-child{border-radius:1.5mm 0 0 1.5mm!important}
 /* Row containers should not be printed at a fixed height that compresses Cairo line boxes. */
 .program-table tbody tr,.results-table tbody tr{height:auto!important;min-height:0!important}
 .program-table th,.program-table td,.target-table th,.target-table td,.results-table th,.results-table td{line-height:1.55!important}
 .program-table .print-value,.target-table .print-value,.results-table .print-value{line-height:1.62!important;position:static!important;overflow:visible!important}
}


/* V11 — balanced A4 vertical rhythm, based on the user's actual PDF export.
   Small, distributed breathing room avoids the blank tail after the signatures.
   All sizing is MINIMUM only: long text can grow naturally. */
@media print{
  .report-title{margin-bottom:2.9mm!important}
  .form-section{margin-top:2.9mm!important}
  .program-section{margin-top:2mm!important}
  .program-table th{padding-top:1.8mm!important;padding-bottom:1.8mm!important}
  .program-table td{padding-top:.4mm!important;padding-bottom:.4mm!important}
  .program-table .print-value{min-height:8.05mm!important;padding-top:1.45mm!important;padding-bottom:1.45mm!important}
  .target-table .print-value{min-height:9.6mm!important}
  .results-table .print-value{min-height:11.1mm!important}
  .date-strip.stable-two-cell,.completion-row.stable-two-cell{margin-top:1.6mm!important}
  .measurement-tool.stable-two-cell{margin-bottom:1.6mm!important}
  .stable-two-cell .date-content .print-date{min-height:8.1mm!important}
  .stable-two-cell .measurement-input .print-value,.stable-two-cell .completion-input .print-value{min-height:8.1mm!important}
  .notes-section{margin-top:3.2mm!important;gap:2.6mm!important}
  .note>label{padding-top:1mm!important;padding-bottom:1mm!important}
  .note>.print-value{min-height:11.2mm!important;padding-top:1.2mm!important;padding-bottom:1.2mm!important}
  .signatures{margin-top:3.8mm!important}
  .signature .print-value{min-height:10mm!important}
  /* No fixed page height or flex stretching: retain robust page fragmentation. */
  .sheet-main,.sheet-main.print-balanced{min-height:0!important;height:auto!important;display:block!important}
}


/* V12 — distinct, coordinated pastel surfaces by row and table.
   These backgrounds are applied to print and screen alike; never tint answer cells.
   No fixed table-row heights: content can grow without overlapping. */
:root {
  --v12-program-1-a:#c3e3dd; --v12-program-1-b:#e4f3ed;
  --v12-program-2-a:#c8dff0; --v12-program-2-b:#e8f3fb;
  --v12-program-3-a:#ded6ee; --v12-program-3-b:#f0ecf7;
  --v12-program-4-a:#e4dfc7; --v12-program-4-b:#f5f2e1;
  --v12-program-5-a:#d9e8ce; --v12-program-5-b:#eef6e8;
  --v12-program-6-a:#efdad7; --v12-program-6-b:#fbedea;
}
/* Purposeful hue progression in the six separate program rows. */
.program-table tbody tr:nth-child(1) th{background:linear-gradient(112deg,var(--v12-program-1-a),var(--v12-program-1-b))}
.program-table tbody tr:nth-child(2) th{background:linear-gradient(112deg,var(--v12-program-2-a),var(--v12-program-2-b))}
.program-table tbody tr:nth-child(3) th{background:linear-gradient(112deg,var(--v12-program-3-a),var(--v12-program-3-b))}
.program-table tbody tr:nth-child(4) th{background:linear-gradient(112deg,var(--v12-program-4-a),var(--v12-program-4-b))}
.program-table tbody tr:nth-child(5) th{background:linear-gradient(112deg,var(--v12-program-5-a),var(--v12-program-5-b))}
.program-table tbody tr:nth-child(6) th{background:linear-gradient(112deg,var(--v12-program-6-a),var(--v12-program-6-b))}
.target-table thead th{background:linear-gradient(110deg,#c5e5e1,#e1f3ef 55%,#cfe9e5);color:#214f59}
.measurement-tool.stable-two-cell th{background:linear-gradient(112deg,#e8ddc4,#f7eedb 60%,#eee1c9);color:#5b4d33}
.results-table thead th{background:linear-gradient(110deg,#cedbf0,#e9eff9 53%,#d7e2f3);color:#344d70}
.completion-row.stable-two-cell th{background:linear-gradient(111deg,#ead1d5,#f7e7e8 54%,#edd8dc);color:#674452}
.notes-section .note:nth-child(1)>label{background:linear-gradient(110deg,#d2e6d6,#edf7eb 55%,#dbecdc)}
.notes-section .note:nth-child(2)>label{background:linear-gradient(110deg,#e1d8ec,#f3eef8 55%,#e5ddec)}
.notes-section .note:nth-child(3)>label{background:linear-gradient(110deg,#d4e5ed,#eaf4f6 55%,#daeaee)}
/* Soft separators distinguish tables, but not the text fields. */
.program-table,.target-table,.measurement-tool.stable-two-cell,.results-table,.completion-row.stable-two-cell,.note{border-color:#c9dbd9}
.program-table th,.target-table thead th,.results-table thead th,.stable-two-cell th,.note>label{font-weight:800;letter-spacing:0;text-align:center;vertical-align:middle}
/* One fewer date-only table: distribute its previous spacing across real content. */
.form-section{margin-top:3.3mm}
.program-section{margin-top:2mm}
.measurement-tool.stable-two-cell{margin-bottom:2.1mm}
.completion-row.stable-two-cell{margin-top:2.1mm}
.notes-section{margin-top:3.7mm;gap:10px}
.signatures{margin-top:4mm}
@media(max-width:760px){
  .form-section{margin-top:11px}.program-section{margin-top:7px}
  .notes-section{margin-top:11px;gap:8px}.signatures{margin-top:12px}
}
@media print{
  /* Lower-specificity legacy backgrounds are intentionally overridden for paper. */
  .program-table tbody tr:nth-child(1) th{background:linear-gradient(112deg,var(--v12-program-1-a),var(--v12-program-1-b))!important}
  .program-table tbody tr:nth-child(2) th{background:linear-gradient(112deg,var(--v12-program-2-a),var(--v12-program-2-b))!important}
  .program-table tbody tr:nth-child(3) th{background:linear-gradient(112deg,var(--v12-program-3-a),var(--v12-program-3-b))!important}
  .program-table tbody tr:nth-child(4) th{background:linear-gradient(112deg,var(--v12-program-4-a),var(--v12-program-4-b))!important}
  .program-table tbody tr:nth-child(5) th{background:linear-gradient(112deg,var(--v12-program-5-a),var(--v12-program-5-b))!important}
  .program-table tbody tr:nth-child(6) th{background:linear-gradient(112deg,var(--v12-program-6-a),var(--v12-program-6-b))!important}
  .target-table thead th{background:linear-gradient(110deg,#c5e5e1,#e1f3ef 55%,#cfe9e5)!important;color:#214f59!important}
  .measurement-tool.stable-two-cell th{background:linear-gradient(112deg,#e8ddc4,#f7eedb 60%,#eee1c9)!important;color:#5b4d33!important}
  .results-table thead th{background:linear-gradient(110deg,#cedbf0,#e9eff9 53%,#d7e2f3)!important;color:#344d70!important}
  .completion-row.stable-two-cell th{background:linear-gradient(111deg,#ead1d5,#f7e7e8 54%,#edd8dc)!important;color:#674452!important}
  .notes-section .note:nth-child(1)>label{background:linear-gradient(110deg,#d2e6d6,#edf7eb 55%,#dbecdc)!important}
  .notes-section .note:nth-child(2)>label{background:linear-gradient(110deg,#e1d8ec,#f3eef8 55%,#e5ddec)!important}
  .notes-section .note:nth-child(3)>label{background:linear-gradient(110deg,#d4e5ed,#eaf4f6 55%,#daeaee)!important}
  /* Avoid underutilized lower page area while keeping natural fragmentation. */
  .program-table .print-value{min-height:8.4mm!important}
  .target-table .print-value{min-height:10.2mm!important}
  .results-table .print-value{min-height:11.7mm!important}
  .stable-two-cell .measurement-input .print-value,.stable-two-cell .completion-input .print-value{min-height:8.8mm!important}
  .notes-section{margin-top:3.7mm!important;gap:2.9mm!important}
  .note>.print-value{min-height:13mm!important}
  .signatures{margin-top:4.3mm!important}
  .signature .print-value{min-height:10.3mm!important}
}

/* V13 — unified calm green program rows; darker related borders for each table.
   Applies identically to browser view and A4 print while preserving all dimensions. */
:root {
  --v13-green-a:#bedccc;
  --v13-green-b:#d8eadd;
  --v13-green-stroke:#83b29a;
  --v13-teal-stroke:#79adb0;
  --v13-sand-stroke:#bcaa83;
  --v13-blue-stroke:#8eabc9;
  --v13-rose-stroke:#b997a3;
}
/* Six first rows share one calm sage-green color and unified darker outlines. */
.program-table{border-color:var(--v13-green-stroke)!important}
.program-table tbody tr th,
.program-table tbody tr:nth-child(even) th{
  background:linear-gradient(112deg,var(--v13-green-a),var(--v13-green-b))!important;
  color:#224f40;
}
.program-table th,.program-table td{
  border-inline-end-color:var(--v13-green-stroke)!important;
  border-bottom-color:var(--v13-green-stroke)!important;
}
/* Each remaining group uses its own stronger shade of its header's pastel. */
.target-table{border-color:var(--v13-teal-stroke)!important}
.target-table thead th{background:linear-gradient(110deg,#c2dfde,#e1f0e9 55%,#c5e0dc)!important}
.target-table th,.target-table td{
  border-inline-end-color:var(--v13-teal-stroke)!important;
  border-bottom-color:var(--v13-teal-stroke)!important;
}
.measurement-tool.stable-two-cell{border-color:var(--v13-sand-stroke)!important}
.measurement-tool.stable-two-cell th{
  background:linear-gradient(112deg,#e3d7bb,#f2e9d5 60%,#eadcc1)!important;
  border-inline-end:1px solid var(--v13-sand-stroke)!important;
}
.results-table{border-color:var(--v13-blue-stroke)!important}
.results-table thead th{background:linear-gradient(110deg,#c9d8ed,#e4ebf6 53%,#d0def0)!important}
.results-table th,.results-table td{
  border-inline-end-color:var(--v13-blue-stroke)!important;
  border-bottom-color:var(--v13-blue-stroke)!important;
}
.completion-row.stable-two-cell{border-color:var(--v13-rose-stroke)!important}
.completion-row.stable-two-cell th{
  background:linear-gradient(111deg,#e7cbd1,#f5e4e8 54%,#ead2d8)!important;
  border-inline-end:1px solid var(--v13-rose-stroke)!important;
}
.notes-section .note:nth-child(1){border-color:#8dbd9d!important}
.notes-section .note:nth-child(1)>label{
  background:linear-gradient(110deg,#cee4d3,#e6f2e5 55%,#d5e8d7)!important;
  border-bottom:1px solid #8dbd9d!important;
}
.notes-section .note:nth-child(2){border-color:#ad98c4!important}
.notes-section .note:nth-child(2)>label{
  background:linear-gradient(110deg,#ded4e9,#f1eaf6 55%,#e2d9ed)!important;
  border-bottom:1px solid #ad98c4!important;
}
.notes-section .note:nth-child(3){border-color:#94b7c6!important}
.notes-section .note:nth-child(3)>label{
  background:linear-gradient(110deg,#d1e2e9,#e9f2f6 55%,#d8e8ed)!important;
  border-bottom:1px solid #94b7c6!important;
}
.signature{border-color:#488b8d!important}
.signature label{border-bottom:1px solid #488b8d!important}
/* Date stays in the third of the six program rows, with a compact inline Hijri picker. */
.hijri-picker{
  min-height:30px;width:100%;display:flex;align-items:center;justify-content:center;
  flex-wrap:nowrap;gap:5px;direction:rtl;
}
.hijri-picker select{
  appearance:none;-webkit-appearance:none;min-width:0;max-width:100%;height:30px;
  text-align:center;text-align-last:center;direction:rtl;
  border-radius:7px;padding:2px 4px;
  background:#f6faf7;border:1px solid #a7cabb;
  color:#22564c;font:600 10.5px/1.55 Cairo,Tahoma,sans-serif;
}
.hijri-picker #year{flex:0 1 27%}
.hijri-picker #month{flex:0 1 39%}
.hijri-picker #day{flex:0 1 22%}
.hijri-divider{color:#74a18d;font-weight:600}
.hijri-picker select:focus{outline:2px solid #8ebb9e;outline-offset:1px}
@media(max-width:650px){
  .hijri-picker{gap:2px}
  .hijri-picker select{height:29px;padding:1px 0;font-size:9px}
}
@media print{
  .program-table tbody tr th,
  .program-table tbody tr:nth-child(even) th{
    background:linear-gradient(112deg,var(--v13-green-a),var(--v13-green-b))!important;
    color:#224f40!important;
  }
  .program-table,.target-table,.results-table{border-width:1px!important}
  .program-table th,.program-table td{
    border-inline-end-color:var(--v13-green-stroke)!important;
    border-bottom-color:var(--v13-green-stroke)!important;
  }
  .target-table th,.target-table td{
    border-inline-end-color:var(--v13-teal-stroke)!important;
    border-bottom-color:var(--v13-teal-stroke)!important;
  }
  .results-table th,.results-table td{
    border-inline-end-color:var(--v13-blue-stroke)!important;
    border-bottom-color:var(--v13-blue-stroke)!important;
  }
  .measurement-tool.stable-two-cell{border-color:var(--v13-sand-stroke)!important}
  .measurement-tool.stable-two-cell th{
    background:linear-gradient(112deg,#e3d7bb,#f2e9d5 60%,#eadcc1)!important;
    border-inline-end:1px solid var(--v13-sand-stroke)!important;
  }
  .completion-row.stable-two-cell{border-color:var(--v13-rose-stroke)!important}
  .completion-row.stable-two-cell th{
    background:linear-gradient(111deg,#e7cbd1,#f5e4e8 54%,#ead2d8)!important;
    border-inline-end:1px solid var(--v13-rose-stroke)!important;
  }
  .hijri-picker{display:none!important}
  .program-table td .print-value[data-for="executionDate"]{
    min-height:8.4mm!important;display:block!important;
    font:600 8.6pt/1.6 Cairo,Tahoma,sans-serif!important;
    direction:rtl!important;unicode-bidi:isolate!important;
  }
}
/* Preserve identical sage-green header backgrounds in all SIX rows during printing.
   Match the nth-child specificity of the legacy V12 print selectors. */
@media print{
 .program-table tbody tr:nth-child(1) th,
 .program-table tbody tr:nth-child(2) th,
 .program-table tbody tr:nth-child(3) th,
 .program-table tbody tr:nth-child(4) th,
 .program-table tbody tr:nth-child(5) th,
 .program-table tbody tr:nth-child(6) th{
    background:linear-gradient(112deg,var(--v13-green-a),var(--v13-green-b))!important;
    color:#224f40!important;
 }
}


/* V14 — print-consistent date order and equal rhythm between all top-level tables.
   Overrides only margins, not cell font sizes or the established table geometry. */
:root { --impact-v14-gap: 12px; }
.sheet-main > .report-title { margin-bottom:0; }
.sheet-main > .form-section,
.sheet-main > .notes-section,
.sheet-main > .signatures { margin-top:var(--impact-v14-gap); }
.sheet-main .measurement-tool.stable-two-cell { margin:0 0 var(--impact-v14-gap); }
.sheet-main .completion-row.stable-two-cell { margin:var(--impact-v14-gap) 0 0; }
.sheet-main > .notes-section { gap:var(--impact-v14-gap); }
.hijri-picker { direction:rtl; justify-content:center; }
/* The select elements are ordered day -> month -> year from the right edge. */
.hijri-picker select { text-align:center; text-align-last:center; direction:rtl; }
@media screen and (max-width:650px){ :root { --impact-v14-gap:10px; } }
/* The formatted print date uses isolated digits to defeat automatic bidi reordering. */
@media print {
  :root { --impact-v14-gap:2.8mm; }
  .sheet-main > .report-title {margin-bottom:0!important;}
  .sheet-main > .form-section,
  .sheet-main > .notes-section,
  .sheet-main > .signatures {margin-top:var(--impact-v14-gap)!important;}
  .sheet-main .measurement-tool.stable-two-cell {margin:0 0 var(--impact-v14-gap)!important;}
  .sheet-main .completion-row.stable-two-cell {margin:var(--impact-v14-gap) 0 0!important;}
  .sheet-main > .notes-section {gap:var(--impact-v14-gap)!important;}
  .program-table td .print-value[data-for="executionDate"] {
    display:flex!important;align-items:center!important;justify-content:center!important;
    text-align:center!important;direction:rtl!important;unicode-bidi:isolate!important;
    min-height:8.4mm!important;margin:0 auto!important;
    padding:1.45mm 1mm!important;
    font:600 8.6pt/1.6 Cairo,Tahoma,sans-serif!important;
  }
  .hijri-print-date {
    display:inline-flex!important;direction:rtl!important;
    align-items:center!important;justify-content:center!important;
    gap:1.5mm!important;white-space:nowrap!important;
    margin-inline:auto!important;unicode-bidi:isolate!important;
    font:inherit!important;
  }
  .hijri-print-date bdi {direction:ltr!important;unicode-bidi:isolate!important;font:inherit!important;}
  .hijri-print-divider {font:inherit!important;direction:ltr!important;unicode-bidi:isolate!important;color:#567c70!important;}
}

/* V15 — Arabic date order: day on right, month centered, year on left. */
.hijri-picker{direction:rtl!important;justify-content:center!important}
.hijri-picker #day{flex:0 1 22%}
.hijri-picker #month{flex:0 1 39%}
.hijri-picker #year{flex:0 1 27%}
.hijri-print-date{direction:rtl!important}

/* V17 — Native Hijri date menu entries stay readable on phones and desktops. */
.hijri-picker select option {color:#22564c;background:#ffffff;}

/* V23 — destructive action unmistakably red; designer credit is static, not interactive. */
.control-panel .actions .reset-btn{
  color:#fff!important;
  background:linear-gradient(135deg,#cb4149 0%,#ac2834 100%)!important;
  border:1px solid #982632!important;
  box-shadow:0 3px 8px rgba(142,28,43,.15);
}
.control-panel .actions .reset-btn:hover{background:linear-gradient(135deg,#bd333f,#90202c)!important}
.control-panel .actions .reset-btn svg{stroke:#fff}
.control-panel .actions .design-credit{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:42px;border-radius:9px;padding:8px 14px;font-size:11px;
  font-weight:800;line-height:1.7;text-align:center;
  color:#416968;border:1px solid #d5e6dd;background:#eef6f2;
  cursor:default;user-select:text;
}
.control-panel .actions .design-credit svg{width:17px;height:17px;flex:0 0 17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:390px){.control-panel .actions .design-credit{flex:1 1 100%}}
@media print{.control-panel{display:none!important}}


/* V25 — execution-report matched identity and educational table palette.
   Consciously scope all rules to impact-measure; never alter data fields/export JS. */
:root{
  --v25-section:#b8d6de;
  --v25-row-head:#deedf1;
  --v25-border:#89b0bd;
  --v25-ink:#22566b;
  --v25-entry:#ffffff;
}
/* Fixed institutional identity: 21.5mm × 17mm logo, and equal 10.5pt names. */
.sheet-header .brand-area{
  grid-template-columns:26mm 1.3px 43mm!important;
  column-gap:2.7mm!important;
  width:max-content!important;max-width:100%!important;
  align-items:center!important;justify-content:center!important;
}
.sheet-header .brand-logo{
  width:26mm!important;height:19mm!important;
  min-width:0!important;display:flex!important;
  align-items:center!important;justify-content:center!important;
}
.sheet-header .brand-logo img{
  display:block!important;width:21.5mm!important;height:17mm!important;
  max-width:21.5mm!important;max-height:17mm!important;
  object-fit:contain!important;object-position:center!important;
}
.sheet-header .brand-separator{height:19mm!important}
.sheet-header .institution{
  width:43mm!important;max-width:43mm!important;
  min-width:0!important;justify-content:center!important;
  gap:1.0mm!important;text-align:center!important;
}
.sheet-header .brand-input{min-width:0!important}
.sheet-header .brand-input input,
.sheet-header .brand-input:last-child input{
  font-family:Cairo,Tahoma,sans-serif!important;
  font-size:10.5pt!important;font-weight:800!important;
  line-height:1.5!important;letter-spacing:0!important;
  min-height:6mm!important;height:auto!important;
  text-align:center!important;
}
.sheet-header .brand-input:first-of-type input{color:#9ddbd0!important}
.sheet-header .brand-input:last-child input{color:#fff!important}
/* Section titles and every table heading follow the execution report's
   soft blue-grey panels, restrained outlines and white value cells. */
.program-table,
.target-table,
.results-table,
.measurement-tool.stable-two-cell,
.completion-row.stable-two-cell,
.notes-section .note{
  border-color:var(--v25-border)!important;
}
html body .program-table tbody tr th,
html body .program-table tbody tr:nth-child(even) th,
html body .target-table thead th,
html body .results-table thead th,
html body .measurement-tool.stable-two-cell th,
html body .completion-row.stable-two-cell th,
html body .notes-section .note>label,
html body .notes-section .note:nth-child(n)>label{
  background:var(--v25-row-head)!important;
  color:var(--v25-ink)!important;
  border-color:var(--v25-border)!important;
}
html body .program-table tbody tr td,
html body .program-table tbody tr:nth-child(even) td,
html body .target-table tbody td,
html body .results-table tbody td,
html body .measurement-tool.stable-two-cell td,
html body .completion-row.stable-two-cell td,
html body .notes-section .note textarea,
html body .notes-section .note>.print-value{
  background:var(--v25-entry)!important;
}
.program-table th,.program-table td,
.target-table th,.target-table td,
.results-table th,.results-table td{
  border-inline-end-color:var(--v25-border)!important;
  border-bottom-color:var(--v25-border)!important;
}
.measurement-tool.stable-two-cell th,
.completion-row.stable-two-cell th{
  border-inline-end:1px solid var(--v25-border)!important;
}
.notes-section .note>label,
.notes-section .note:nth-child(n)>label{
  border-bottom:1px solid var(--v25-border)!important;
}
.signature{border-color:var(--v25-border)!important}
.signature label{border-bottom-color:var(--v25-border)!important}
/* Stronger than legacy V13 selectors that separately painted six print rows green. */
html body .program-table tbody tr:nth-child(n) th,
html body .program-table tbody tr:nth-child(even) th{
  background:var(--v25-row-head)!important;
  color:var(--v25-ink)!important;
  border-color:var(--v25-border)!important;
}
html body .notes-section .note:nth-child(n){
  border:1px solid var(--v25-border)!important;
  background:#fff!important;
}
html body .notes-section .note:nth-child(n)>label{
  background:var(--v25-row-head)!important;
  border-bottom:1px solid var(--v25-border)!important;
  color:var(--v25-ink)!important;
}
/* Hijri dropdown styling remains legible next to the blue-grey headers. */
.hijri-picker select{background:#f7fafc!important;border-color:#bdd5df!important;color:#244f61!important}
.hijri-divider{color:#5b8799!important}
@media (max-width:760px){
 .sheet-header .brand-area{
   grid-template-columns:76px 1px minmax(0,126px)!important;
   column-gap:8px!important;
 }
 .sheet-header .brand-logo{width:76px!important;height:55px!important}
 .sheet-header .brand-logo img{
   width:68px!important;height:52px!important;
   max-width:68px!important;max-height:52px!important;
 }
 .sheet-header .brand-separator{height:49px!important}
 .sheet-header .institution{width:126px!important;max-width:126px!important;gap:2px!important}
 .sheet-header .brand-input input,
 .sheet-header .brand-input:last-child input{
   font-size:11px!important;min-height:21px!important;line-height:1.55!important;
 }
}
@media print{
 .sheet-header .brand-area{
   grid-template-columns:26mm 1.3px 43mm!important;
   column-gap:2.7mm!important;
 }
 .sheet-header .brand-logo{width:26mm!important;height:19mm!important}
 .sheet-header .brand-logo img{
   width:21.5mm!important;height:17mm!important;
   max-width:21.5mm!important;max-height:17mm!important;
   object-fit:contain!important;
 }
 .sheet-header .brand-separator{height:19mm!important}
 .sheet-header .institution{width:43mm!important;max-width:43mm!important;gap:1mm!important}
 .sheet-header .brand-input .print-value,
 .sheet-header .brand-input:last-child .print-value{
   font:800 10.5pt/1.5 Cairo,Tahoma,sans-serif!important;
   min-height:6mm!important;padding:0!important;margin:0!important;
   text-align:center!important;letter-spacing:0!important;
   white-space:pre-wrap!important;overflow-wrap:anywhere!important;
 }
 .sheet-header .brand-input:first-of-type .print-value{color:#9ddbd0!important}
 .sheet-header .brand-input:last-child .print-value{color:#fff!important}
 /* Make every row border and fill survive print-color adjustments. */
 html body .program-table tbody tr th,
 html body .program-table tbody tr:nth-child(even) th,
 html body .target-table thead th,
 html body .results-table thead th,
 html body .measurement-tool.stable-two-cell th,
 html body .completion-row.stable-two-cell th,
 html body .notes-section .note>label,
 html body .notes-section .note:nth-child(n)>label{
   background:var(--v25-row-head)!important;color:var(--v25-ink)!important;
 }
 html body .program-table tbody tr td,
 html body .target-table tbody td,
 html body .results-table tbody td,
 html body .notes-section .note>.print-value{background:#fff!important}
}


/* V26 | masthead rhythm: exactly symmetric structural spacing around divider.
   Keep original Ministry logo's intrinsic aspect ratio and avoid text compression.
   Right-to-left grid order: logo | divider | institutional names. */
.sheet-header .brand-area {
  grid-template-columns: 24mm 1.3px 45mm !important;
  column-gap: 3.4mm !important;
  justify-content:center!important;
  align-items:center!important;
}
.sheet-header .brand-logo {
  width:24mm!important;
  height:19mm!important;
  justify-content:flex-end!important;
  align-items:center!important;
}
.sheet-header .brand-logo img {
  width:21.5mm!important;
  height:17mm!important;
  max-width:21.5mm!important;
  max-height:17mm!important;
  object-fit:contain!important;
}
.sheet-header .brand-separator {height:19mm!important;width:1.3px!important}
.sheet-header .institution {
  width:45mm!important;
  max-width:45mm!important;
  min-width:0!important;
  align-items:stretch!important;
  text-align:right!important;
  gap:0.8mm!important;
}
.sheet-header .brand-input,
.sheet-header .brand-input input,
.sheet-header .brand-input .print-value {text-align:right!important}
.sheet-header .brand-input input,
.sheet-header .brand-input:first-of-type input {
  font-size:11.5pt!important;
  font-weight:800!important;
  line-height:1.42!important;
  min-height:6.2mm!important;
}
.sheet-header .brand-input:last-child input {
  font-size:10.15pt!important;
  font-weight:800!important;
  line-height:1.42!important;
  min-height:6.2mm!important;
}
@media (max-width:760px){
  .sheet-header .brand-area {
    grid-template-columns: 72px 1px minmax(0, 137px)!important;
    column-gap:9px!important;
  }
  .sheet-header .brand-logo {width:72px!important;height:55px!important;justify-content:flex-end!important}
  .sheet-header .brand-logo img {
    width:68px!important;height:52px!important;
    max-width:68px!important;max-height:52px!important;
    object-fit:contain!important;
  }
  .sheet-header .brand-separator {height:49px!important;width:1px!important}
  .sheet-header .institution {width:137px!important;max-width:137px!important;gap:2px!important}
  .sheet-header .brand-input input,
  .sheet-header .brand-input:first-of-type input {
    font-size:12.35px!important;min-height:21px!important;
  }
  .sheet-header .brand-input:last-child input {
    font-size:11.1px!important;min-height:21px!important;
  }
}
@media print {
  .sheet-header .brand-area {
    grid-template-columns:24mm 1.3px 45mm!important;
    column-gap:3.4mm!important;
  }
  .sheet-header .brand-logo {width:24mm!important;height:19mm!important;justify-content:flex-end!important}
  .sheet-header .brand-logo img {
    width:21.5mm!important;height:17mm!important;
    max-width:21.5mm!important;max-height:17mm!important;
    object-fit:contain!important;
  }
  .sheet-header .brand-separator {height:19mm!important;width:1.3px!important}
  .sheet-header .institution {width:45mm!important;max-width:45mm!important;gap:0.8mm!important}
  .sheet-header .brand-input .print-value,
  .sheet-header .brand-input:first-of-type .print-value {
    font-size:11.5pt!important;font-weight:800!important;
    line-height:1.4!important;min-height:6.2mm!important;
    text-align:right!important;
  }
  .sheet-header .brand-input:last-child .print-value {
    font-size:10.15pt!important;font-weight:800!important;
    line-height:1.4!important;min-height:6.2mm!important;
    text-align:right!important;
  }
}


/* V39: Unified institutional masthead and dependable A4 export.
   Keep one centered group (logo | divider | two institutional lines).
   Both structural gaps are identical; do not shift the image inside its cell. */
.sheet-header{
  background:#0a3542!important;
  background-image:none!important;
  width:100%!important;
  justify-content:center!important;align-items:center!important;
  isolation:isolate;
}
.sheet-header::before{
  background:linear-gradient(90deg,#3389b0 0%,#2d9d9c 50%,#42ac85 100%)!important;
  z-index:0;
}
.sheet-header .brand-area{
  position:relative;z-index:1;
  display:grid!important;direction:rtl!important;
  grid-template-columns:22mm 1.3px 44mm!important;
  column-gap:4mm!important;
  align-items:center!important;justify-content:center!important;
  width:max-content!important;max-width:100%!important;
  margin:0 auto!important;padding:0!important;
}
.sheet-header .brand-logo{
  width:22mm!important;height:19mm!important;min-width:0!important;
  display:flex!important;align-items:center!important;justify-content:flex-end!important;
}
.sheet-header .brand-logo img{
  width:21.5mm!important;height:17mm!important;
  max-width:21.5mm!important;max-height:17mm!important;
  object-fit:contain!important;object-position:center!important;
}
.sheet-header .brand-separator{
  width:1.3px!important;height:19mm!important;
  background:linear-gradient(180deg,#53b4b1,#5195b2)!important;
  margin:0!important;
}
.sheet-header .institution{
  width:44mm!important;max-width:44mm!important;min-width:0!important;
  display:grid!important;align-content:center!important;
  gap:0.8mm!important;text-align:right!important;
}
.sheet-header .brand-input,
.sheet-header .brand-input input,
.sheet-header .brand-input .print-value{
  text-align:right!important;direction:rtl!important;
  padding-inline:0!important;letter-spacing:0!important;
}
.sheet-header .brand-input input{
  font:800 11.2pt/1.45 Cairo,Tahoma,sans-serif!important;
  min-height:6mm!important;
}
.sheet-header .brand-input:last-child input{
  font:800 10.2pt/1.45 Cairo,Tahoma,sans-serif!important;
  min-height:6mm!important;
}
@media (max-width:760px){
  .sheet-header .brand-area{
    grid-template-columns:72px 1px minmax(0,141px)!important;
    column-gap:10px!important;
  }
  .sheet-header .brand-logo{width:72px!important;height:55px!important}
  .sheet-header .brand-logo img{width:70px!important;height:52px!important;max-width:70px!important;max-height:52px!important}
  .sheet-header .brand-separator{width:1px!important;height:49px!important}
  .sheet-header .institution{width:141px!important;max-width:141px!important;gap:2px!important}
  .sheet-header .brand-input input{font-size:12px!important;min-height:21px!important}
  .sheet-header .brand-input:last-child input{font-size:11px!important;min-height:21px!important}
}
/* Zero printer margins prevents date/page/URL running furniture in compliant browsers.
   iOS uses the direct-PDF renderer instead of relying on print settings. */
@page{size:A4 portrait;margin:0}
@media print{
  html,body,.workspace,form{padding:0!important;margin:0!important;background:#fff!important;width:100%!important;overflow:visible!important}
  .paper{
    position:relative!important;display:flex!important;flex-direction:column!important;
    width:210mm!important;height:296.5mm!important;
    min-height:296.5mm!important;max-height:296.5mm!important;
    margin:0!important;padding:0!important;border:0!important;border-radius:0!important;
    overflow:hidden!important;box-shadow:none!important;
  }
  .sheet-header{
    flex:0 0 35mm!important;width:210mm!important;height:35mm!important;
    min-height:35mm!important;max-height:35mm!important;margin:0!important;
  }
  .sheet-header .brand-area{
    grid-template-columns:22mm 1.3px 44mm!important;
    column-gap:4mm!important;
  }
  .sheet-header .brand-logo{width:22mm!important;height:19mm!important}
  .sheet-header .brand-logo img{width:21.5mm!important;height:17mm!important}
  .sheet-header .brand-separator{height:19mm!important;width:1.3px!important}
  .sheet-header .institution{width:44mm!important;max-width:44mm!important;gap:.8mm!important}
  .sheet-header .brand-input .print-value{
    display:block!important;font:800 11.2pt/1.45 Cairo,Tahoma,sans-serif!important;
    color:#9ddbd0!important;min-height:6mm!important;text-align:right!important;
  }
  .sheet-header .brand-input:last-child .print-value{
    font:800 10.2pt/1.45 Cairo,Tahoma,sans-serif!important;
    color:#fff!important;min-height:6mm!important;text-align:right!important;
  }
  .sheet-main{
    display:block!important;flex:1 1 auto!important;
    padding:4mm 9mm 8.5mm!important;min-height:0!important;
  }
  .sheet-footer{
    display:block!important;position:relative!important;flex:0 0 7mm!important;
    margin:0!important;min-height:7mm!important;height:7mm!important;
    width:100%!important;background:#0a3542!important;
    break-inside:avoid!important;
  }
  .sheet-footer .footer-accent{display:block!important;height:2.5px!important;width:100%!important}
  .control-panel{display:none!important}
}

/* V39.1 | centered institutional GROUP, identical clearances to divider.
   RTL cells: logo (right), divider (center), institution (left).
   The logo is aligned to its cell's divider-side edge; institution copy
   is aligned to its divider-side edge.  The grid's two column-gaps alone
   define both distances (4mm on A4, 10px on narrow screens). */
.sheet-header .brand-area{justify-self:center!important;place-self:center!important;left:auto!important;right:auto!important;transform:none!important}
.sheet-header .brand-logo{justify-content:flex-end!important;padding:0!important;margin:0!important}
.sheet-header .brand-separator{justify-self:center!important;margin:0!important;padding:0!important}
.sheet-header .institution{justify-self:stretch!important;justify-content:center!important;align-items:stretch!important;margin:0!important;padding:0!important}
.sheet-header .brand-input{padding:0!important;margin:0!important}
.sheet-header .brand-input input,.sheet-header .brand-input .print-value{box-sizing:border-box!important;padding:0!important;margin:0!important;text-align:right!important;width:100%!important}
@media print{
  .sheet-header .brand-area{position:relative!important;margin-inline:auto!important;align-self:center!important;justify-self:center!important;grid-template-columns:22mm 1.3px 44mm!important;column-gap:4mm!important}
  .sheet-header .brand-logo{width:22mm!important;justify-content:flex-end!important}
  .sheet-header .brand-logo img{width:21.5mm!important;max-width:21.5mm!important;object-fit:contain!important}
  .sheet-header .institution{width:44mm!important;max-width:44mm!important}
}

/* V39.2 precise optical symmetry — one flex group, no virtual blank grid cells.
   The gap beside the divider is identically 4mm on both sides for A4.
   Both labels are right-aligned to the divider-facing edge of the text column. */
.sheet-header .brand-area{
  display:flex!important;flex-direction:row!important;direction:rtl!important;
  align-items:center!important;justify-content:center!important;
  flex-wrap:nowrap!important;gap:4mm!important;
  width:max-content!important;max-width:100%!important;
  margin-inline:auto!important;position:relative!important;
}
.sheet-header .brand-logo{flex:0 0 22mm!important;width:22mm!important;height:19mm!important;justify-content:flex-end!important}
.sheet-header .brand-separator{flex:0 0 1.3px!important;width:1.3px!important;height:19mm!important}
.sheet-header .institution{flex:0 0 44mm!important;width:44mm!important;max-width:44mm!important;align-items:stretch!important;text-align:right!important}
.sheet-header .brand-input input,.sheet-header .brand-input .print-value{
  direction:rtl!important;text-align:right!important;padding:0!important;margin:0!important;
}
@media (max-width:760px){
  .sheet-header .brand-area{gap:10px!important}
  .sheet-header .brand-logo{flex-basis:72px!important;width:72px!important;height:55px!important}
  .sheet-header .brand-separator{flex-basis:1px!important;width:1px!important;height:49px!important}
  .sheet-header .institution{flex-basis:141px!important;width:141px!important;max-width:141px!important}
}
@media print{
  .sheet-header .brand-area{display:flex!important;gap:4mm!important}
  .sheet-header .brand-logo{flex:0 0 22mm!important;width:22mm!important}
  .sheet-header .brand-separator{flex:0 0 1.3px!important}
  .sheet-header .institution{flex:0 0 44mm!important;width:44mm!important;max-width:44mm!important}
}
/* Keep the text column at its fixed full width; implicit content-sized grid
   tracks made the labels drift away from the divider on PDF engines. */
.sheet-header .institution{
 grid-template-columns:minmax(0,1fr)!important;
 justify-items:stretch!important;
}
.sheet-header .brand-input{display:block!important;width:100%!important;max-width:100%!important}

/* V40 mobile export fallback and masthead overflow safeguards. */
.impact-pdf-ready{display:flex;justify-content:center;margin-top:12px;padding:4px}
.impact-pdf-ready-link{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:7px 18px;border-radius:8px;border:1px solid #b7d9cd;background:#eaf6ef;color:#125462;font:800 12px Cairo,Tahoma,sans-serif;text-decoration:none}
@media print{.impact-pdf-ready{display:none!important}}
@media (max-width:760px){.sheet-header .brand-input input{overflow:hidden;text-overflow:ellipsis}}
@media print{.sheet-header .institution{overflow:hidden!important}.sheet-header .brand-input .print-value{overflow-wrap:anywhere!important;word-break:normal!important;line-height:1.35!important}}


/* V43: Center all exported answers and allocate unused A4 space to narrative sections. */
.notes-section .note textarea{
  min-height:65px!important; padding:9px 10px!important;
  line-height:1.75!important;
}
/* The editor and the printed answer use the same centered text, even for several lines. */
.paper .print-value .print-value-text{
  display:block; width:100%; text-align:center; direction:rtl;
  unicode-bidi:plaintext; white-space:pre-wrap; overflow-wrap:anywhere;
  line-height:inherit; font:inherit;
}
.paper .brand-input .print-value .print-value-text{
  text-align:right!important;
}
@media print{
  /* Flex is applied to the answer wrapper, not the table cell, preserving RTL table geometry. */
  .paper .program-table td>.print-value:not([data-for="executionDate"]),
  .paper .target-table td>.print-value,
  .paper .results-table td>.print-value,
  .paper .stable-two-cell td>.print-value,
  .paper .notes-section .note>.print-value,
  .paper .signature>.print-value{
    display:flex!important; flex-direction:column!important; align-items:center!important;
    justify-content:center!important; text-align:center!important;
    box-sizing:border-box!important; height:auto;
    direction:rtl!important; overflow-wrap:anywhere!important;
    line-height:1.65!important;
  }
  .paper .program-table td>.print-value:not([data-for="executionDate"]){min-height:8.7mm!important}
  .paper .target-table td>.print-value{min-height:10mm!important}
  .paper .results-table td>.print-value{min-height:12mm!important}
  .paper .notes-section .note>.print-value{
    min-height:17mm!important; padding:2mm 3mm!important;
    line-height:1.72!important; flex-shrink:0!important;
  }
  .paper .notes-section .note>label{min-height:8mm!important;}
  .paper .signature>.print-value{min-height:10.2mm!important}
  .paper .notes-section{align-content:stretch!important;}
  .paper .brand-input .print-value{display:block!important;text-align:right!important}
  .paper .brand-input .print-value .print-value-text{text-align:right!important}
}


/* V44 — The entered golden topic must be visible when the browser prints natively.
   Avoid relying on WebKit's CSSOM collection of nested @media rules. */
@media print {
  .paper .report-title .title-editor{display:none!important}
  .paper .report-title .print-title-combined{
    display:flex!important;flex-wrap:wrap!important;align-items:baseline!important;
    justify-content:center!important;column-gap:.25em!important;row-gap:0!important;
    direction:rtl!important;unicode-bidi:normal!important;white-space:normal!important;
    width:100%!important;min-width:0!important;line-height:1.55!important;
  }
  .paper .report-title .print-title-prefix,
  .paper .report-title .print-title-subject{
    display:inline!important;font:inherit!important;line-height:inherit!important;
    unicode-bidi:normal!important;overflow-wrap:anywhere!important;
  }
  .paper .report-title .print-title-prefix{
    color:#fff!important;-webkit-text-fill-color:#fff!important;
  }
  .paper .report-title .print-title-subject{
    color:#f2deb4!important;-webkit-text-fill-color:#f2deb4!important;
  }
}

/* V45 — mobile export visibility, never expose progress/status to the A4 paper. */
.impact-pdf-progress{margin:8px auto 0;padding:9px 12px;max-width:450px;border:1px solid #b8d9d7;background:#f1faf8;color:#12515b;border-radius:9px;font:600 12px Cairo,Tahoma,sans-serif;text-align:center}
.control-panel .export-btn:disabled{opacity:.62;cursor:progress}
@media print{.impact-pdf-progress{display:none!important}}


/* V75 patch: unify impact-measure header with execution-report colors
   and remove distracting header field frames during editing. */
.sheet-header .brand-area.afia-v73-header,
.sheet-header .brand-area.afia-v73-header *{
  box-sizing:border-box!important;
}
.sheet-header .brand-area.afia-v73-header .brand-input,
.sheet-header .brand-area.afia-v73-header .brand-input input,
.sheet-header .brand-area.afia-v73-header .brand-input .afia-header-expand,
.sheet-header .brand-area.afia-v73-header .brand-input .print-value{
  border:0!important;
  outline:none!important;
  background:transparent!important;
  box-shadow:none!important;
  border-radius:0!important;
  appearance:none!important;
  -webkit-appearance:none!important;
}
.sheet-header .brand-area.afia-v73-header .brand-input input:focus,
.sheet-header .brand-area.afia-v73-header .brand-input .afia-header-expand:focus{
  outline:none!important;
  background:transparent!important;
  box-shadow:none!important;
}
.sheet-header .brand-area.afia-v73-header .brand-input:first-of-type input,
.sheet-header .brand-area.afia-v73-header .brand-input:first-of-type .print-value,
.sheet-header .brand-area.afia-v73-header .brand-input:first-of-type .afia-header-expand{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  font-weight:800!important;
}
.sheet-header .brand-area.afia-v73-header .brand-input:last-of-type input,
.sheet-header .brand-area.afia-v73-header .brand-input:last-of-type .print-value,
.sheet-header .brand-area.afia-v73-header .brand-input:last-of-type .afia-header-expand{
  color:#20b0bc!important;
  -webkit-text-fill-color:#20b0bc!important;
  font-weight:700!important;
}
@media print{
  .sheet-header .brand-area.afia-v73-header .brand-input:first-of-type .print-value{
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
  }
  .sheet-header .brand-area.afia-v73-header .brand-input:last-of-type .print-value{
    color:#20b0bc!important;
    -webkit-text-fill-color:#20b0bc!important;
  }
}
