/* V73 — institutional identity derived from the NAFES analysis report.
 * Golden National Day version 2 is intentionally excluded.
 * The SAME DOM, dimensions, font faces, and ink are used for editing and printing.
 */
:root{--afia-v73-navy:#0a3845;--afia-v73-teal:#20b0bc}
.afia-v73-header{
  --afia-v73-scale:1;--afia-v73-text-width:220px;--afia-v73-gap:18px;
  box-sizing:border-box!important;position:relative!important;
  display:inline-flex!important;direction:rtl!important;flex-direction:row!important;
  align-items:center!important;justify-content:center!important;
  width:max-content!important;max-width:none!important;height:108px!important;
  padding:12px 20px!important;margin-inline:auto!important;
  border-radius:0!important;background:transparent!important;background-image:none!important;
  color:#fff!important;gap:var(--afia-v73-gap)!important;
  overflow:visible!important;transform:none!important;flex:0 0 auto!important;
  box-shadow:none!important;
  font-family:Cairo,sans-serif!important;font-synthesis:none!important;
}
.afia-v73-header .brand-logo,.afia-v73-header > img.logo{
  display:flex!important;align-items:center!important;justify-content:center!important;
  width:86px!important;min-width:86px!important;max-width:86px!important;
  height:68px!important;min-height:68px!important;max-height:68px!important;
  padding:0!important;margin:0!important;flex:0 0 86px!important;
  background:transparent!important;position:static!important;transform:none!important;
}
.afia-v73-header .brand-logo img,.afia-v73-header > img.logo{
  display:block!important;width:86px!important;height:65px!important;
  max-height:65px!important;max-width:86px!important;
  object-fit:contain!important;position:static!important;transform:none!important;
}
.afia-v73-header .brand-separator,.afia-v73-header .separator{
  display:block!important;position:static!important;width:2px!important;
  min-width:2px!important;max-width:2px!important;flex:0 0 2px!important;
  height:62px!important;min-height:62px!important;max-height:62px!important;
  border:0!important;border-radius:0!important;margin:0!important;padding:0!important;
  background:linear-gradient(to bottom,#2d7ebc,#3caf74)!important;
  box-shadow:none!important;transform:none!important;
}
.afia-v73-header .brand-name,.afia-v73-header .institution,.afia-v73-header .identity{
  display:flex!important;position:static!important;flex-direction:column!important;
  justify-content:center!important;align-items:stretch!important;gap:4px!important;
  width:var(--afia-v73-text-width)!important;min-width:var(--afia-v73-text-width)!important;
  max-width:var(--afia-v73-text-width)!important;height:74px!important;
  min-height:74px!important;max-height:74px!important;
  padding:0!important;margin:0!important;border:0!important;flex:0 0 auto!important;
  overflow:visible!important;transform:none!important;text-align:right!important;
  background:transparent!important;box-sizing:border-box!important;
}
.afia-v73-header .edu-name,.afia-v73-header .school-name,
.afia-v73-header .brand-input,.afia-v73-header .identity > input,
.afia-v73-header .identity > .afia-header-expand{
  display:flex!important;align-items:center!important;justify-content:flex-start!important;
  position:relative!important;box-sizing:border-box!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  height:28px!important;min-height:28px!important;max-height:28px!important;
  margin:0!important;padding:0!important;border:0!important;
  white-space:nowrap!important;overflow:visible!important;
  text-align:right!important;background:transparent!important;
}
/* Restore the two fixed NAFES-style tiers. Both shrink by the SAME factor. */
.afia-v73-header .edu-name,.afia-v73-header .edu-name *,
.afia-v73-header .brand-input:nth-of-type(1),
.afia-v73-header .brand-input:nth-of-type(1) *,
.afia-v73-header .identity > .afia-header-expand:nth-of-type(1),
.afia-v73-header .identity > input:nth-of-type(1){
  font-family:Cairo,sans-serif!important;font-weight:800!important;
  font-size:calc(18px * var(--afia-v73-scale))!important;
  line-height:1.35!important;color:#fff!important;
  text-align:right!important;text-shadow:none!important;
}
.afia-v73-header .school-name,.afia-v73-header .school-name *,
.afia-v73-header .brand-input:nth-of-type(2),
.afia-v73-header .brand-input:nth-of-type(2) *,
.afia-v73-header .identity > .afia-header-expand:nth-of-type(2),
.afia-v73-header .identity > input:nth-of-type(2){
  font-family:Cairo,sans-serif!important;font-weight:600!important;
  font-size:calc(16px * var(--afia-v73-scale))!important;
  line-height:1.35!important;color:var(--afia-v73-teal)!important;
  text-align:right!important;text-shadow:none!important;
}
.afia-v73-header .afia-header-expand,.afia-v73-header .print-value,
.afia-v73-header input:not(.afia-header-native){
  position:relative!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  height:26px!important;min-height:26px!important;max-height:26px!important;
  overflow:hidden!important;white-space:nowrap!important;
  overflow-wrap:normal!important;word-break:normal!important;text-overflow:clip!important;
  padding:0!important;margin:0!important;border:0!important;
  border-radius:0!important;background:transparent!important;box-shadow:none!important;
  text-align:right!important;
}
.afia-v73-header .afia-header-native{display:none!important}
.afia-v73-header .afia-header-expand,
.afia-v73-header input:not(.afia-header-native){display:block!important}
/* Edit mode renders the proxy only. Print spans stay in DOM for existing export code. */
.afia-v73-header .print-value{display:none!important}
/* This wrapper is centered as a UNIT, not centered by shifting one constituent.
 * Equal gap on each side of the vertical divider is structural. */
.header:has(> .brand-header .afia-v73-header),
.sheet-header:has(.afia-v73-header){text-align:center!important}
.brand-header:has(.afia-v73-header){display:flex!important;align-items:center!important;justify-content:center!important}
.sheet-header:has(.afia-v73-header){display:flex!important;align-items:center!important;justify-content:center!important}
/* A4 export keeps the designed geometry, regardless of handset width. */
@media print{
  .afia-v73-header{zoom:1!important;break-inside:avoid!important;page-break-inside:avoid!important;
    -webkit-print-color-adjust:exact!important;print-color-adjust:exact!important;}
  .afia-v73-header .afia-header-has-print .afia-header-expand{display:none!important}
  .afia-v73-header .afia-header-has-print .print-value{
    display:block!important;height:26px!important;min-height:26px!important;
    max-height:26px!important;font-family:Cairo,sans-serif!important;
    font-size:inherit!important;white-space:nowrap!important;overflow:hidden!important;
    text-align:right!important;line-height:1.35!important;
  }
  .afia-v73-header .brand-input:nth-of-type(1) .print-value{
    font-size:calc(18px * var(--afia-v73-scale))!important;font-weight:800!important;color:#fff!important;
  }
  .afia-v73-header .brand-input:nth-of-type(2) .print-value{
    font-size:calc(16px * var(--afia-v73-scale))!important;font-weight:600!important;color:var(--afia-v73-teal)!important;
  }
}
/* Execution report builds an independent DOM for PDF. Match the public header. */
#printReport .print-sheet .brand-area{
  display:inline-flex!important;direction:rtl!important;align-items:center!important;
  justify-content:center!important;gap:18px!important;
  width:max-content!important;max-width:none!important;
  height:108px!important;padding:12px 20px!important;margin-inline:auto!important;
  background:transparent!important;background-image:none!important;border-radius:0!important;
}
#printReport .print-sheet .brand-area .brand-logo{width:86px!important;min-width:86px!important;height:68px!important;flex:0 0 86px!important}
#printReport .print-sheet .brand-area .brand-logo img{width:86px!important;height:65px!important;object-fit:contain!important}
#printReport .print-sheet .brand-area .brand-separator{width:2px!important;height:62px!important;flex:0 0 2px!important;background:linear-gradient(to bottom,#2d7ebc,#3caf74)!important}
#printReport .print-sheet .brand-area .institution{display:flex!important;position:static!important;flex-direction:column!important;
  justify-content:center!important;gap:4px!important;transform:none!important;
  width:var(--afia-v73-print-width,260px)!important;min-width:var(--afia-v73-print-width,260px)!important;
  height:74px!important;margin:0!important;padding:0!important}
