/* =====================================================================
   EDC — certificate verification (certificate.php) + registry extras (certificates.php)
   Self-contained: the verification page loads only this stylesheet. Mobile-first, logical properties (RTL).
   ===================================================================== */

.vp {
  --navy: #091C2C;
  --navy-2: #0D2537;
  --navy-3: #16344F;
  --gold: #B3832B;
  --gold-2: #D4A44C;
  --gold-text: #7D5A1D;
  --ink: #0B1620;
  --text: #22303B;
  --muted: #55616B;
  --line: #E1DED6;
  --line-2: #CDD2D7;
  --bg: #F3F1EC;
  --card: #FFFFFF;
  --wa: #0F7A3F;
  --ok: #0B5E3B;     --ok-ink: #0B5E3B;   --ok-tint: #E5F2EA;
  --warn: #7A4A00;   --warn-ink: #7A4A00; --warn-tint: #FCF1DA;
  --bad: #9E2617;    --bad-ink: #9E2617;  --bad-tint: #FBE8E4;
  --info: #17466D;   --info-ink: #17466D; --info-tint: #E6EEF6;
  --f-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --r: 14px;
  --r-sm: 9px;
  --shadow: 0 1px 2px rgba(9, 28, 44, .05), 0 10px 30px -14px rgba(9, 28, 44, .22);
}
[dir="rtl"] .vp, .vp[dir="rtl"], [dir="rtl"].vp {
  --f-body: "IBM Plex Sans Arabic", "Archivo", Tahoma, Arial, sans-serif;
}

