/* The House of Blacktape: the printed instruments. All geometry in millimetres, A4. */
@font-face { font-family: 'Amiri'; src: url('../assets/fonts/Amiri-Regular.ttf') format('truetype'); font-weight: 400; }
@font-face { font-family: 'Amiri'; src: url('../assets/fonts/Amiri-Bold.ttf') format('truetype'); font-weight: 700; }
@font-face { font-family: 'Courier Prime'; src: url('../assets/fonts/CourierPrime-Regular.ttf') format('truetype'); font-weight: 400; }
@font-face { font-family: 'Courier Prime'; src: url('../assets/fonts/CourierPrime-Bold.ttf') format('truetype'); font-weight: 700; }
@font-face { font-family: 'Questrial'; src: url('../assets/fonts/Questrial-Regular.ttf') format('truetype'); font-weight: 400; }

:root {
  --ink: #211f1c;
  --ink-2: #4a4640;
  --muted: #8a857c;
  --gold: #bdb797;
  --gold-2: #a79f76;
  --rule: #4d4540;
  --cream: #f3ecda;
  --label: #eeede8;
  --paper-w: 210mm;
  --paper-h: 297mm;
}

.bt-page {
  position: relative;
  width: var(--paper-w);
  height: var(--paper-h);
  background: #fff;
  color: var(--ink);
  overflow: hidden;
  font-family: 'Amiri', 'Times New Roman', serif;
  font-size: 11.4pt;
  line-height: 1.72;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  box-sizing: border-box;
}
.bt-page * { box-sizing: border-box; }
.bt-page[dir='rtl'] { text-align: right; }
.bt-page[dir='ltr'] { text-align: left; font-size: 11pt; }

/* ---------------------------------------------------------------- the content box */
.bt-box { position: absolute; left: 22mm; right: 22mm; overflow: hidden; }
.bt-flow { display: flow-root; }

/* ---------------------------------------------------------------- plate: letterhead (cream) */
.plate-letterhead { background: var(--cream); }
.plate-letterhead .bt-box { top: 22mm; bottom: 24mm; }
.plate-letterhead.first .bt-box { top: 83mm; }
.plate-letterhead.first.compact .bt-box { top: 76mm; }
/*
 * A voucher carries no emblem at its foot — the letterhead above already bears the House's mark — so the paper
 * gives that margin back to the voucher's own particulars, and the whole of it stays on one page.
 */
.plate-letterhead.tight-foot .bt-box { bottom: 17mm; }

.lh-head { position: absolute; top: 0; left: 0; right: 0; height: 82mm; text-align: center; }
.lh-corner { position: absolute; top: 13mm; font-size: 7.2pt; line-height: 1.45; }
.lh-corner.office { font-family: 'Amiri', serif; font-weight: 700; font-size: 8.4pt; }
.lh-corner.office small { display: block; font-weight: 400; font-size: 7.6pt; }
.lh-corner.web { font-family: 'Courier Prime', monospace; font-weight: 700; letter-spacing: .02em; font-size: 6.6pt; }
.bt-page[dir='rtl'] .lh-corner.office { right: 22mm; text-align: right; }
.bt-page[dir='rtl'] .lh-corner.web { left: 22mm; text-align: left; direction: ltr; }
.bt-page[dir='ltr'] .lh-corner.office { left: 22mm; text-align: left; font-family: 'Courier Prime', monospace; font-size: 6.6pt; letter-spacing: .03em; }
.bt-page[dir='ltr'] .lh-corner.web { right: 22mm; text-align: right; }
.lh-emblem { position: absolute; top: 11mm; left: 50%; transform: translateX(-50%); width: 40mm; }
.lh-name-ar { position: absolute; top: 44.5mm; left: 50%; transform: translateX(-50%); height: 7.6mm; }
.lh-trade { position: absolute; top: 52.6mm; left: 0; right: 0; font-size: 8pt; line-height: 1.35; }
.lh-trade.en { font-family: 'Courier Prime', monospace; font-size: 7pt; letter-spacing: .08em; top: 45.5mm; }
.lh-date { position: absolute; top: 62mm; left: 0; right: 0; font-size: 12.5pt; }
.bt-page[dir='ltr'] .lh-date { font-size: 11pt; font-family: 'Courier Prime', monospace; top: 58mm; }
.lh-folio { position: absolute; top: 11mm; left: 0; right: 0; text-align: center; font-size: 9.5pt; }
.lh-initials { position: absolute; bottom: 11mm; left: 22mm; right: 22mm; display: flex; justify-content: space-between; font-size: 7.6pt; font-weight: 700; }
.lh-initials span { white-space: nowrap; }
.lh-close-emblem { display: block; margin: 7mm auto 0; width: 24mm; }