#printReport .print-sheet .brand-area .institution-text{
  display:block!important;line-height:1.35!important;height:28px!important;
  min-height:28px!important;max-height:28px!important;overflow:hidden!important;
  white-space:nowrap!important;text-align:right!important;font-family:Cairo,sans-serif!important;
  padding:0!important;margin:0!important;
}
#printReport .print-sheet .brand-area .institution-text:first-child{
  font-size:calc(18px * var(--afia-v73-print-scale,1))!important;
  font-weight:800!important;color:white!important;
}
#printReport .print-sheet .brand-area .institution-text:nth-child(2),
#printReport .print-sheet .brand-area .institution-sub{
  font-size:calc(16px * var(--afia-v73-print-scale,1))!important;
  font-weight:600!important;color:#20b0bc!important;
}

/* PDF screenshot clones can use .output-mode instead of @media print. */
.output-mode .afia-v73-header .afia-header-has-print .print-value,
.afia-export-document .afia-v73-header .afia-header-has-print .print-value,
.afia-print-mode .afia-v73-header .afia-header-has-print .print-value{
 display:block!important;height:26px!important;min-height:26px!important;max-height:26px!important;
 white-space:nowrap!important;overflow:hidden!important;text-align:right!important;
}
.output-mode .afia-v73-header .afia-header-has-print .afia-header-expand,
.afia-export-document .afia-v73-header .afia-header-has-print .afia-header-expand,
.afia-print-mode .afia-v73-header .afia-header-has-print .afia-header-expand{display:none!important}
.output-mode .afia-v73-header .brand-input:nth-of-type(1) .print-value,
.afia-export-document .afia-v73-header .brand-input:nth-of-type(1) .print-value,
.afia-print-mode .afia-v73-header .brand-input:nth-of-type(1) .print-value{font-size:calc(18px * var(--afia-v73-scale))!important;font-weight:800!important;color:#fff!important}
.output-mode .afia-v73-header .brand-input:nth-of-type(2) .print-value,
.afia-export-document .afia-v73-header .brand-input:nth-of-type(2) .print-value,
.afia-print-mode .afia-v73-header .brand-input:nth-of-type(2) .print-value{font-size:calc(16px * var(--afia-v73-scale))!important;font-weight:600!important;color:#20b0bc!important}
/* Override legacy execution/impact absolute anchoring with the same centered flex row. */
.sheet-header:has(.afia-v73-header) .brand-area.afia-v73-header,
#pageOne .sheet-header .brand-area.afia-v73-header,
#pageTwo .sheet-header .brand-area.afia-v73-header{
 display:inline-flex!important;position:relative!important;direction:rtl!important;
 flex-direction:row!important;align-items:center!important;justify-content:center!important;
 column-gap:18px!important;row-gap:0!important;grid-template-columns:none!important;
 width:max-content!important;max-width:none!important;margin-inline:auto!important;
 padding:12px 20px!important;transform:none!important;overflow:visible!important;
}
.sheet-header:has(.afia-v73-header) .brand-area.afia-v73-header .institution,
#pageOne .sheet-header .brand-area.afia-v73-header .institution,
#pageTwo .sheet-header .brand-area.afia-v73-header .institution{
 display:flex!important;position:static!important;right:auto!important;left:auto!important;
 top:auto!important;bottom:auto!important;transform:none!important;
 margin:0!important;padding:0!important;flex:0 0 auto!important;
 width:var(--afia-v73-text-width)!important;min-width:var(--afia-v73-text-width)!important;
 max-width:var(--afia-v73-text-width)!important;height:74px!important;
}
.afia-v73-header .sr-only{
 position:absolute!important;width:1px!important;height:1px!important;
 padding:0!important;margin:-1px!important;overflow:hidden!important;
 clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;
 white-space:nowrap!important;border:0!important;
}
/* The national-day standard and waiting-session skins originally offset .brand-group.
   Center the entire unit instead of retaining their older side anchoring. */
