/* TITANIO R2 - shared document styles (lib/doc.css)
 * Fonts are local (OFL): Inter for documents, Montserrat for product artwork, IBM Plex Sans Arabic for Arabic text.
 * Pages add their own layout rules; keep brand tokens here so every document looks the same.
 * Arabic pages (html lang="ar" dir="rtl", set by lib/i18n.js) mirror through logical properties: use start/end and
 * inline-start/inline-end, not left/right, for anything that follows the reading direction.
 */
@font-face { font-family: 'Inter'; font-weight: 400; font-style: normal; src: url('fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-style: normal; src: url('fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-style: normal; src: url('fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-style: normal; src: url('fonts/inter-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 300; font-style: normal; src: url('fonts/montserrat-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 400; font-style: normal; src: url('fonts/montserrat-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 500; font-style: normal; src: url('fonts/montserrat-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 600; font-style: normal; src: url('fonts/montserrat-latin-600-normal.woff2') format('woff2'); }
/* IBM Plex Sans Arabic draws only Arabic letters; Latin letters and digits stay in Inter in both languages. */
@font-face {
  font-family: 'IBM Plex Sans Arabic'; font-weight: 400; font-style: normal;
  src: url('fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic'; font-weight: 500; font-style: normal;
  src: url('fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic'; font-weight: 600; font-style: normal;
  src: url('fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic'; font-weight: 700; font-style: normal;
  src: url('fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF;
}

:root {
  --ink: #1b2130;          /* body text */
  --muted: #646b78;        /* secondary text */
  --rule: #d9d4cc;         /* hairlines */
  --paper: #fbfaf8;        /* page background */
  --panel: #f2efea;        /* table header / callout background */
  --navy: #13294b;         /* finish A face (Pantone 2767 C direction) */
  --titanium: #bfb2a7;     /* finish A metal, satin */
  --titanium-hi: #dcd3c9;  /* finish A metal, polished */
  --rose: #c08b7c;         /* finish B metal, satin */
  --rose-hi: #e3b3a1;      /* finish B metal, polished */
  --amber: #b8741a;
  --hold: #9a3412;         /* open hold / release gate */
  --ok: #166534;
  --warn: #92400e;
  --font-doc: 'Inter', 'IBM Plex Sans Arabic', 'Helvetica Neue', Arial, sans-serif;
  --font-brand: 'Montserrat', 'IBM Plex Sans Arabic', 'Helvetica Neue', Arial, sans-serif;
}

html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
body { margin: 0; font-family: var(--font-doc); color: var(--ink); background: #e9e6e1; font-size: 10pt; line-height: 1.45; }

/* Brand header used on every page/sheet */
.t-brand { font-family: var(--font-brand); font-weight: 500; letter-spacing: 0.32em; text-transform: uppercase; }
.t-status { color: var(--hold); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; font-size: 8pt; }
.t-muted { color: var(--muted); }
.t-hold { color: var(--hold); font-weight: 600; }
.t-num { font-variant-numeric: tabular-nums; }

/* Tables */
table.t-table { border-collapse: collapse; width: 100%; font-size: 8.6pt; }
table.t-table th, table.t-table td { border-bottom: 0.5pt solid var(--rule); padding: 3pt 5pt; text-align: start; vertical-align: top; }
table.t-table th { background: var(--panel); font-weight: 600; }
table.t-table td.num, table.t-table th.num { text-align: end; font-variant-numeric: tabular-nums; }

/* Screen: centre pages on a grey desk. Print: no desk. */
.t-page { background: var(--paper); margin: 12px auto; box-shadow: 0 1px 6px rgba(0,0,0,.15); box-sizing: border-box; position: relative; overflow: hidden; }
@media print {
  body { background: none; }
  .t-page { margin: 0; box-shadow: none; page-break-after: always; break-after: page; }
  .no-print { display: none !important; }
}

/* Language switch (lib/i18n.js fills its text and link) */
.lang-switch { font-weight: 600; text-decoration: none; }

/* Arabic edition. Arabic letters join, so Arabic text has no letter spacing; Latin brand and artwork keep theirs.
 * Numbers in number cells read left to right as one unit. The page stays hidden until lib/i18n.js has translated it. */
html[lang="ar"]:not([data-i18n]) body { visibility: hidden; }
html[lang="ar"] body { line-height: 1.6; }
html[lang="ar"] body *:not(svg, svg *, .t-brand, .t-brand *, [translate="no"], [translate="no"] *) { letter-spacing: 0 !important; }
html[dir="rtl"] table.t-table td.num, html[dir="rtl"] table.t-table th.num { text-align: left; unicode-bidi: plaintext; }
html[dir="rtl"] code, html[dir="rtl"] pre { direction: ltr; unicode-bidi: isolate; }
