
.paper-design .paper-custom-title table,#paper-title-editor .ql-editor table{width:100%;table-layout:fixed;border-collapse:collapse;margin:1.5mm 0;font-size:10pt;background:transparent}
.paper-design .paper-custom-title td,.paper-design .paper-custom-title th,#paper-title-editor .ql-editor td{box-sizing:border-box;padding:1mm 2mm;border:0!important;background:transparent!important;color:inherit;font-size:10pt;line-height:1.6;text-align:left;vertical-align:top;white-space:normal;overflow-wrap:anywhere}
.paper-design .paper-custom-title td *,.paper-design .paper-custom-title th *{color:inherit}.paper-design .paper-custom-title td p{margin:0;font-size:10pt;line-height:1.6}
#paper-title-editor:has(table) .ql-editor{height:auto;max-height:650px}
.paper-design .paper-custom-title .paper-exam-instructions,#paper-title-editor .ql-editor .paper-exam-instructions{position:relative;box-sizing:border-box;display:table;margin:2mm 0 3mm 12mm;padding:1.5mm 6mm;border-radius:8mm;background:#303030;color:#fff!important;font-size:12pt;line-height:1.4;text-align:center}
.paper-design .paper-custom-title .paper-exam-instructions *,#paper-title-editor .ql-editor .paper-exam-instructions *{color:inherit!important;font-size:inherit!important}
.paper-exam-instructions::before{content:"📝";position:absolute;left:-11mm;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:8mm;height:9mm;border:0;background:transparent!important;color:#333;font-family:"Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif;font-size:22pt;line-height:1;text-align:center}
#paper-title-editor .paper-exam-instructions::before{color:var(--text)}
.paper-design .paper-custom-title ol,#paper-title-editor .ql-editor ol{margin:3mm 0;padding-left:8mm;font-size:10pt;line-height:1.7;text-align:left;columns:2;column-gap:10mm;list-style:decimal}
.paper-design .paper-custom-title li,#paper-title-editor .ql-editor li{display:list-item;list-style:decimal;margin:0 0 2mm;padding:0;break-inside:avoid;font-size:10pt;line-height:1.7;text-align:left}
#paper-title-editor .ql-editor li>.ql-ui{display:none}.paper-design .paper-custom-title li::before,#paper-title-editor .ql-editor li::before{content:none}
@media(max-width:600px){#paper-title-editor .ql-editor ol{columns:1}}

/* Instruction badge and icon follow the chosen paper palette. */
.paper-design-mono .paper-custom-title .paper-exam-instructions{background:#292f36;color:#fff!important}
.paper-design-mono .paper-custom-title .paper-exam-instructions::before{color:#292f36!important}
#paper-title-editor[data-paper-style="mono"] .ql-editor .paper-exam-instructions{background:#292f36;color:#fff!important;border:1px solid #f3f4f5}
#paper-title-editor[data-paper-style="mono"] .ql-editor .paper-exam-instructions::before{color:color-mix(in srgb,#292f36 60%,var(--text,#e6edf3))!important}
.paper-design-academy .paper-custom-title .paper-exam-instructions{background:#464b50;color:#fff!important}
.paper-design-academy .paper-custom-title .paper-exam-instructions::before{color:#464b50!important}
#paper-title-editor[data-paper-style="academy"] .ql-editor .paper-exam-instructions{background:#464b50;color:#fff!important;border:1px solid #f0f0ee}
#paper-title-editor[data-paper-style="academy"] .ql-editor .paper-exam-instructions::before{color:color-mix(in srgb,#464b50 60%,var(--text,#e6edf3))!important}
.paper-design-metro .paper-custom-title .paper-exam-instructions{background:#eef4fa;color:#193d63!important}
.paper-design-metro .paper-custom-title .paper-exam-instructions::before{color:#eef4fa!important}
#paper-title-editor[data-paper-style="metro"] .ql-editor .paper-exam-instructions{background:#193d63;color:#fff!important;border:1px solid #eef4fa}
#paper-title-editor[data-paper-style="metro"] .ql-editor .paper-exam-instructions::before{color:color-mix(in srgb,#193d63 60%,var(--text,#e6edf3))!important}
.paper-design-rounded .paper-custom-title .paper-exam-instructions{background:#315c8c;color:#fff!important}
.paper-design-rounded .paper-custom-title .paper-exam-instructions::before{color:#315c8c!important}
#paper-title-editor[data-paper-style="rounded"] .ql-editor .paper-exam-instructions{background:#315c8c;color:#fff!important;border:1px solid #edf4fb}
#paper-title-editor[data-paper-style="rounded"] .ql-editor .paper-exam-instructions::before{color:color-mix(in srgb,#315c8c 60%,var(--text,#e6edf3))!important}
.paper-design-evergreen .paper-custom-title .paper-exam-instructions{background:#536b59;color:#fff!important}
.paper-design-evergreen .paper-custom-title .paper-exam-instructions::before{color:#536b59!important}
#paper-title-editor[data-paper-style="evergreen"] .ql-editor .paper-exam-instructions{background:#536b59;color:#fff!important;border:1px solid #f1eee5}
#paper-title-editor[data-paper-style="evergreen"] .ql-editor .paper-exam-instructions::before{color:color-mix(in srgb,#536b59 60%,var(--text,#e6edf3))!important}

/* Short instruction lists read naturally in one column. */
.paper-design .paper-custom-title ol:not(:has(>li:nth-child(4))),#paper-title-editor .ql-editor ol:not(:has(>li:nth-child(4))){columns:1}

/* Mock examination: bordered two-row fields and a left instruction panel. */
#paper-title-editor .ql-editor:has(>.paper-mock-field){display:grid;grid-template-columns:repeat(12,minmax(0,1fr));height:auto;max-height:650px;align-items:stretch}
#paper-title-editor .ql-editor:has(>.paper-mock-field)>*{grid-column:1/-1;min-width:0}
#paper-title-editor .ql-editor .paper-mock-field{grid-column:auto/span 2;display:flex;align-items:center;box-sizing:border-box;min-height:9mm;border:1px solid var(--mock-border,#737373);background:transparent;color:inherit;font-size:10pt;line-height:1.4;margin:0;overflow-wrap:anywhere}
#paper-title-editor .ql-editor .paper-mock-field[data-mock-field=school],#paper-title-editor .ql-editor .paper-mock-field[data-mock-field=subject],#paper-title-editor .ql-editor .paper-mock-field[data-mock-field=exam]{grid-column:auto/span 4}
#paper-title-editor .ql-editor .paper-mock-label{box-sizing:border-box;display:inline-flex;align-items:center;align-self:stretch;flex-shrink:0;max-width:50%;border-right:1px solid var(--mock-border,#737373);background:var(--mock-label-bg,var(--mock-tint,#f0f0ee));padding:1.5mm 2mm;font-weight:bold;color:inherit}
#paper-title-editor .ql-editor .paper-mock-instructions{grid-column:auto/span 2;display:flex;align-items:center;justify-content:center;box-sizing:border-box;margin:3mm 0 0;padding:2mm;border:1px solid var(--mock-border,#737373);background:var(--mock-label-bg,var(--mock-tint,#f0f0ee));color:inherit;font-size:12pt;font-weight:bold;text-align:center;line-height:1.5}
#paper-title-editor .ql-editor .paper-mock-instructions+ol{grid-column:auto/span 10;box-sizing:border-box;margin:3mm 0 0;padding:2mm 4mm 2mm 9mm;border:1px solid var(--mock-border,#737373);background:transparent;color:inherit;columns:1}
.paper-design .paper-custom-title .paper-mock-info,.paper-design .paper-custom-title .paper-mock-rules{margin:2mm 0;table-layout:fixed;width:100%;border-collapse:collapse;background:transparent;color:inherit}
.paper-design .paper-custom-title .paper-mock-info td,.paper-design .paper-custom-title .paper-mock-rules td{border:1px solid var(--mock-border,#737373)!important;background:transparent!important;color:inherit;padding:1.5mm 2mm;vertical-align:middle;line-height:1.5;font-size:10pt}
.paper-design .paper-custom-title .paper-mock-info td.paper-mock-cell-label,.paper-design .paper-custom-title .paper-mock-rules td.paper-mock-cell-label{background:var(--mock-label-bg,var(--mock-tint,#f0f0ee))!important;text-align:center;font-weight:bold}
.paper-design .paper-custom-title .paper-mock-info td.paper-mock-cell-label{padding:1mm;font-size:10pt}
.paper-design .paper-custom-title .paper-mock-rules td.paper-mock-cell-label{width:15%;font-size:12pt}
.paper-design .paper-custom-title .paper-mock-rules ol{margin:0;padding:0 0 0 7mm;columns:1;color:inherit}
.paper-design .paper-custom-title .paper-mock-rules ol *,#paper-title-editor .ql-editor .paper-mock-instructions+ol *{color:inherit}
.paper-design .paper-custom-title .paper-mock-rules li,#paper-title-editor .ql-editor .paper-mock-instructions+ol li{position:relative;list-style:none;margin:0 0 1mm;padding:0;counter-increment:mock-rule;line-height:1.6;font-size:10pt}
.paper-design .paper-custom-title .paper-mock-rules ol,#paper-title-editor .ql-editor .paper-mock-instructions+ol{counter-reset:mock-rule}
.paper-design .paper-custom-title .paper-mock-rules li::before,#paper-title-editor .ql-editor .paper-mock-instructions+ol li::before{content:counter(mock-rule)!important;position:absolute;left:-6mm;top:.2mm;display:inline-block;box-sizing:border-box;width:4.5mm;height:4.5mm;border-radius:50%;background:var(--mock-circle,#626262);color:var(--mock-circle-ink,#fff);text-align:center;font:10pt/4.5mm sans-serif}
.paper-design .paper-custom-title .paper-mock-rules li:last-child,#paper-title-editor .ql-editor .paper-mock-instructions+ol li:last-child{margin-bottom:0}

.paper-design .paper-custom-title .paper-mock-info .paper-mock-blank{box-sizing:border-box;display:block;height:4mm;margin:0;border-bottom:1px solid var(--mock-border,#aaa);line-height:1;font-size:8pt}

/* Shared palette for the editable mock form and its printed tables. */
.paper-design-mono,#paper-title-editor[data-paper-style="mono"]{--mock-accent:#292f36;--mock-tint:#f3f4f5;--mock-border:#292f36;--mock-circle:#292f36;--mock-circle-ink:#fff}
.paper-design-academy,#paper-title-editor[data-paper-style="academy"]{--mock-accent:#464b50;--mock-tint:#f0f0ee;--mock-border:#464b50;--mock-circle:#464b50;--mock-circle-ink:#fff}
.paper-design-metro,#paper-title-editor[data-paper-style="metro"]{--mock-accent:#193d63;--mock-tint:#eef4fa;--mock-border:#eef4fa;--mock-circle:#eef4fa;--mock-circle-ink:#193d63}
.paper-design-rounded,#paper-title-editor[data-paper-style="rounded"]{--mock-accent:#315c8c;--mock-tint:#edf4fb;--mock-border:#315c8c;--mock-circle:#315c8c;--mock-circle-ink:#fff}
.paper-design-evergreen,#paper-title-editor[data-paper-style="evergreen"]{--mock-accent:#536b59;--mock-tint:#f1eee5;--mock-border:#536b59;--mock-circle:#536b59;--mock-circle-ink:#fff}
#paper-title-editor .ql-editor .paper-mock-label,#paper-title-editor .ql-editor .paper-mock-instructions,.paper-design .paper-custom-title .paper-mock-info td.paper-mock-cell-label,.paper-design .paper-custom-title .paper-mock-rules td.paper-mock-cell-label{color:var(--mock-accent,#292f36)}
#paper-title-editor .ql-editor .paper-mock-field,#paper-title-editor .ql-editor .paper-mock-instructions+ol{color:var(--adm-text,var(--text,inherit));--mock-border:color-mix(in srgb,var(--mock-accent) 45%,var(--adm-text,var(--text,#e8eef5)))}
#paper-title-editor .ql-editor .paper-mock-instructions+ol{--mock-circle:var(--mock-tint);--mock-circle-ink:var(--mock-accent)}
#paper-title-editor .ql-editor .paper-mock-instructions{border-color:color-mix(in srgb,var(--mock-accent) 45%,var(--adm-text,var(--text,#e8eef5)))}
.paper-design .paper-custom-title .paper-mock-rules ol{color:inherit}

/* The heading icon and caption are native editable text. */
.paper-design .paper-custom-title .paper-exam-instructions,#paper-title-editor .ql-editor .paper-exam-instructions{display:flex;align-items:center;gap:3mm;margin:2mm 0 3mm;padding:0;border:0;background:transparent!important;color:inherit!important;border-radius:0;text-align:left}
.paper-exam-instructions::before{display:none!important;content:none!important}
.paper-design .paper-custom-title .paper-exam-instructions .paper-exam-icon,#paper-title-editor .ql-editor .paper-exam-instructions .paper-exam-icon{display:inline-block;flex:none;min-width:8mm;font-family:"Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif;font-size:22pt!important;line-height:1.2;text-align:center}
.paper-design .paper-custom-title .paper-exam-instructions .paper-exam-caption,#paper-title-editor .ql-editor .paper-exam-instructions .paper-exam-caption{display:inline-block;padding:1.5mm 6mm;border-radius:8mm;background:var(--mock-accent,#292f36);color:#fff!important;font-size:12pt!important;line-height:1.4}
.paper-design-metro .paper-custom-title .paper-exam-instructions .paper-exam-caption{background:var(--mock-tint,#eef4fa);color:var(--mock-accent,#193d63)!important}

/* The rounded form labels need separation from the pale blue title panel. */
.paper-design-rounded,#paper-title-editor[data-paper-style="rounded"]{--mock-label-bg:#c8dcef}