.brand:has(> .brand-group.afia-v73-header){
 display:flex!important;flex-direction:row!important;align-items:center!important;
 justify-content:center!important;position:relative!important;
 width:100%!important;max-width:100%!important;margin-inline:auto!important;
}
.brand > .brand-group.afia-v73-header{
 position:relative!important;right:auto!important;left:auto!important;
 top:auto!important;bottom:auto!important;float:none!important;
 transform:none!important;margin-inline:auto!important;
}
.brand:has(> .brand-group.afia-v73-header){min-height:132px!important}
.brand > .brand-group.afia-v73-header{
 position:absolute!important;left:50%!important;right:auto!important;
 top:50%!important;bottom:auto!important;
 margin:0!important;transform:translate(-50%,-50%)!important;
}


/* V75 patch: calm editing view for institutional header.
   Keep header editable without showing distracting input frames in form view. */
.afia-v73-header .brand-input,
.afia-v73-header .brand-input input,
.afia-v73-header .brand-input .afia-header-expand,
.afia-v73-header .brand-input .print-value,
.afia-v73-header .edu-name,
.afia-v73-header .school-name,
.afia-v73-header .edu-name input,
.afia-v73-header .school-name input,
.afia-v73-header .edu-name .afia-header-expand,
.afia-v73-header .school-name .afia-header-expand{
  border:0!important;
  outline:none!important;
  box-shadow:none!important;
  background:transparent!important;
  border-radius:0!important;
  appearance:none!important;
  -webkit-appearance:none!important;
}
.afia-v73-header .brand-input:focus-within,
.afia-v73-header .edu-name:focus-within,
.afia-v73-header .school-name:focus-within{
  outline:none!important;
  box-shadow:none!important;
}
.afia-v73-header .brand-input input:focus,
.afia-v73-header .brand-input input:active,
.afia-v73-header .afia-header-expand:focus,
.afia-v73-header .afia-header-expand:active{
  outline:none!important;
  box-shadow:none!important;
  background:transparent!important;
}
/* Preserve the same ink colors in edit, print, and screenshot export modes. */
.afia-v73-header .brand-input:nth-of-type(1) input,
.afia-v73-header .brand-input:nth-of-type(1) .print-value,
.afia-v73-header .edu-name,
.afia-v73-header .edu-name input,
.afia-v73-header .edu-name .afia-header-expand{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
.afia-v73-header .brand-input:nth-of-type(2) input,
.afia-v73-header .brand-input:nth-of-type(2) .print-value,
.afia-v73-header .school-name,
.afia-v73-header .school-name input,
.afia-v73-header .school-name .afia-header-expand{
  color:var(--afia-v73-teal)!important;
  -webkit-text-fill-color:var(--afia-v73-teal)!important;
}

/* V76 – Remove inset pill/card artwork from the shared ministry identity only.
   The FULL-WIDTH masthead remains the single colored backdrop.
   Applies to editing, mobile, cloned offscreen documents and A4 print/PDF. */
.afia-v73-header,
.header .afia-v73-header,
.brand .brand-group.afia-v73-header,
.sheet-header .brand-area.afia-v73-header,
#pageOne .sheet-header .brand-area.afia-v73-header,
#pageTwo .sheet-header .brand-area.afia-v73-header,
#printReport .print-sheet .brand-area{
  background:transparent!important;
  background-image:none!important;
  border-radius:0!important;
  border:0!important;
  box-shadow:none!important;
}
@media print{
 .afia-v73-header,#printReport .print-sheet .brand-area{
   background:transparent!important;background-image:none!important;
   border-radius:0!important;box-shadow:none!important;
 }
}
/* V76 mobile/desktop text integrity: legacy #formPage width rules had been
   shrinking the two header rows to ~99px while children overflowed to 235px.
   A consistent measured width keeps both names within the central unit. */