/* ---------- base (verification page only) ---------- */
html:has(> body.vp) { -webkit-text-size-adjust: 100%; background: var(--navy, #091C2C); }
body.vp {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
[dir="rtl"] body.vp { line-height: 1.75; }
.vp *, .vp *::before, .vp *::after { box-sizing: border-box; }
.vp img { max-width: 100%; height: auto; display: block; }
.vp a { color: inherit; }
.vp h1, .vp h2, .vp h3, .vp p, .vp ul, .vp dl, .vp dd, .vp figure { margin: 0; }
.vp ul { padding: 0; }
.vp button, .vp input { font: inherit; }
.vp .ic { width: 1.15em; height: 1.15em; flex: none; }
.vp :focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.vp .mono { font-family: var(--f-mono); letter-spacing: .01em; }
.vp main { flex: 1 0 auto; outline: 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.vwrap { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); }
@media (min-width: 720px) { .vwrap { padding-inline: 28px; } }

.vskip { position: absolute; inset-inline-start: 12px; top: -80px; z-index: 50; background: var(--gold-2); color: var(--navy) !important; padding: 10px 16px; border-radius: 8px; font-weight: 700; text-decoration: none; }
.vskip:focus { top: 10px; }

/* ---------- top bar ---------- */
.vbar { background: var(--navy); color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.vbar__in { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 64px; }
.vbar__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; padding-block: 8px; }
.vbar__logo { width: 40px; height: auto; flex: none; }
.vbar__txt { display: grid; min-width: 0; line-height: 1.2; }
.vbar__title { font-weight: 700; font-size: 15px; letter-spacing: .005em; color: #fff; }
.vbar__co { font-size: 11.5px; color: #B4C0CA; margin-top: 2px; display: none; }
.vbar__acts { display: flex; align-items: center; gap: 6px; flex: none; }
.vbar__lang, .vbar__site {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; min-width: 44px; padding-inline: 12px;
  border: 1px solid rgba(255, 255, 255, .24); border-radius: 999px;
  color: #fff; text-decoration: none; font-size: 14px; font-weight: 600;
  transition: background-color .2s, border-color .2s;
}
.vbar__lang:hover, .vbar__site:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .5); }
.vbar__lang .ic { display: none; }
.vbar__lang span[lang="ar"], .vbar__lang:lang(ar) { font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif; }
.vbar__site { padding-inline: 0; width: 44px; }
.vbar__site-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.vbar__site-s { display: none; }
.vp :is(.vbar, .vban, .vfoot) :focus-visible { outline-color: var(--gold-2); }
@media (min-width: 420px) { .vbar__co { display: block; } .vbar__logo { width: 44px; } }
@media (min-width: 720px) {
  .vbar__in { min-height: 72px; }
  .vbar__title { font-size: 16.5px; }
  .vbar__co { font-size: 12.5px; }
  .vbar__lang .ic { display: block; }
  .vbar__site { width: auto; padding-inline: 14px; }
  .vbar__site-l { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}

/* ---------- status banner ---------- */
.vban {
  --tone: var(--navy-3);
  position: relative;
  overflow: hidden;
  background-color: var(--tone);
  background-image:
    repeating-radial-gradient(circle at 105% -10%, rgba(255, 255, 255, .055) 0 1px, transparent 1.5px 13px),
    linear-gradient(180deg, rgba(0, 0, 0, .0), rgba(0, 0, 0, .12));
  color: #fff;
  padding: 22px 0 54px;
}
[dir="rtl"] .vban { background-image: repeating-radial-gradient(circle at -5% -10%, rgba(255, 255, 255, .055) 0 1px, transparent 1.5px 13px), linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .12)); }
.vban--ok { --tone: var(--ok); }
.vban--warn { --tone: var(--warn); }
.vban--bad, .vban--nf { --tone: var(--bad); }
.vban--info { --tone: var(--info); }
.vban--neutral { --tone: var(--navy-3); }
.vban__in { display: flex; gap: 14px; align-items: flex-start; }
.vban__ic {
  flex: none; display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: #fff; color: var(--tone);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .14);
  margin-top: 2px;
}
.vban__ic .ic { width: 30px; height: 30px; stroke-width: 2.2; }
.vban__body { min-width: 0; }
.vban__k { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .86); margin-bottom: 4px; }
[dir="rtl"] .vban__k { letter-spacing: 0; font-family: var(--f-body); font-size: 12.5px; text-transform: none; }
.vban__code { font-family: var(--f-mono); letter-spacing: .04em; white-space: nowrap; }
.vban__h { font-size: 25px; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
[dir="rtl"] .vban__h { line-height: 1.4; letter-spacing: 0; font-weight: 700; }
.vban__p { margin-top: 8px; font-size: 15.5px; color: rgba(255, 255, 255, .95); max-width: 62ch; }
.vban__p strong { font-weight: 700; color: #fff; white-space: nowrap; }
.vban__t { display: flex; gap: 7px; align-items: flex-start; margin-top: 12px; font-size: 12.5px; color: rgba(255, 255, 255, .86); }
.vban__t .ic { width: 15px; height: 15px; margin-top: 2px; }
@media (min-width: 720px) {
  .vban { padding: 34px 0 72px; }
  .vban__in { gap: 20px; align-items: center; }
  .vban__ic { width: 68px; height: 68px; }
  .vban__ic .ic { width: 38px; height: 38px; }
  .vban__h { font-size: 34px; }
  .vban__p { font-size: 17px; }
  .vban__t { font-size: 13.5px; }
}

/* ---------- layout ---------- */
.vgrid { display: grid; gap: 16px; position: relative; margin-top: -34px; padding-bottom: 36px; align-items: start; }
.vmain, .vside { display: grid; gap: 16px; min-width: 0; }
@media (min-width: 720px) { .vgrid { margin-top: -46px; gap: 22px; } .vmain, .vside { gap: 22px; } }
@media (min-width: 1024px) {
  .vgrid { grid-template-columns: minmax(0, 1fr) 340px; padding-bottom: 56px; }
  .vside { position: sticky; top: 20px; }
}

.vcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; position: relative; }
.vcard > h2, .vdoc__head h2 { font-size: 17px; font-weight: 750; color: var(--navy); line-height: 1.3; }
@media (min-width: 720px) { .vcard { padding: 26px 28px; } }

/* ---------- status pill (same semantics as status_badge()) ---------- */
.vp .status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; padding: 5px 11px; border-radius: 999px; white-space: nowrap; border: 1px solid currentColor; line-height: 1.3; }
.vp .status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.vp .status--valid { color: var(--ok-ink); background: var(--ok-tint); }
.vp .status--expiring { color: var(--warn-ink); background: var(--warn-tint); }
.vp .status--expired, .vp .status--revoked { color: var(--bad-ink); background: var(--bad-tint); }
.vp .status--none { color: var(--info-ink); background: var(--info-tint); }
.vp .status--unknown { color: var(--warn-ink); background: var(--warn-tint); border-style: dashed; }
.vp .status--unknown i { background: transparent; border: 2px solid currentColor; }

/* ---------- certificate card ---------- */
.vcert { overflow: hidden; }
.vcert__wm { position: absolute; inset-inline-end: -46px; top: -34px; width: 210px; opacity: .06; pointer-events: none; user-select: none; }
.vcert__head { position: relative; }
.vcert__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.vcert__cat { display: inline-flex; align-items: center; gap: 7px; font-family: var(--f-mono); font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-text); min-width: 0; }
.vcert__cat .ic { width: 17px; height: 17px; color: var(--gold); }
[dir="rtl"] .vcert__cat { font-family: var(--f-body); letter-spacing: 0; font-size: 13px; }
.vcert__title { margin-top: 12px; font-size: 22px; line-height: 1.25; font-weight: 800; color: var(--navy); letter-spacing: -.01em; }
[dir="rtl"] .vcert__title { line-height: 1.45; letter-spacing: 0; font-weight: 700; }
.vcert__to { margin-top: 14px; padding: 12px 14px; background: #F8F6F1; border-inline-start: 4px solid var(--gold); border-radius: 4px var(--r-sm) var(--r-sm) 4px; }
[dir="rtl"] .vcert__to { border-radius: var(--r-sm) 4px 4px var(--r-sm); }
.vcert__to span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.vcert__to strong { display: block; font-size: 19px; line-height: 1.3; color: var(--ink); font-weight: 750; margin-top: 2px; }
@media (min-width: 720px) {
  .vcert__title { font-size: 28px; }
  .vcert__to strong { font-size: 22px; }
  .vcert__wm { width: 260px; inset-inline-end: -50px; top: -40px; }
}

.vdl { margin-top: 16px; display: grid; }
.vdl__row { display: grid; grid-template-columns: minmax(104px, 40%) minmax(0, 1fr); gap: 4px 14px; padding-block: 11px; border-bottom: 1px solid #EDEBE5; align-items: baseline; }
.vdl__row:last-child { border-bottom: 0; }
.vdl dt { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.vdl dd { font-size: 15.5px; color: var(--ink); font-weight: 600; min-width: 0; }
.vdl dd.mono { font-size: 14.5px; font-weight: 600; }
.vdl__row--code dd { color: var(--navy); letter-spacing: .05em; }
@media (min-width: 720px) {
  .vdl { grid-template-columns: 1fr 1fr; column-gap: 34px; margin-top: 20px; }
  .vdl__row { grid-template-columns: 1fr; padding-block: 12px; }
  .vdl__row:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
  .vdl dt { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
  [dir="rtl"] .vdl dt { text-transform: none; letter-spacing: 0; font-size: 13.5px; }
}

.vvalid { margin-top: 16px; padding-top: 16px; border-top: 1px solid #EDEBE5; --tone: var(--ok); }
.vvalid--warn { --tone: #B57A0E; }
.vvalid--bad { --tone: var(--bad); }
.vvalid__lbl { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--muted); font-weight: 600; flex-wrap: wrap; }
.vvalid__lbl span:last-child { color: var(--ink); }
.vvalid__bar { height: 8px; border-radius: 99px; background: #E9E6DF; margin-top: 8px; overflow: hidden; }
.vvalid__bar i { display: block; height: 100%; border-radius: inherit; background: var(--tone); }
.vvalid__ends { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }

.vnotes { margin-top: 16px; padding: 14px 16px; background: #F8F6F1; border-radius: var(--r-sm); }
.vnotes h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
[dir="rtl"] .vnotes h3 { text-transform: none; letter-spacing: 0; font-size: 13.5px; }
.vnotes p { margin-top: 6px; font-size: 15px; color: var(--text); white-space: normal; }

/* ---------- document ---------- */
.vdoc__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px 16px; flex-wrap: wrap; }
.vdoc__meta { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.vdoc__stamp { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--ok-ink); background: var(--ok-tint); padding: 6px 11px; border-radius: 999px; }
.vdoc__stamp .ic { width: 16px; height: 16px; }
.vdoc__fig { margin-top: 16px; }
.vdoc__prev { position: relative; display: block; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: #ECE9E2; box-shadow: 0 6px 18px -10px rgba(9, 28, 44, .35); }
.vdoc__prev img { width: 100%; max-height: 82vh; object-fit: contain; margin-inline: auto; background: #fff; }
/* Nothing is drawn over the document itself (stamped QR codes, certificate numbers and signatures can sit in any corner):
   the "open" hint is an icon in the caption row, and the frame itself reacts to hover / keyboard focus. */
.vdoc__prev { transition: border-color .2s, box-shadow .2s; }
.vdoc__prev:hover, .vdoc__prev:focus-visible { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy), 0 10px 24px -12px rgba(9, 28, 44, .5); }
.vdoc__size { white-space: nowrap; }
.vdoc__fig figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.vdoc__zoom { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; background: rgba(9, 28, 44, .08); color: var(--navy); transition: background-color .2s, color .2s; }
.vdoc__zoom .ic { width: 12px; height: 12px; }
.vdoc__fig:has(.vdoc__prev:hover, .vdoc__prev:focus-visible) .vdoc__zoom { background: var(--navy); color: #fff; }
.vdoc__none { margin-top: 16px; display: grid; justify-items: center; gap: 10px; text-align: center; padding: 28px 18px; border: 2px dashed var(--line-2); border-radius: var(--r-sm); background: #FBFAF7; }
.vdoc__file { display: grid; justify-items: center; gap: 6px; color: var(--gold); }
.vdoc__file .ic { width: 54px; height: 54px; stroke-width: 1.4; }
.vdoc__file b { font-family: var(--f-mono); font-size: 13px; letter-spacing: .12em; color: var(--navy); }
.vdoc__none p { font-size: 14px; color: var(--muted); max-width: 40ch; }
.vdoc__acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.vdoc__acts--stack { grid-template-columns: 1fr; }
.vdoc__acts .vbtn:only-child { grid-column: 1 / -1; }
.vdoc__note { margin-top: 10px; font-size: 13px; color: var(--muted); }
.vdoc__viewer { margin-top: 16px; }
.vdoc__viewer object { display: block; width: 100%; height: min(82vh, 920px); border: 1px solid var(--line); border-radius: var(--r-sm); background: #ECE9E2; }
.vdoc__fallback { padding: 24px; text-align: center; color: var(--muted); }
.vdoc__viewer object:focus { outline: 3px solid var(--gold); outline-offset: 2px; }
@media (min-width: 1024px) { .vdoc.has-viewer .vdoc__fig { display: none; } .vdoc__acts { display: flex; flex-wrap: wrap; } }

/* ---------- buttons ---------- */
.vbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 8px 16px; border-radius: var(--r-sm);
  border: 1.5px solid transparent; font-size: 15px; font-weight: 650; line-height: 1.2; text-align: center;
  text-decoration: none; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.vbtn .ic { width: 18px; height: 18px; }
.vbtn--primary { background: var(--navy); border-color: var(--navy); color: #fff !important; }
.vbtn--primary:hover { background: var(--navy-3); border-color: var(--navy-3); }
.vbtn--outline { background: #fff; border-color: var(--line-2); color: var(--navy) !important; }
.vbtn--outline:hover { border-color: var(--navy); }
.vbtn--ghost { background: transparent; border-color: transparent; color: var(--navy) !important; text-decoration: underline; text-underline-offset: 3px; }
.vbtn--ghost:hover { background: #F3F1EC; }
.vbtn--wa { background: var(--wa); border-color: var(--wa); color: #fff !important; }
.vbtn--wa:hover { background: #0B6B36; }
.vbtn.is-done { border-color: var(--ok); color: var(--ok) !important; }
.vbtn[hidden] { display: none; }

/* ---------- share tools ---------- */
.vtools__qr { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.vqr { flex: none; width: 116px; aspect-ratio: 1; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; display: grid; place-items: center; }
.vqr svg { width: 100%; height: 100%; display: block; }
.vqr.is-failed { font-size: 11.5px; color: var(--muted); text-align: center; padding: 8px; line-height: 1.35; }
.vqr:not(.is-ready):not(.is-failed) { background: repeating-linear-gradient(45deg, #F4F2ED 0 6px, #fff 6px 12px); }
.vtools__code { font-family: var(--f-mono); font-size: 15px; font-weight: 600; color: var(--navy); letter-spacing: .04em; }
.vtools__hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.vtools__l { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 16px; }
.vtools__link { width: 100%; margin-top: 6px; padding: 11px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: #FAF9F6; color: var(--text); font-family: var(--f-mono) !important; font-size: 13px; text-overflow: ellipsis; }
.vtools__link:focus { outline: 3px solid var(--gold); outline-offset: 1px; }
.vtools__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.vtools__btns .vbtn { flex: 1 1 auto; padding-inline: 12px; font-size: 14.5px; white-space: nowrap; }

/* ---------- help ---------- */
.vhelp p { font-size: 14.5px; color: var(--muted); margin-top: 6px; }
.vhelp__links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.vhelp__links .vbtn--wa { grid-column: 1 / -1; }
.vhelp__links .vbtn { font-size: 14.5px; padding-inline: 10px; }

/* ---------- not found / enter code ---------- */
.vgrid--single .vfind h2 { font-size: 19px; }
.vfind__entered { margin-top: 8px; font-size: 14.5px; color: var(--muted); }
.vfind__entered bdi { font-weight: 700; color: var(--ink); word-break: break-all; }
.vfind__form { margin-top: 16px; }
.vfind__form label { display: block; font-size: 14px; font-weight: 650; color: var(--navy); margin-bottom: 6px; }
.vfind__row { display: flex; gap: 8px; flex-wrap: wrap; }
.vfind__row input {
  flex: 1 1 200px; min-width: 0; min-height: 50px; padding: 10px 14px;
  border: 1.5px solid #8C959C; border-radius: var(--r-sm); background: #fff; color: var(--ink);
  font-family: var(--f-mono); font-size: 17px; letter-spacing: .05em; text-transform: uppercase;
}
.vfind__row input::placeholder { color: #6B757D; letter-spacing: .05em; }
.vfind__row input:focus { outline: 3px solid rgba(179, 131, 43, .45); outline-offset: 0; border-color: var(--navy); }
.vfind__row .vbtn { flex: 1 0 auto; }
@media (min-width: 480px) { .vfind__row .vbtn { flex: 0 0 auto; padding-inline: 22px; } }
.vfind__hint { margin-top: 8px; font-size: 13px; color: var(--muted); }
.vfind__why { margin-top: 20px; padding-top: 16px; border-top: 1px solid #EDEBE5; }
.vfind__why h3 { font-size: 15px; color: var(--navy); font-weight: 700; }
.vfind__why ul { margin-top: 8px; padding-inline-start: 20px; display: grid; gap: 6px; }
.vfind__why li { font-size: 14.5px; color: var(--text); }

/* ---------- footer ---------- */
.vfoot { background: var(--navy); color: #C3CDD6; padding: 30px 0 calc(22px + env(safe-area-inset-bottom)); font-size: 14px; }
.vfoot__in { display: grid; gap: 20px; }
.vfoot__brand { display: flex; align-items: center; gap: 14px; }
.vfoot__brand img { width: 50px; flex: none; }
.vfoot__brand strong { display: block; color: #fff; font-size: 16px; line-height: 1.3; }
.vfoot__brand span { display: block; font-size: 13px; color: #AEB9C3; }
.vfoot__brand span[lang], .vprint-head span[lang] { text-align: match-parent; }
.vfoot__brand span[lang="ar"] { font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif; }
.vfoot__brand span[lang="en"] { font-family: "Archivo", Arial, sans-serif; }
.vfoot__links { list-style: none; display: grid; gap: 2px; }
.vfoot__links a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: #E6ECF1; text-decoration: none; }
.vfoot__links a:hover { color: var(--gold-2); }
.vfoot__links .ic { width: 18px; height: 18px; color: var(--gold-2); }
.vfoot__bar { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 14px; display: grid; gap: 4px; font-size: 12.5px; color: #9DAAB5; }
@media (min-width: 720px) {
  .vfoot__in { grid-template-columns: 1fr auto; align-items: center; }
  .vfoot__links { grid-template-columns: repeat(2, auto); column-gap: 28px; }
  .vfoot__bar { grid-column: 1 / -1; grid-template-columns: 1fr auto; }
}

/* ---------- live region (copy confirmation) ---------- */
.vlive { position: fixed; inset-inline: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); margin-inline: auto; max-width: 420px; z-index: 40;
  background: var(--navy); color: #fff; padding: 12px 16px; border-radius: var(--r-sm); font-size: 14.5px; text-align: center;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .45); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s, transform .2s; }
.vlive.is-on { opacity: 1; transform: none; }
.vlive:empty { padding: 0; }

/* print-only blocks are hidden on screen */
.vprint-head, .vprint-foot { display: none; }

@media (prefers-reduced-motion: reduce) { .vp *, .vp *::before, .vp *::after { transition: none !important; } }

/* =====================================================================
   PRINT — an official one-page verification summary
   ===================================================================== */
@page { size: A4 portrait; margin: 13mm 14mm 14mm; }
@media print {
  html:has(> body.vp) { background: #fff; }
  body.vp, [dir="rtl"] body.vp { background: #fff !important; color: #000; font-size: 10.5pt; line-height: 1.4; display: block; min-height: 0; }
  [dir="rtl"] .vp .vban__h, [dir="rtl"] .vp .vcert__title { line-height: 1.3; }
  .vp .vbar, .vp .vskip, .vp .vside, .vp .vdoc, .vp .vfoot, .vp .vlive, .vp .vcert__wm, .vp .vfind__form, .vp .vhelp { display: none !important; }
  .vp .vprint-head { display: flex; align-items: center; gap: 12pt; padding-bottom: 8pt; margin-bottom: 10pt; border-bottom: 1.5pt solid #091C2C; }
  .vp .vprint-head img { width: 64pt; height: auto; }
  .vp .vprint-head strong { display: block; font-size: 14pt; color: #091C2C; }
  .vp .vprint-head span { display: block; font-size: 10.5pt; color: #333; }
  .vp .vprint-head em { display: block; margin-top: 3pt; font-style: normal; font-size: 9pt; letter-spacing: .12em; text-transform: uppercase; color: #7D5A1D; font-weight: 700; }
  [dir="rtl"] .vp .vprint-head em, [dir="rtl"].vp .vprint-head em { letter-spacing: 0; font-size: 10pt; }
  .vp .vwrap { max-width: none; padding: 0 !important; }
  .vp .vban { padding: 10pt 12pt !important; border-radius: 6pt; background-image: none !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; break-inside: avoid; }
  .vp .vban__ic { width: 34pt; height: 34pt; box-shadow: none; }
  .vp .vban__ic .ic { width: 22pt; height: 22pt; }
  .vp .vban__in { align-items: center; gap: 12pt; }
  .vp .vban__h { font-size: 17pt; }
  .vp .vban__p { font-size: 10.5pt; margin-top: 3pt; max-width: none; }
  .vp .vban__t { font-size: 8.5pt; margin-top: 4pt; }
  .vp .vgrid { display: block; margin: 10pt 0 0 !important; padding: 0; }
  .vp .vcard { border: 0; box-shadow: none; padding: 0; border-radius: 0; }
  .vp .vcert { break-inside: avoid; overflow: visible; }
  .vp .vcert__title { font-size: 15pt; margin-top: 6pt; }
  .vp .vcert__to { margin-top: 8pt; padding: 6pt 10pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .vp .vcert__to strong { font-size: 13pt; }
  .vp .status { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .vp .vdl { grid-template-columns: 1fr 1fr; column-gap: 22pt; margin-top: 8pt; }
  .vp .vdl__row { grid-template-columns: 1fr; padding-block: 5pt; border-bottom: .6pt solid #ccc; gap: 1pt; }
  .vp .vdl__row:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
  .vp .vdl dt { font-size: 8pt; color: #444; text-transform: uppercase; letter-spacing: .05em; }
  [dir="rtl"] .vp .vdl dt, [dir="rtl"].vp .vdl dt { text-transform: none; letter-spacing: 0; font-size: 9pt; }
  .vp .vdl dd { font-size: 10.5pt; }
  .vp .vvalid { margin-top: 8pt; padding-top: 8pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .vp .vnotes { margin-top: 8pt; padding: 6pt 10pt; }
  .vp .vfind { break-inside: avoid; }
  .vp .vprint-foot { display: flex; gap: 14pt; align-items: center; margin-top: 12pt; padding-top: 10pt; border-top: 1.5pt solid #091C2C; break-inside: avoid; font-size: 9pt; color: #222; }
  .vp .vprint-foot .vqr { width: 30mm; padding: 0; border: 0; }
  .vp .vprint-foot p + p { margin-top: 3pt; }
  .vp .vprint-foot span[dir="ltr"] { font-family: var(--f-mono); word-break: break-all; }
  .vp .vprint-foot__date { font-weight: 700; color: #091C2C; }
  .vp a[href] { text-decoration: none; }
}

/* =====================================================================
   REGISTRY (certificates.php) — additions on top of the site stylesheet
   ===================================================================== */
.vreg-thumb { position: relative; }
.vreg-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; background: #fff; }
.vreg-kind { position: absolute; bottom: 10px; inset-inline-end: 10px; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; font-weight: 600; letter-spacing: .08em;
  padding: 3px 8px; border-radius: 6px; background: rgba(9, 28, 44, .86); color: #fff; }
.vreg-none { display: grid; place-items: center; gap: 6px; color: #091C2C; text-align: center; }
.vreg-none .ic { width: 46px; height: 46px; color: #B3832B; stroke-width: 1.4; }
.vreg-none span { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; letter-spacing: .14em; }
/* Arabic: no monospace / letter-spacing — both break the joined letters. */
[dir="rtl"] .vreg-none span { font-family: var(--f-body); font-size: 13px; letter-spacing: 0; }
.vreg-card-foot > span[dir="ltr"] { white-space: nowrap; }
.vreg-verify label { display: block; font-size: 13px; color: #C9D2DA; margin-bottom: -4px; }
.vreg-verify input { min-height: 46px; width: 100%; min-width: 0; box-sizing: border-box; }
.vreg-verify .btn { min-height: 46px; justify-content: center; }
.vreg-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 34px; }
.vreg-pager a, .vreg-pager span { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 14px; border-radius: 8px;
  border: 1px solid rgba(9, 28, 44, .18); background: #fff; color: #091C2C; font-weight: 600; font-size: 14.5px; text-decoration: none; }
.vreg-pager a:hover { border-color: #B3832B; }
.vreg-pager [aria-current="page"] { background: #091C2C; border-color: #091C2C; color: #fff; }
.vreg-pager .is-gap { border: 0; background: none; min-width: 20px; padding: 0; }
.vreg-card-foot { gap: 10px; }
.vreg-card-foot b { font-family: "Archivo", Arial, sans-serif; font-size: 13px; color: #091C2C; display: inline-flex; align-items: center; gap: 6px; letter-spacing: 0; }
[dir="rtl"] .vreg-card-foot b { font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif; }
.vreg-pager .ic { width: 16px; height: 16px; }
.vreg-back { transform: scaleX(-1); }
[dir="rtl"] .vreg-back { transform: none; }
/* Phones/tablets: the 12 sections become one swipeable row of chips, so the verify box and results stay near the top. */
@media (max-width: 980px) {
  .cside .vreg-cats { display: flex; gap: 8px; overflow-x: auto; padding: 8px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .cside .vreg-cats .cside__h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cside .vreg-cats .ccat { flex: none; white-space: nowrap; min-height: 44px; border: 1px solid rgba(9, 28, 44, .14); scroll-snap-align: start; }
}
/* Registry layout: grid items may shrink below their content's min-content width
   (the swipeable chip row and long Arabic words otherwise pushed the page ~45px wider than a 390px phone). */
.clayout > * { min-width: 0; }
.vreg-verify form > *, .cbar > * { min-width: 0; }
.cbar .search input { width: 100%; }
.how > div { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 980px) {
  .clayout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .how, .cbar { grid-template-columns: minmax(0, 1fr); }
  .how div { padding: 24px 20px; }
}

/* Staff strip on the public registry: Upload button for signed-in staff, sign-in link for everyone else */
.cstaff { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap;
  margin-bottom: 28px; padding: 14px 18px; border: 1px dashed var(--line, #d9d4c7); border-radius: 12px; background: rgba(9,28,44,.03); }
.cstaff--on { border-style: solid; border-color: var(--gold, #B3832B); background: #fffaf0; padding: 18px 22px; }
.cstaff__t { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--navy, #091C2C); font-weight: 600; min-width: 0; }
.cstaff__t svg { flex: none; width: 20px; height: 20px; color: var(--gold-text, #7D5A1D); }
.cstaff__btns { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 600px) { .cstaff, .cstaff__btns { flex-direction: column; align-items: stretch; } .cstaff .btn { justify-content: center; } }