/* ---------------------------------------------------------------- plate: charter (white, gold frame) */
.plate-charter { background: #fff; }
.plate-charter::before { content: ''; position: absolute; inset: 8mm; border: .25mm solid var(--gold); pointer-events: none; }
.plate-charter .bt-box { top: 33mm; bottom: 27mm; }
.ch-head { position: absolute; top: 12mm; left: 22mm; right: 22mm; height: 16mm; border-bottom: .2mm solid var(--gold-2); }
.ch-head .angel { position: absolute; top: 1mm; height: 12mm; }
.bt-page[dir='rtl'] .ch-head .angel { left: 16mm; }
.bt-page[dir='ltr'] .ch-head .angel { right: 16mm; }
.ch-head .run { position: absolute; top: 5mm; font-size: 8pt; color: var(--muted); }
.bt-page[dir='rtl'] .ch-head .run { right: 0; }
.bt-page[dir='ltr'] .ch-head .run { left: 0; }
.ch-foot { position: absolute; bottom: 14mm; left: 22mm; right: 22mm; border-top: .2mm solid var(--gold-2); padding-top: 1.6mm; font-size: 7.6pt; color: var(--muted); display: flex; justify-content: space-between; }
.ch-foot .folio { position: absolute; left: 0; right: 0; text-align: center; }

.plate-charter.cover .bt-box { display: none; }
.cv { position: absolute; inset: 0; text-align: center; }
.cv .angel { position: absolute; top: 56mm; left: 50%; transform: translateX(-50%); height: 52mm; }
.cv .house { position: absolute; top: 112mm; left: 0; right: 0; color: var(--gold-2); font-size: 11pt; }
.cv .t1 { position: absolute; top: 122mm; left: 0; right: 0; font-size: 38pt; line-height: 1.3; }
.cv .t2 { position: absolute; top: 140mm; left: 0; right: 0; font-size: 19pt; }
.cv .gr { position: absolute; top: 158mm; left: 36%; right: 36%; border-top: .25mm solid var(--gold); }
.cv .who { position: absolute; top: 164mm; left: 0; right: 0; font-size: 11pt; line-height: 1.6; }
.cv .who small { display: block; font-size: 9pt; color: var(--ink-2); }
.cv .boxes { position: absolute; top: 205mm; left: 27mm; right: 27mm; display: grid; grid-template-columns: repeat(3, 1fr); }
.cv .boxes div { border: .25mm solid var(--gold); border-inline-start: none; height: 12mm; display: flex; align-items: center; justify-content: center; font-size: 11pt; }
.cv .boxes div:first-child { border-inline-start: .25mm solid var(--gold); }
.cv .boxes span { display: block; text-align: center; font-size: 8.4pt; color: var(--ink-2); margin-top: 1mm; }
.cv .lab { position: absolute; top: 218mm; left: 27mm; right: 27mm; display: grid; grid-template-columns: repeat(3, 1fr); font-size: 8.4pt; color: var(--ink-2); text-align: center; }
.cv .conf { position: absolute; top: 236mm; left: 0; right: 0; font-size: 8.6pt; color: var(--ink-2); }
.cv .sign { position: absolute; top: 243mm; left: 0; right: 0; font-family: 'Times New Roman', serif; font-style: italic; font-size: 13pt; direction: ltr; }

/* ---------------------------------------------------------------- plate: plain */
.plate-plain { background: #fff; }
.plate-plain .bt-box { top: 22mm; bottom: 24mm; }
.plate-plain.first .bt-box { top: 50mm; }

/* ---------------------------------------------------------------- blocks */
.b { margin: 0 0 2.2mm; }
.b p, p.b { margin: 0 0 2.2mm; }
.b-p { text-align: justify; text-justify: inter-word; }
.b-p.indent { text-indent: 7mm; }
.b-p.center, .b-center { text-align: center; }
.b-p.small { font-size: 9.6pt; line-height: 1.55; }
.b-p.muted { color: var(--ink-2); }
.b-p.cont { text-indent: 0; }
.b strong { font-weight: 700; }
.b u { text-decoration-thickness: .15mm; text-underline-offset: 1.2mm; }

.b-title { text-align: center; font-weight: 700; font-size: 16pt; margin: 2mm 0 5mm; }
.b-title.u span { text-decoration: underline; text-decoration-thickness: .2mm; text-underline-offset: 2mm; }
.b-title small { display: block; font-size: 11pt; font-weight: 400; }
.bt-page[dir='ltr'] .b-title { font-family: 'Courier Prime', monospace; letter-spacing: .28em; font-size: 12.5pt; }

.b-h { text-align: center; font-weight: 700; margin: 3.2mm 0 1.8mm; }
.b-h span { text-decoration: underline; text-decoration-thickness: .18mm; text-underline-offset: 1.6mm; }
.bt-page[dir='ltr'] .b-h { font-family: 'Courier Prime', monospace; font-size: 10pt; letter-spacing: .06em; }

.b-list { margin: 0 0 2.2mm; padding: 0; list-style: none; }
.b-list li { position: relative; margin-bottom: 1mm; text-align: justify; }
.bt-page[dir='rtl'] .b-list li { padding-right: 9mm; }
.bt-page[dir='ltr'] .b-list li { padding-left: 9mm; }
.b-list li .n { position: absolute; top: 0; width: 8mm; }
.bt-page[dir='rtl'] .b-list li .n { right: 0; }
.bt-page[dir='ltr'] .b-list li .n { left: 0; }
.b-list.bullet li .n::before { content: '•'; color: var(--gold-2); }
.b-list.check li .n::before { content: '☐'; }
.b-list.lead { margin-top: -1mm; }

.b-addressee { line-height: 2.05; margin-bottom: 3mm; }
.b-addressee div { white-space: pre-wrap; }
.b-closing { margin-top: 4mm; }
.b-gap { margin: 0; }

.b-box { background: var(--label); padding: 2.2mm 3mm; text-align: justify; }
.plate-letterhead .b-box { background: rgba(33, 31, 28, .05); }

.b-notice { border: .3mm solid var(--gold); background: var(--label); padding: 2mm 4mm; text-align: center; margin: 1mm 0 3mm; }
.b-notice .nt { color: var(--gold-2); font-weight: 700; display: block; }
.b-notice .nx { text-align: justify; font-size: 9.6pt; line-height: 1.6; }

/* Charter headings */
.b-sheet { display: flex; gap: 6mm; align-items: flex-end; justify-content: flex-start; margin: 0 0 1mm; font-size: 8.8pt; color: var(--ink-2); }
.b-sheet .v { min-width: 42mm; border-bottom: .2mm solid var(--ink); text-align: center; color: var(--ink); padding-bottom: .4mm; }
.b-h1 { font-size: 20pt; font-weight: 700; line-height: 1.45; border-bottom: .25mm solid var(--gold); padding-bottom: 1mm; margin: 0 0 3mm; }
.b-h1 small { font-size: 12pt; font-weight: 400; }
.b-h2 { font-weight: 700; font-size: 11.6pt; border-bottom: .2mm solid var(--gold); margin: 3.4mm 0 2mm; padding-bottom: .4mm; }
.b-h2 small { font-weight: 400; font-size: 8.8pt; color: var(--ink-2); margin-inline-start: 2mm; }
.b-h2 .num { color: var(--gold-2); }
.b-part { text-align: center; border-top: .25mm solid var(--gold); border-bottom: .25mm solid var(--gold); padding: 2mm 0 1.4mm; margin: 5mm 0 4mm; line-height: 1.45; }
.b-part .pn { display: block; color: var(--gold); font-size: 9.2pt; }
.b-part .pt { display: block; font-weight: 700; font-size: 15pt; }
.b-art { font-weight: 700; margin: 3mm 0 .6mm; }
.b-art .an { color: var(--gold-2); font-weight: 400; margin-inline-end: 2.4mm; }

/* key / value rows (the registration sheet) */
.b-kv { width: 100%; border-collapse: separate; border-spacing: 0 1.1mm; margin: 0 0 2mm; table-layout: fixed; }
.b-kv td { vertical-align: bottom; padding: 1.2mm 2mm .6mm; font-size: 10.4pt; line-height: 1.45; }
.b-kv td.k { background: var(--label); font-weight: 700; font-size: 9.2pt; vertical-align: middle; }
.b-kv td.v { border-bottom: .22mm solid var(--ink); }
.plate-letterhead .b-kv td.k { background: rgba(33, 31, 28, .06); }
.b-kv td.v.ltr { direction: ltr; text-align: right; }
/*
 * A voucher is a form, not a contract: its grid is read at a counter, in one glance, and the whole paper must be
 * one page. The rows are set closer together, and the label type a shade smaller, without shrinking the figures.
 */
.b-kv.dense { border-spacing: 0 .5mm; margin-bottom: 1.4mm; }
.b-kv.dense td { padding: .5mm 1.6mm .35mm; line-height: 1.3; }
.b-kv.dense td.k { font-size: 8.6pt; }
/*
 * A voucher is signed by more hands than a contract — whoever asked, whoever allowed, whoever paid, the House,
 * whoever took the money — and they sign at a counter, in one row. The columns are set closer so a name has room
 * to stand on one line, and the block sits tighter to the paper.
 */
.b-sig.dense { gap: 4mm; margin: 3mm 0 1mm; }
.b-sig.dense .party { line-height: 1.5; font-size: 9.4pt; }
.b-sig.dense .hd { font-size: 8.8pt; }
.b-sig.dense .sl { margin-top: 3mm; }
.b-sig.dense .tw { font-size: 8.6pt; letter-spacing: .03em; }

/* definitions */
.b-defs { width: 100%; border-collapse: collapse; margin: 0 0 2.4mm; table-layout: fixed; }
.b-defs td { border-bottom: .15mm dotted var(--muted); padding: 1.4mm 1mm; vertical-align: top; line-height: 1.6; }
.b-defs td.t { font-weight: 700; width: 30mm; }

/* tables */
.b-table { width: 100%; border-collapse: collapse; margin: 0 0 2.6mm; table-layout: fixed; font-size: 9.6pt; line-height: 1.45; }
.b-table th, .b-table td { border: .2mm solid var(--ink); padding: 1.4mm 1.6mm; vertical-align: top; }
.b-table th { background: var(--label); font-weight: 700; }
.plate-letterhead .b-table th { background: rgba(33, 31, 28, .07); }
.b-table.light th, .b-table.light td { border: none; border-bottom: .15mm solid #cfcac0; }
.b-table.light th { background: var(--label); }
.b-table td.num, .b-table th.num { width: 9mm; text-align: center; }
.b-table tr.tall td { height: 9mm; }
.b-table td.box { border: .25mm solid var(--ink); }

/* national ID digit boxes */
/* A number runs left to right in Arabic too: the first digit is in the leftmost box, as the ID reads everywhere else on the paper. */
.b-idbox { display: flex; gap: 0; direction: ltr; }
.b-idbox span { width: 7.4mm; height: 7mm; border: .2mm solid var(--ink); border-inline-start: none; display: flex; align-items: center; justify-content: center; font-size: 10.5pt; }
.b-idbox span:first-child { border-inline-start: .2mm solid var(--ink); }

/* check boxes */
.b-checks { display: grid; gap: 1.2mm 8mm; margin: 0 0 2.4mm; }
.b-idcopy { display: flex; flex-direction: column; align-items: center; gap: 5mm; margin: 4mm 0 2mm; }
.b-idcopy figure { margin: 0; text-align: center; }
.b-idcopy img { display: block; width: 108mm; height: 68mm; object-fit: contain; border: .25mm solid rgba(33, 31, 28, .35); border-radius: 3mm; background: #fff; }
.b-idcopy figcaption { font-size: 8.6pt; margin-top: 1.4mm; color: rgba(33, 31, 28, .7); }
.b-checks div { display: flex; gap: 2mm; align-items: baseline; }
.b-checks i { font-style: normal; font-size: 11pt; }

/* ruled lines for handwriting */
.b-lines div { border-bottom: .15mm solid #bdb8ad; height: 8.6mm; }

/* signature rows (charter) */
.b-signrow { display: grid; margin: 9mm 0 3mm; border-top: .25mm solid var(--ink); font-size: 8.8pt; color: var(--ink-2); padding-top: .8mm; }
.b-signrow span { text-align: center; }

/* signature blocks (letterhead) */
.b-sig { display: grid; gap: 10mm; margin: 6mm 0 2mm; align-items: start; }
.b-sig .party { line-height: 1.75; }
.b-sig .hd { font-weight: 700; }
.b-sig .tw { font-family: 'Courier Prime', monospace; font-weight: 700; letter-spacing: .06em; font-size: 9.4pt; direction: ltr; }
.bt-page[dir='rtl'] .b-sig .tw { text-align: right; }
.b-sig .plate { height: 6.6mm; display: block; margin: .8mm 0 2mm; }
.bt-page[dir='rtl'] .b-sig .plate { margin-inline-start: 0; }
.b-sig .sl { margin-top: 5mm; }
.b-sig .seal { width: 32mm; height: 22mm; border: .2mm dashed #b7b2a6; margin-top: 2mm; display: flex; align-items: center; justify-content: center; font-size: 8pt; color: var(--muted); }
/* A joint House signature: two hands side by side under one House name, the seal once below them. */
.b-sig .party.joint .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; }
.b-sig .party.joint .hand { line-height: inherit; }
.b-sig .party.joint .once { margin-top: 2mm; }
.b-sig.dense .party.joint .pair { gap: 3mm; }

.b-emblem { text-align: center; margin: 6mm 0 0; }
.b-emblem img { width: 24mm; }

.b-bank { line-height: 1.7; direction: rtl; }
.b-bank div { unicode-bidi: plaintext; }

/* ---------------------------------------------------------------- security */
.sec { position: absolute; z-index: 5; }
.sec-qr { width: 13mm; height: 13mm; background: #fff; padding: .6mm; }
.sec-qr svg { width: 100%; height: 100%; display: block; }
.sec-code { font-family: 'Courier Prime', monospace; font-size: 5.4pt; letter-spacing: .04em; color: var(--ink); white-space: nowrap; direction: ltr; }
.sec-vert { transform-origin: left top; transform: rotate(-90deg); }
.plate-letterhead .sec.qr { left: 5mm; bottom: 20mm; }
.plate-letterhead .sec.v { left: 9.4mm; bottom: 36mm; }
.plate-plain .sec.qr { left: 5mm; bottom: 20mm; }
.plate-plain .sec.v { left: 9.4mm; bottom: 36mm; }
.plate-charter .sec.qr { left: 9.4mm; bottom: 26mm; width: 11.2mm; height: 11.2mm; }
.plate-charter .sec.v { left: 13.2mm; bottom: 40mm; }
.sec-micro { position: absolute; left: 0; right: 0; bottom: 3.2mm; height: 2mm; overflow: hidden; font-family: 'Courier Prime', monospace; font-size: 3.6pt; line-height: 2mm; color: #9c968b; white-space: nowrap; direction: ltr; text-align: left; letter-spacing: .02em; }

.draft-mark { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 6; }
.draft-mark span { transform: rotate(-32deg); font-size: 46pt; color: rgba(160, 40, 30, .08); font-weight: 700; white-space: nowrap; font-family: 'Amiri', serif; }

/* paper modes: the pre-printed Series A sheets carry the pattern, border and thread but no letterhead,
   so the letterhead marks print and only the backgrounds are left out. */
.paper-preprinted.plate-letterhead, .paper-preprinted.plate-charter { background: #fff; }
.paper-preprinted.plate-charter::before { display: none; }
.paper-preprinted .sec-micro { display: none; }

/* ---------------------------------------------------------------- the security back page */
.back { background: #fff; }
.back .pattern { position: absolute; inset: 0; background-repeat: repeat; opacity: 1; }
.back .card { position: absolute; left: 34mm; right: 34mm; top: 64mm; background: #fff; padding: 8mm 8mm 7mm; text-align: center; box-shadow: 0 0 0 .25mm var(--gold); }
.back .card .em { width: 44mm; display: block; margin: 0 auto 2mm; }
.back .card .lbl { font-size: 8.6pt; color: var(--gold-2); letter-spacing: .02em; }
.back .card .qr { width: 44mm; height: 44mm; margin: 3mm auto 2mm; }
.back .card .qr svg { width: 100%; height: 100%; }
.back .card .serial { font-family: 'Courier Prime', monospace; font-weight: 700; font-size: 11.4pt; direction: ltr; letter-spacing: .04em; }
.back .card .bar { height: 11mm; margin: 2mm auto 1mm; display: block; }
.back .card dl { display: grid; grid-template-columns: auto 1fr; gap: .6mm 4mm; font-size: 9pt; line-height: 1.45; margin: 3mm 0 0; text-align: start; }
.back .card dt { color: var(--ink-2); }
.back .card dd { margin: 0; font-weight: 700; }
.back .card .note { font-size: 7.8pt; color: var(--ink-2); margin-top: 3mm; line-height: 1.5; }
.back .card .sign { font-family: 'Times New Roman', serif; font-style: italic; margin-top: 2mm; direction: ltr; }

/* ---------------------------------------------------------------- the House security paper (generated) */
.paper-security { background: #fff !important; }
.plate-charter.paper-security::before { display: none; }
.sec-paper { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.sec-paper .wm { position: absolute; left: 60mm; top: 92mm; width: 90mm; opacity: .26; }
.sec-paper .face { position: absolute; inset: 0; background-size: 210mm 297mm; background-repeat: no-repeat; }
.sec-over { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.sec-over svg { position: absolute; inset: 0; width: 210mm; height: 297mm; }
.paper-security .bt-box, .paper-security .lh-head, .paper-security .ch-head, .paper-security .ch-foot, .paper-security .cv { z-index: 2; }
.paper-security .bt-box { position: absolute; }
.paper-security.plate-letterhead .bt-box, .paper-security.plate-plain .bt-box, .paper-preprinted.plate-letterhead .bt-box { bottom: 28mm; }
.paper-security.plate-charter .bt-box, .paper-preprinted.plate-charter .bt-box { bottom: 31mm; }
/* The voucher's tight foot holds on the House's own papers too: nothing stands under it but the sheet number. */
.paper-security.plate-letterhead.tight-foot .bt-box, .paper-preprinted.plate-letterhead.tight-foot .bt-box { bottom: 21mm; }
.paper-security .lh-corner, .paper-preprinted .lh-corner { top: 14mm; }
.paper-security .lh-folio, .paper-preprinted .lh-folio { top: 13.5mm; }
.paper-security .lh-initials, .paper-preprinted .lh-initials { bottom: 19.5mm; }
.paper-security .ch-foot, .paper-preprinted .ch-foot { bottom: 18.5mm; }
.paper-security .sec.qr, .paper-preprinted .sec.qr { left: 12.6mm; bottom: 42mm; width: 9mm; height: 9mm; padding: .4mm; }
.paper-security .sec.v, .paper-preprinted .sec.v { left: 16.4mm; bottom: 53mm; }
.sec-sheetno { position: absolute; right: 16mm; bottom: 13.8mm; z-index: 3; font-family: 'Courier Prime', monospace; font-weight: 700; font-size: 6.4pt; letter-spacing: .05em; direction: ltr; color: #3f3d38; }
.draft-mark { z-index: 6; }

/* the security back */
.sec-back { direction: ltr; text-align: left; font-family: 'Courier Prime', monospace; }
.sec-back > div { position: absolute; z-index: 3; }
.sec-back .sec-paper, .sec-back .sec-over { z-index: 1; }
.sec-back .sb-info { left: 26mm; right: 26mm; top: 60.5mm; text-align: center; font-family: 'Amiri', serif; font-size: 8.4pt; color: #4a4640; line-height: 1.5; }
.sec-back .sb-cap { top: 213mm; font-size: 5pt; letter-spacing: .35em; color: #6f6d66; }
.sec-back .sb-cap.l { left: 25mm; width: 42mm; text-align: center; }
.sec-back .sb-cap.r { right: 25mm; width: 36mm; text-align: center; }
.sec-back .sb-bar { left: 25mm; top: 217mm; width: 42mm; height: 16mm; background: #fff; border: .25mm solid #b4b0a4; padding: 2mm 2.5mm; }
.sec-back .sb-bar img { width: 100%; height: 100%; display: block; }
.sec-back .sb-draft { font-size: 12pt; font-weight: 700; text-align: center; line-height: 12mm; color: #962d22; }
.sec-back .sb-num { left: 14mm; width: 64mm; top: 235.5mm; text-align: center; font-weight: 700; font-size: 7.4pt; letter-spacing: .06em; color: #3f3d38; }
.sec-back .sb-sub { top: 240.5mm; font-size: 4.8pt; letter-spacing: .3em; color: #6f6d66; }
.sec-back .sb-sub.l { left: 14mm; width: 64mm; text-align: center; }
.sec-back .sb-sub.r { right: 18mm; width: 50mm; text-align: center; }
.sec-back .sb-qr { right: 25mm; top: 217mm; width: 30mm; height: 30mm; background: #fff; border: .25mm solid #b4b0a4; padding: 1.4mm; }
.sec-back .sb-qr svg { width: 100%; height: 100%; display: block; }
.sec-back .sb-chk { right: 18mm; width: 50mm; top: 248.5mm; text-align: center; font-weight: 700; font-size: 8pt; letter-spacing: .08em; color: #3f3d38; }
.sec-back .sb-sub.r { top: 253.5mm; }
.sec-back .sb-text { left: 19mm; right: 19mm; top: 263mm; font-size: 4.3pt; line-height: 1.5; color: #57544d; text-align: justify; }
.sec-back .sb-text .ar { display: block; font-family: 'Amiri', serif; font-size: 6pt; text-align: right; margin-top: .6mm; }
.sec-back .sb-foot { left: 0; right: 0; bottom: 14.2mm; text-align: center; font-size: 4.2pt; letter-spacing: .4em; color: #6f6d66; }
.paper-plain.plate-letterhead { background: #fff; }
.cover .sec-paper .wm { display: none; }

/* ---------------------------------------------------------------- English: the House typewriter form (Blacktape_Letterhead_Template_EN) */
.bt-page[dir='ltr'] { font-family: 'Courier Prime', 'Courier New', monospace; font-size: 9.4pt; line-height: 1.62; color: #2a2825; }
.bt-page[dir='ltr'] .b-p { text-align: left; }
.bt-page[dir='ltr'] .b-p.indent { text-indent: 12mm; }
.bt-page[dir='ltr'] .b-p.center { text-align: center; }
.bt-page[dir='ltr'] .b-title { font-weight: 700; letter-spacing: .62em; font-size: 10.6pt; margin: 3mm 0 6mm; }
.bt-page[dir='ltr'] .b-title.u span { text-decoration: none; }
.bt-page[dir='ltr'] .b-h { font-size: 9.4pt; letter-spacing: 0; text-transform: uppercase; margin: 4.2mm 0 2.2mm; }
.bt-page[dir='ltr'] .b-list { margin-left: 12mm; }
.bt-page[dir='ltr'] .b-list li { text-align: left; padding-left: 7mm; }
.bt-page[dir='ltr'] .b-list li .n { width: 7mm; }
.bt-page[dir='ltr'] .b-addressee { line-height: 2.1; }
.bt-page[dir='ltr'] .b-kv td, .bt-page[dir='ltr'] .b-table { font-size: 8.6pt; }
.bt-page[dir='ltr'] .b-sig .tw { font-size: 9.4pt; letter-spacing: 0; }
.bt-page[dir='ltr'] .b-sig .sub { margin-bottom: 4mm; }
.bt-page[dir='ltr'] .b-sig .sl { margin-top: 3mm; }
.bt-page[dir='ltr'] .lh-initials { font-weight: 400; font-size: 6.8pt; font-family: 'Courier Prime', monospace; }
.bt-page[dir='ltr'] .lh-folio { font-family: 'Courier Prime', monospace; font-size: 8.4pt; }
.lh-trade.en b { display: block; font-size: 7.6pt; letter-spacing: .02em; margin-bottom: .6mm; color: #2a2825; }
.bt-page[dir='ltr'] .lh-date { top: 57mm; font-size: 9.4pt; }
.bt-page[dir='ltr'] .b-closing { margin-top: 6mm; }

/* The security microtext runs left to right on every paper: on an Arabic page it inherited right-to-left, ran from
   its anchor outward off the sheet, and was cut away, so Arabic papers printed without it. */
.sec-over svg, .sec-over svg text { direction: ltr; unicode-bidi: normal; }

/* On a charter page the initials sat at the footer's own height and printed over «Confidential. From the House's
   papers.» and the page number. They take the gap between the text and the footer's rule instead. */
.plate-charter .lh-initials { bottom: 21.2mm; }
.paper-security.plate-charter .lh-initials, .paper-preprinted.plate-charter .lh-initials { bottom: 25.6mm; }

/* ---------------------------------------------------------------- the paper is the paper, wherever it is shown */
/*
 * The office's screens use some of the same short names as the paper (.check, .card, .who). In the preview those
 * rules reached into the page — a checklist set as a row of narrow columns, the back card framed, the cover's
 * names stacked as a flex column — so the preview broke its pages differently from print.html, which loads this
 * sheet alone. On the paper they are put back to the paper's own.
 */
.bt-page .b-list.check { display: block; gap: 0; cursor: auto; font-size: inherit; align-items: normal; margin-bottom: 2.2mm; }
.bt-page .cv .who { display: block; gap: 0; flex-direction: row; }
.bt-page.back .card { border: 0; border-radius: 0; }
.bt-page.back .card .sign { margin-bottom: 0; }
/* The back card's line «وثيقة مؤمّنة صادرة عن الدار» was tracked like the English one, and its letters came apart. */
.bt-page.back[dir='rtl'] .card .lbl { letter-spacing: normal; }

/* ---------------------------------------------------------------- rhythm and hierarchy */
/* Title, then article headings, then clauses: each a clear step down, and more air before a heading than after it. */
.b-title { margin: 1mm 0 6mm; line-height: 1.5; }
.b-h { margin: 3.5mm 0 1.5mm; }
.bt-page[dir='ltr'] .b-h { margin: 4.6mm 0 1.8mm; }
/* The English plate sets its paragraphs ragged, as a typewriter does; a boxed clause follows them, not justified. */
.bt-page[dir='ltr'] .b-box, .bt-page[dir='ltr'] .b-list li { text-align: left; }
/*
 * The English title is set in the House's typewriter capitals, tracked wide enough to read as a title and not so
 * wide that its words fall apart into letters: at .62em a long title broke across two lines letter by letter.
 */
.bt-page[dir='ltr'] .b-title { letter-spacing: .24em; word-spacing: .3em; font-size: 11pt; line-height: 1.6; margin: 2mm 0 7mm; }
/* Arabic letters join: words typed in Arabic into an English paper are never tracked. */
.bt-page[dir='ltr'] .has-ar, .bt-page[dir='ltr'] .has-ar * { letter-spacing: normal; word-spacing: normal; font-family: 'Amiri', serif; }
/* The first part of a paragraph broken by the page ends mid-sentence: its last line is set full, like the others. */
.bt-page[dir='rtl'] .b-p.runon, .bt-page[dir='rtl'] .b-box.runon, .bt-page[dir='rtl'] .b-list li.runon { text-align-last: justify; }

/* ---------------------------------------------------------------- tables */
/* Fine rules inside, a firm rule under the head; a word too long for its column breaks inside the column. */
.b-table th, .b-table td { border: .15mm solid #8f897d; overflow-wrap: anywhere; }
.b-table thead th { border-bottom: .35mm solid var(--ink); vertical-align: bottom; }
.b-table.light thead th { border-bottom: .3mm solid var(--ink-2); }
.b-kv td, .b-defs td { overflow-wrap: anywhere; }
.bt-page[dir='ltr'] .b-table, .bt-page[dir='ltr'] .b-kv { hyphens: auto; -webkit-hyphens: auto; }
.bt-page[dir='ltr'] .b-table td, .bt-page[dir='ltr'] .b-kv td.v { font-variant-numeric: tabular-nums; }
.b-table tr, .b-kv tr { break-inside: avoid; }

/* ---------------------------------------------------------------- check boxes */
/* Four or more short choices run on as a line of their own widths, not as columns too narrow for their words. */
.b-checks div { min-width: 0; }
.b-checks.run { display: flex; flex-wrap: wrap; gap: 1.2mm 8mm; }

/* ---------------------------------------------------------------- signatures */
/*
 * Every party opens on the same line: its heading over a fine gold rule, the same width for each, so the House's
 * column and the other party's read as a pair, and the seal's box is drawn in the same hand.
 */
.b-sig { break-inside: avoid; }
.b-sig .party { min-width: 0; }
.b-sig .hd { border-bottom: .2mm solid var(--gold); padding-bottom: .6mm; margin-bottom: 1.8mm; }
.b-sig .seal { width: 34mm; height: 22mm; border: .25mm dashed #a9a395; }
.b-sig.dense .hd { margin-bottom: 1mm; }

/* ---------------------------------------------------------------- security (appended; the stamp's own rules, not the layout's) */
/* A figure of money framed by stars on a fine tint, the serial in microtext behind it once issued: it cannot be lengthened by hand. */
.bt-amt { padding: 0 .5mm; background-color: rgba(179, 174, 134, .14); background-image: var(--bt-amt-micro, repeating-linear-gradient(45deg, rgba(141, 135, 87, .22) 0 .15mm, transparent .15mm .6mm)); background-size: 30mm 1.5mm; background-repeat: repeat; -webkit-print-color-adjust: exact; print-color-adjust: exact; white-space: nowrap; }
.bt-amt::before, .bt-amt::after { content: '**'; font-family: 'Courier Prime', monospace; font-size: .72em; letter-spacing: -.05em; color: #6f6a4c; }
/* The serial in microtext along a signature line, outside the flow of the text. */
.sec-sl { position: relative; }
.sec-sigmicro { position: absolute; inset-inline: 0; bottom: -.4mm; height: 1.1mm; overflow: hidden; white-space: nowrap; direction: ltr; font-family: 'Courier Prime', monospace; font-size: 2.3pt; line-height: 1.1mm; color: #8a8576; letter-spacing: 0; pointer-events: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* The right column of the back is centred on the QR itself (its box is 30 mm wide, 25 mm from the edge: its centre
   is 40 mm from the right edge), and letter-spaced words carry the spacing on both sides so they sit truly centred. */
.sec-back .sb-cap.r { right: 22mm; width: 36mm; }
.sec-back .sb-chk { right: 15mm; width: 50mm; }
.sec-back .sb-sub.r { right: 15mm; width: 50mm; }
.sec-back .sb-cap { padding-inline-start: .35em; }
.sec-back .sb-sub { padding-inline-start: .3em; }
.sec-back .sb-chk { padding-inline-start: .08em; }

/* On security paper the emblem's wings reached into the microtext line along the top border: it stands a little
   lower there, a hair smaller, so it clears the line above and the House's name below. */
.paper-security .lh-emblem { top: 13.4mm; width: 38.6mm; }