#formPage .afia-v73-header .brand-name,
#page .afia-v73-header .brand-name,
.output-mode .afia-v73-header .brand-name{
  width:var(--afia-v73-text-width,220px)!important;
  min-width:var(--afia-v73-text-width,220px)!important;
  max-width:var(--afia-v73-text-width,220px)!important;
  height:74px!important;min-height:74px!important;max-height:74px!important;
  display:flex!important;flex-direction:column!important;align-items:stretch!important;
  position:static!important;transform:none!important;margin:0!important;padding:0!important;
}
#formPage .afia-v73-header .brand-name > .edu-name,
#formPage .afia-v73-header .brand-name > .school-name,
#page .afia-v73-header .brand-name > .edu-name,
#page .afia-v73-header .brand-name > .school-name,
.output-mode .afia-v73-header .brand-name > .edu-name,
.output-mode .afia-v73-header .brand-name > .school-name{
  position:relative!important;top:auto!important;left:auto!important;right:auto!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  height:28px!important;min-height:28px!important;max-height:28px!important;
  display:flex!important;align-items:center!important;justify-content:flex-start!important;
  padding:0!important;margin:0!important;transform:none!important;overflow:hidden!important;
}
#formPage .afia-v73-header .brand-name .afia-header-expand,
#page .afia-v73-header .brand-name .afia-header-expand,
.output-mode .afia-v73-header .brand-name .afia-header-expand{
  width:100%!important;min-width:0!important;max-width:100%!important;
  height:26px!important;max-height:26px!important;
  overflow:hidden!important;direction:rtl!important;text-align:right!important;
}

/* Two IDs deliberately outrank legacy ID-scoped form chrome declarations. */
#formPage#formPage .afia-v73-header .brand-name,
#page#page .afia-v73-header .brand-name{
 width:var(--afia-v73-text-width,220px)!important;min-width:var(--afia-v73-text-width,220px)!important;max-width:var(--afia-v73-text-width,220px)!important;
 height:74px!important;min-height:74px!important;max-height:74px!important;
 display:flex!important;flex-direction:column!important;align-items:stretch!important;
 position:static!important;margin:0!important;padding:0!important;transform:none!important;
}
#formPage#formPage .afia-v73-header .brand-name > .edu-name,
#formPage#formPage .afia-v73-header .brand-name > .school-name,
#page#page .afia-v73-header .brand-name > .edu-name,
#page#page .afia-v73-header .brand-name > .school-name{
 position:relative!important;right:auto!important;left:auto!important;top:auto!important;
 width:100%!important;min-width:0!important;max-width:100%!important;
 height:28px!important;min-height:28px!important;max-height:28px!important;
 display:flex!important;align-items:center!important;justify-content:flex-start!important;
 margin:0!important;padding:0!important;transform:none!important;overflow:hidden!important;
}
#formPage#formPage .afia-v73-header .brand-name .afia-header-expand,
#page#page .afia-v73-header .brand-name .afia-header-expand{
 width:100%!important;min-width:0!important;max-width:100%!important;
 height:26px!important;max-height:26px!important;overflow:hidden!important;
}

/* R11: ID-scoped form skins must not show native inputs beside their editors.
 * Explicit rows avoid nth-child changes caused by native inputs/print spans.
 * These declarations apply equally to the live form and its export clone.
 */
html:root :is(#formPage#formPage,#page#page,.page) .afia-v73-header input.afia-header-native{
 display:none!important;
}
html:root :is(#formPage#formPage,#page#page,.page) .afia-v73-header :is(.brand-name,.institution,.identity){
 display:flex!important;position:static!important;flex-direction:column!important;
 align-items:stretch!important;justify-content:center!important;gap:4px!important;
 width:var(--afia-v73-text-width,220px)!important;
 min-width:var(--afia-v73-text-width,220px)!important;
 max-width:var(--afia-v73-text-width,220px)!important;
 height:74px!important;min-height:74px!important;max-height:74px!important;
 margin:0!important;padding:0!important;transform:none!important;
}
html:root :is(#formPage#formPage,#page#page,.page) .afia-v73-header .identity > .afia-header-expand{
 display:block!important;position:relative!important;inset:auto!important;
 width:100%!important;min-width:0!important;max-width:100%!important;
 height:28px!important;min-height:28px!important;max-height:28px!important;
 flex:0 0 28px!important;margin:0!important;padding:0!important;
 line-height:1.35!important;overflow:hidden!important;white-space:nowrap!important;
 text-align:right!important;transform:none!important;
}
html:root :is(#formPage#formPage,#page#page,.page) .afia-v73-header .identity > .afia-header-expand:nth-of-type(1){
 font-family:Cairo,sans-serif!important;font-size:calc(18px * var(--afia-v73-scale,1))!important;
 font-weight:800!important;color:#fff!important;-webkit-text-fill-color:#fff!important;
}
html:root :is(#formPage#formPage,#page#page,.page) .afia-v73-header .identity > .afia-header-expand:nth-of-type(2){
 font-family:Cairo,sans-serif!important;font-size:calc(16px * var(--afia-v73-scale,1))!important;
 font-weight:600!important;color:#20b0bc!important;-webkit-text-fill-color:#20b0bc!important;
}

/* R12: legacy ID-scoped screen rules must not hide the selected print copy
   in screenshot export documents. Native inputs remain hidden in every mode. */
@media print{
 :is(#formPage,#page,#pageOne,#pageTwo) .afia-v73-header .afia-header-has-print .print-value{display:block!important}
 :is(#formPage,#page,#pageOne,#pageTwo) .afia-v73-header .afia-header-has-print .afia-header-expand{display:none!important}
}
:is(#formPage,#page,#pageOne,#pageTwo).output-mode .afia-v73-header .afia-header-has-print .print-value,
:is(.output-mode,.afia-export-document,.afia-print-mode) :is(#formPage,#page,#pageOne,#pageTwo) .afia-v73-header .afia-header-has-print .print-value{display:block!important}
:is(#formPage,#page,#pageOne,#pageTwo).output-mode .afia-v73-header .afia-header-has-print .afia-header-expand,
:is(.output-mode,.afia-export-document,.afia-print-mode) :is(#formPage,#page,#pageOne,#pageTwo) .afia-v73-header .afia-header-has-print .afia-header-expand{display:none!important}
