/* ============================================================
   Amber Shield — brand system (palette from LOGO.pdf)
   cream #F2EBDD · amber gold #B8860B · ink #0A0A0A
   ============================================================ */
:root {
  --cream: #F2EBDD;
  --gold: #B8860B;
  --ink: #0A0A0A;

  --bg: #F6F1E7;
  --bg-2: var(--cream);
  --surface: #FFFDF8;
  --line: #E2D7C2;
  --line-strong: #CDBE9F;
  --text: var(--ink);
  --muted: #6E6556;
  --accent: var(--gold);
  --accent-text: #8A6408;      /* gold dark enough for text on cream (AA) */
  --on-accent: var(--ink);
  --inverse-bg: var(--ink);
  --inverse-text: var(--cream);
  --ok: #2F7A4F;
  --bad: #A93A2B;
  --info: #3A6690;

  --radius: 2px;
  --shadow: 0 1px 2px rgba(10, 10, 10, .04), 0 12px 32px -18px rgba(10, 10, 10, .18);
  --font-ui: "Alexandria", "Montserrat", system-ui, sans-serif;
  --font-display: "Amiri", "Times New Roman", serif;
  /* Michroma: wide geometric face closest to the AMBER SHIELD wordmark (logo). */
  --font-brand: "Michroma", "Montserrat", sans-serif;
  --font-latin: var(--font-brand);
  --font-text-en: "Montserrat", "Alexandria", sans-serif;
  --container: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
}
:root[data-theme="dark"] {
  --bg: #0A0A0A; --bg-2: #111010; --surface: #141311; --line: #26231E; --line-strong: #3A342A;
  --text: var(--cream); --muted: #A2988A; --accent-text: #D4A440;
  --inverse-bg: var(--cream); --inverse-text: var(--ink);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -20px rgba(0, 0, 0, .8);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 300 16px/1.85 var(--font-ui); -webkit-font-smoothing: antialiased; }
main { min-height: 70vh; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 4px; }
h1, h2, h3 { font-weight: 500; line-height: 1.35; margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 2.05rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--ink); color: var(--cream); padding: 8px 14px; z-index: 100; }
.skip:focus { inset-inline-start: 8px; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.gold { color: var(--accent-text); }
.latin { font-family: var(--font-latin); }
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-latin); font-weight: 400; text-transform: uppercase; letter-spacing: .24em; font-size: .72rem; color: var(--muted); margin: 0 0 18px; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
.tagline { font-family: var(--font-display); color: var(--accent-text); font-size: clamp(1.35rem, 2.6vw, 1.9rem); line-height: 1.7; margin: 0 0 10px; }
.rule { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong) 20%, var(--line-strong) 80%, transparent); margin: 0; }

/* ---------- wordmark (vector from the logo, tinted via mask) ---------- */
.wordmark { display: inline-block; aspect-ratio: 1089.8 / 409.4; height: 34px; background: currentColor; flex: none;
  -webkit-mask: url(/static/img/wordmark.svg) center / contain no-repeat; mask: url(/static/img/wordmark.svg) center / contain no-repeat; }

/* ---------- header ---------- */
.topbar { background: var(--ink); color: var(--cream); font-size: .76rem; text-align: center; padding: 7px var(--gutter); letter-spacing: .02em; }
.topbar b { color: #D4A440; font-weight: 500; }
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; }
.brand .wordmark { height: 30px; }
.brand small { color: var(--muted); font-size: .78rem; border-inline-start: 1px solid var(--line-strong); padding-inline-start: 14px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--muted); text-decoration: none; font-size: .92rem; padding: 8px 12px; position: relative; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; inset-inline: 12px; bottom: 2px; height: 1px; background: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; border-radius: var(--radius); }
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .menu-btn { display: inline-grid; }
  .nav { display: none; position: absolute; top: 100%; inset-inline: 0; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"]::after { display: none; }
  .header-actions .btn { display: none; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 10px 22px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: transparent; color: var(--text); font: 400 .95rem var(--font-ui); cursor: pointer; text-decoration: none; transition: background .2s, color .2s, border-color .2s; }
.btn:hover { border-color: var(--text); }
.btn.primary { background: var(--inverse-bg); color: var(--inverse-text); border-color: var(--inverse-bg); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.gold { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.gold:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.small { min-height: 32px; padding: 4px 12px; font-size: .84rem; }
.btn.danger { color: var(--bad); }
.btn svg { width: 18px; height: 18px; }
button.link { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 8px 12px; }
form.inline { display: inline; }

/* ---------- sections ---------- */
.section { max-width: var(--container); margin: 0 auto; padding: clamp(56px, 8vw, 104px) var(--gutter); }
.section.narrow { max-width: 820px; }
.section.wide { max-width: 1240px; padding-top: 40px; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head p { color: var(--muted); font-size: 1.04rem; }
.band { background: var(--bg-2); border-block: 1px solid var(--line); }
.band.dark { background: var(--ink); color: var(--cream); border: 0; --muted: #A2988A; --line: #26231E; --line-strong: #3A342A; --surface: #141311; --text: var(--cream); --accent-text: #D4A440; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px; }

/* ---------- hero ---------- */
.hero { max-width: var(--container); margin: 0 auto; padding: clamp(48px, 8vw, 96px) var(--gutter) clamp(56px, 8vw, 96px); display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { font-weight: 500; }
.hero .lead { color: var(--muted); font-size: 1.08rem; max-width: 34em; }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 28px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.hero-meta div { display: flex; flex-direction: column; }
.hero-meta b { font-family: var(--font-latin); font-weight: 400; font-size: 1.05rem; letter-spacing: .04em; }
.hero-meta span { color: var(--muted); font-size: .8rem; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }

/* certificate preview (hero art) */
.cert-preview { position: relative; background: var(--surface); border: 1px solid var(--line-strong); padding: 28px; box-shadow: var(--shadow); max-width: 440px; justify-self: center; width: 100%; }
.cert-preview::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--line); pointer-events: none; }
.cert-preview header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.cert-preview .wordmark { height: 22px; }
.cert-preview .chip { font-family: var(--font-latin); font-size: .64rem; letter-spacing: .18em; color: var(--muted); }
.cert-preview h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.45rem; margin: 0; }
.cert-preview .no { font-family: var(--font-latin); letter-spacing: .14em; font-size: .78rem; color: var(--accent-text); margin-bottom: 18px; }
.cert-preview dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; margin: 0 0 22px; }
.cert-preview dt { font-size: .72rem; color: var(--muted); }
.cert-preview dd { margin: 0; font-size: .92rem; font-weight: 400; }
.cert-preview footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 14px; font-size: .78rem; }
.seal-badge { display: inline-flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 500; }
.seal-badge i { width: 20px; height: 20px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-style: normal; font-size: .7rem; }
.cert-preview .bead { position: absolute; width: 92px; height: 92px; border-radius: 50%; inset-inline-end: -30px; bottom: -30px; background: radial-gradient(circle at 34% 28%, #F2D58A, #B8860B 50%, #5A3E02 100%); box-shadow: inset -8px -10px 22px rgba(10,10,10,.35), 0 18px 40px rgba(184,134,11,.3); }
.sample-label { position: absolute; top: -11px; inset-inline-end: 24px; background: var(--ink); color: var(--cream); font-size: .7rem; padding: 2px 10px; letter-spacing: .04em; }

/* ---------- trust pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); border-inline-start: 1px solid var(--line); }
.pillars > div { padding: 28px 24px; border-inline-end: 1px solid var(--line); }
.pillars svg { width: 28px; height: 28px; color: var(--accent); margin-bottom: 14px; }
.pillars h3 { margin-bottom: 6px; }
.pillars p { color: var(--muted); font-size: .9rem; margin: 0; }
@media (max-width: 900px) { .pillars { grid-template-columns: 1fr 1fr; } .pillars > div { border-bottom: 1px solid var(--line); } }
@media (max-width: 520px) { .pillars { grid-template-columns: 1fr; } }

/* ---------- steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: s; border-top: 1px solid var(--line-strong); }
.steps li { padding: 28px 0 0; padding-inline-end: 28px; counter-increment: s; }
.steps li::before { content: "0" counter(s); display: block; font-family: var(--font-latin); font-size: .8rem; letter-spacing: .2em; color: var(--accent-text); margin-bottom: 14px; }
.steps b { display: block; font-weight: 500; font-size: 1.08rem; margin-bottom: 6px; }
.steps span { color: var(--muted); font-size: .94rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } .steps li { padding-bottom: 20px; border-bottom: 1px solid var(--line); } }

/* ---------- split / feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.check-list li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 5px; border: 1px solid var(--accent); background: linear-gradient(var(--accent), var(--accent)) center / 8px 8px no-repeat; }
.check-list b { display: block; font-weight: 500; }
.check-list span { color: var(--muted); font-size: .92rem; }
.url-demo { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; direction: ltr; text-align: left; background: var(--surface); border: 1px solid var(--line); padding: 18px; line-height: 2; overflow-wrap: anywhere; }
.url-demo .p { color: var(--accent-text); }
.url-demo .m { color: var(--ok); }
.url-demo small { display: block; color: var(--muted); font-family: var(--font-ui); }
[dir=rtl] .url-demo small { direction: rtl; text-align: right; }

/* ---------- lookup / waitlist forms ---------- */
.inline-form { display: flex; gap: 10px; max-width: 520px; }
.inline-form input { flex: 1; }
.center .inline-form { margin-inline: auto; }
.form-note { font-size: .8rem; color: var(--muted); margin-top: 10px; }
.hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.coming-soon { text-align: center; }
.coming-soon .badge { display: inline-block; border: 1px solid var(--accent); color: var(--accent-text); font-size: .74rem; letter-spacing: .2em; padding: 4px 16px; margin-bottom: 18px; font-family: var(--font-latin); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 0; display: flex; justify-content: space-between; gap: 20px; font-weight: 400; font-size: 1.04rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-latin); color: var(--accent-text); font-size: 1.3rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 20px; margin: 0; max-width: 60em; }

/* ---------- prose pages ---------- */
.prose h2 { margin-top: 1.8em; font-size: 1.35rem; }
.prose p, .prose li { color: color-mix(in srgb, var(--text) 82%, var(--muted)); }
.prose ul { padding-inline-start: 1.2em; }
.page-head { border-bottom: 1px solid var(--line); background: var(--bg-2); }
.page-head .section { padding-block: clamp(40px, 6vw, 72px); }
.page-head p { color: var(--muted); max-width: 46em; margin: 0; }

/* ---------- verification results ---------- */
.verdict { text-align: center; max-width: 640px; }
.verdict-icon { width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 22px; display: grid; place-items: center; border: 1px solid var(--line-strong); font-size: 2.2rem; font-family: var(--font-latin); }
.verdict.invalid .verdict-icon, .verdict.revoked .verdict-icon { color: var(--bad); border-color: var(--bad); }
.verdict.replay .verdict-icon, .verdict.expired .verdict-icon { color: var(--accent-text); border-color: var(--accent); }
.verdict.ok .verdict-icon { color: var(--ok); border-color: var(--ok); }
.verdict .actions { justify-content: center; margin-top: 28px; gap: 10px; flex-wrap: wrap; }

/* ---------- certificate ---------- */
.certificate-wrap { max-width: 920px; margin: 0 auto; padding: clamp(28px, 5vw, 64px) var(--gutter); }
.certificate { position: relative; background: var(--surface); border: 1px solid var(--line-strong); padding: clamp(24px, 5vw, 56px); box-shadow: var(--shadow); }
.certificate::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--line); pointer-events: none; }
.cert-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 32px; }
.cert-top .wordmark { height: 30px; }
.cert-title { text-align: center; margin-bottom: 32px; }
.cert-title h1 { font-family: var(--font-display); font-weight: 400; margin-bottom: 4px; }
.cert-title .en { font-family: var(--font-latin); letter-spacing: .3em; font-size: .72rem; color: var(--muted); text-transform: uppercase; }
.cert-no { font-family: var(--font-latin); letter-spacing: .16em; color: var(--accent-text); font-size: .95rem; margin-top: 12px; }
.verified-badge { display: inline-flex; gap: 10px; align-items: center; color: var(--ok); border: 1px solid var(--ok); padding: 6px 16px; font-weight: 500; font-size: .9rem; }
.verified-badge i { background: var(--ok); color: #fff; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .7rem; }
.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-auto-rows: 1fr; gap: 8px; margin-bottom: 32px; }
.gallery button { padding: 0; border: 0; background: var(--bg-2); cursor: zoom-in; aspect-ratio: 1; overflow: hidden; }
.gallery button:first-child { grid-row: span 2; aspect-ratio: auto; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery button:hover img { transform: scale(1.03); }
.gallery.n1 { grid-template-columns: 1fr; }
.gallery.n1 button:first-child { grid-row: auto; aspect-ratio: 4 / 3; }
.gallery.n2 { grid-template-columns: 1fr 1fr; }
.gallery.n2 button:first-child { grid-row: auto; aspect-ratio: 1; }
.gallery.n4, .gallery.n5 { grid-template-columns: 2fr 1fr 1fr; }
.specs { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-strong); margin: 0 0 28px; }
.specs div { padding: 16px 0; border-bottom: 1px solid var(--line); padding-inline-end: 16px; }
.specs dt { color: var(--muted); font-size: .78rem; margin-bottom: 2px; }
.specs dd { margin: 0; font-weight: 400; font-size: 1.05rem; }
.specs.compact { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .specs { grid-template-columns: 1fr 1fr; } }
.timeline { list-style: none; margin: 0 0 28px; padding: 0; border-inline-start: 1px solid var(--line-strong); }
.timeline li { position: relative; padding: 0 0 16px; padding-inline-start: 22px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: -5px; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 1px solid var(--accent); }
.timeline li:last-child::before { background: var(--accent); }
.timeline span { color: var(--muted); font-size: .84rem; }
.cert-security { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 28px; }
.cert-security div { background: var(--surface); padding: 14px 16px; }
.cert-security dt { font-size: .74rem; color: var(--muted); }
.cert-security dd { margin: 0; font-size: .9rem; white-space: nowrap; }
@media (max-width: 640px) { .cert-security { grid-template-columns: 1fr; } }
.cert-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 20px; }
.cert-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 24px; }
.countdown { font-family: var(--font-latin); }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(10,10,10,.92); display: grid; place-items: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 88vh; width: auto; }
.lightbox button { position: absolute; top: 16px; inset-inline-end: 16px; background: none; border: 1px solid #555; color: #fff; width: 44px; height: 44px; font-size: 1.4rem; cursor: pointer; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #CFC6B6; margin-top: 0; }
.site-footer .container { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-block: 56px 36px; }
.site-footer .wordmark { height: 30px; color: var(--cream); margin-bottom: 14px; }
.site-footer .tagline { color: #D4A440; font-size: 1.25rem; }
.site-footer h4 { color: var(--cream); font-weight: 500; font-size: .9rem; margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; font-size: .9rem; }
.site-footer a { text-decoration: none; color: #CFC6B6; }
.site-footer a:hover { color: var(--cream); }
.footer-bottom { border-top: 1px solid #26231E; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 18px; grid-template-columns: none; font-size: .78rem; color: #8F8676; }
@media (max-width: 860px) { .site-footer .container { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer .container { grid-template-columns: 1fr; } }

/* ---------- chat ---------- */
.chat-toggle { position: fixed; bottom: 20px; inset-inline-start: 20px; z-index: 30; display: flex; gap: 10px; align-items: center; padding: 12px 18px; border: 1px solid var(--accent); cursor: pointer; font: 400 .92rem var(--font-ui); background: var(--ink); color: var(--cream); box-shadow: var(--shadow); border-radius: var(--radius); }
.chat-toggle .dot { width: 8px; height: 8px; border-radius: 50%; background: #3FB871; box-shadow: 0 0 0 3px rgba(63,184,113,.25); }
.chat-panel { position: fixed; bottom: 80px; inset-inline-start: 20px; z-index: 30; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 120px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.chat-panel[hidden] { display: none; }
.chat-panel header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--ink); color: var(--cream); }
.chat-panel header small { display: block; color: #A2988A; font-size: .74rem; }
.chat-panel header button { background: none; border: 0; color: #A2988A; font-size: 1.5rem; cursor: pointer; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { padding: 10px 14px; max-width: 85%; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .93rem; }
.msg.user { align-self: flex-start; background: var(--ink); color: var(--cream); }
.msg.assistant { align-self: flex-end; background: var(--bg-2); border: 1px solid var(--line); }
.msg.pending::after { content: "…"; }
.chat-suggest { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 16px 8px; }
.chat-suggest button { border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: inherit; font-size: .8rem; padding: 4px 10px; cursor: pointer; }
#chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
#chat-form input { flex: 1; }
#chat-form button { padding: 8px 16px; border: 0; background: var(--accent); color: var(--on-accent); font: inherit; cursor: pointer; }
.chat-hint { margin: 0; padding: 0 12px 10px; color: var(--muted); font-size: .72rem; }

/* ---------- forms ---------- */
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 300 1rem var(--font-ui); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
label { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; color: var(--muted); }
label.check { flex-direction: row; align-items: center; }
label.check input { width: auto; min-height: 0; }
.auth-box { max-width: 440px; width: calc(100% - 32px); margin: 56px auto; }
.auth-box form { display: flex; flex-direction: column; gap: 16px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.grid-form .full { grid-column: 1 / -1; }
.actions { display: flex; align-items: end; }
.alert { background: color-mix(in srgb, var(--bad) 8%, transparent); border: 1px solid var(--bad); padding: 10px 14px; border-radius: var(--radius); }
.alert.info { background: color-mix(in srgb, var(--info) 8%, transparent); border-color: var(--info); }
.alert.ok { background: color-mix(in srgb, var(--ok) 8%, transparent); border-color: var(--ok); }
.qr { background: #fff; padding: 12px; width: 220px; margin: 12px auto; }
.qr svg { width: 100%; height: auto; display: block; }
.secret { text-align: center; font-family: ui-monospace, Menlo, monospace; letter-spacing: .15em; color: var(--accent-text); word-break: break-all; }
pre.cmd { background: var(--bg); border: 1px solid var(--line); padding: 14px; overflow-x: auto; user-select: all; direction: ltr; text-align: left; }

/* ---------- staff ---------- */
.staff .site-header .container { max-width: 1240px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.toolbar h1 { margin: 0; font-size: 1.6rem; }
.search { display: flex; gap: 8px; flex: 1; max-width: 520px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 28px; }
.stat { background: var(--surface); padding: 18px 22px; display: flex; flex-direction: column; }
.stat b { font-family: var(--font-latin); font-weight: 400; font-size: 2rem; }
.stat.warn b { color: var(--bad); }
.stat span { color: var(--muted); font-size: .84rem; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); margin-bottom: 24px; display: block; overflow-x: auto; }
.table th, .table td { padding: 12px 16px; text-align: start; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { color: var(--muted); font-weight: 400; font-size: .82rem; background: var(--bg-2); }
.pill { display: inline-block; padding: 1px 10px; font-size: .76rem; border: 1px solid var(--line-strong); color: var(--muted); }
.pill.ok { color: var(--ok); border-color: var(--ok); }
.pill.bad { color: var(--bad); border-color: var(--bad); }
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.tag-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.photo-grid figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.photo-grid img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.upload { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.upload input { flex: 1; min-width: 200px; }
.history { list-style: none; padding: 0; margin: 16px 0 0; }
.history li { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.row-actions { display: flex; gap: 6px; }

/* ---------- motion ---------- */
/* Hidden only when JS is running (html.js), so content is never lost without it. */
html.js .reveal:not(.in) { opacity: 0; transform: translateY(14px); }
.reveal { transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- print (certificate → PDF) ---------- */
@media print {
  :root { --bg: #fff; --surface: #fff; --text: #0A0A0A; --muted: #555; --line: #ddd; --line-strong: #bbb; --accent-text: #8A6408; }
  .topbar, .site-header, .site-footer, .chat-toggle, .chat-panel, .cert-actions, .no-print { display: none !important; }
  body { background: #fff; }
  .certificate { box-shadow: none; }
  .certificate-wrap { padding: 0; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery button:first-child { grid-row: auto; aspect-ratio: 1; }
}
.coming-soon .inline-form { margin-inline: auto; }
.flush { margin: 0; }
.center-note { text-align: center; margin-top: 16px; }
.steps-vertical { grid-template-columns: 1fr; border-top: 0; }
.steps-vertical li { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.lookup-result { margin-top: 18px; }
.lookup-result p { margin-bottom: 6px; }
.verdict .actions { justify-content: center; }
.contact-grid { margin-bottom: 32px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.contact-grid .btn { margin-top: 10px; }
.report-card h2 { font-size: 1.3rem; }
.socials { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.socials a { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid #3A342A; color: var(--cream); }
.socials a:hover { border-color: #D4A440; color: #D4A440; }
.socials svg { width: 18px; height: 18px; }
.socials .handle { font-family: var(--font-latin); font-size: .82rem; color: #8F8676; }
.contact-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ---------- sale invoice (screen + print) ---------- */
.invoice-wrap { max-width: 860px; margin: 0 auto; padding: 28px var(--gutter) 48px; }
.invoice-wrap .cert-actions { margin: 0 0 20px; justify-content: flex-start; }
.invoice { position: relative; background: #FFFDF8; color: #0A0A0A; border: 1px solid #CDBE9F; padding: clamp(24px, 5vw, 48px); box-shadow: var(--shadow); overflow: hidden; }
.invoice .wordmark { height: 34px; color: #0A0A0A; }
.invoice .tagline { font-size: 1.05rem; color: #8A6408; margin: 6px 0 0; }
.inv-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 2px solid #0A0A0A; }
.inv-meta { text-align: left; }
.inv-meta h1 { font-size: 1.6rem; margin: 0; }
.inv-meta .en { font-family: var(--font-latin); letter-spacing: .3em; font-size: .68rem; color: #6E6556; margin: 0 0 12px; }
.inv-meta dl { margin: 0; display: grid; gap: 4px; }
.inv-meta dl div { display: flex; gap: 12px; justify-content: flex-end; }
.inv-meta dt { color: #6E6556; font-size: .82rem; }
.inv-meta dd { margin: 0; font-family: var(--font-latin); font-size: .92rem; }
.inv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid #E2D7C2; }
.inv-parties h2 { font-size: .78rem; color: #8A6408; letter-spacing: .04em; margin: 0 0 8px; }
.inv-parties p { margin: 0 0 2px; }
.inv-strong { font-weight: 500; font-size: 1.08rem; }
.inv-ltr { text-align: right; font-family: var(--font-latin); }
.inv-table { width: 100%; border-collapse: collapse; margin: 26px 0; table-layout: fixed; }
.inv-table th:first-child { width: 38%; }
.inv-table th { background: #0A0A0A; color: #F2EBDD; font-weight: 400; font-size: .82rem; padding: 10px 12px; text-align: right; }
.inv-table td { padding: 14px 12px; border-bottom: 1px solid #E2D7C2; vertical-align: top; }
.inv-table tfoot td { border: 0; padding-top: 18px; font-weight: 500; text-align: left; }
.inv-table tfoot td:first-child { text-align: right; }
.inv-total { font-size: 1.35rem; color: #0A0A0A; border-top: 2px solid #B8860B !important; }
.inv-total small { font-size: .7rem; color: #6E6556; }
.inv-notes { background: #F6F1E7; padding: 12px 14px; font-size: .9rem; }
.inv-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 56px; }
.inv-sign { border-top: 1px solid #0A0A0A; padding-top: 6px; font-size: .82rem; color: #6E6556; text-align: center; }
.inv-thanks { text-align: center; margin: 32px 0 0; font-size: .82rem; color: #6E6556; }
.inv-issuer { margin-top: 8px; text-align: center; }
.void-stamp { position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%) rotate(-18deg); border: 4px solid #A93A2B; color: #A93A2B; font-size: 3.4rem; font-weight: 600; padding: 4px 36px; opacity: .55; pointer-events: none; }
@media (max-width: 600px) { .inv-parties, .inv-foot { grid-template-columns: 1fr; } .inv-meta { text-align: right; } .inv-meta dl div { justify-content: flex-start; } }
@media print {
  @page { size: A4; margin: 12mm; }
  .invoice-wrap { padding: 0; max-width: none; }
  .invoice { border: 0; box-shadow: none; padding: 0; }
  .inv-table th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .inv-notes, .void-stamp { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.nav a, .nav button.link { white-space: nowrap; }
.staff .nav a, .staff .nav button.link { padding: 8px 9px; font-size: .88rem; }
@media (max-width: 1100px) and (min-width: 901px) { .staff .brand small { display: none; } }
.user-cards { display: grid; gap: 16px; margin-bottom: 24px; }
.user-card h3 { margin: 0; }
.perm-form { display: grid; gap: 14px; border-top: 1px solid var(--line); padding-top: 16px; }
.perm-role { max-width: 320px; }
.perm-grid { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 20px; }
.perm-grid legend { margin-bottom: 8px; }
.perm-grid .check { color: var(--text); font-size: .92rem; gap: 10px; }
.perm-form .btn { justify-self: start; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.thumb { width: 48px; height: 48px; object-fit: cover; }

/* ---------- shop ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.product-card { display: block; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit; transition: border-color .2s, transform .2s; }
.product-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.product-card.is-sold { opacity: .7; }
.product-img { position: relative; aspect-ratio: 1; background: var(--bg-2); display: grid; place-items: center; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-img .bead { width: 40%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #F2D58A, #B8860B 50%, #5A3E02 100%); box-shadow: inset -8px -10px 22px rgba(10,10,10,.3); }
.product-img.big { max-width: 520px; }
.product-img .tag { position: absolute; top: 12px; inset-inline-start: 12px; background: var(--ink); color: var(--cream); font-size: .72rem; padding: 3px 10px; }
.product-img .tag.sold { background: var(--bad); }
.product-body { padding: 16px 18px 18px; }
.product-body h3 { margin: 0 0 4px; font-size: 1rem; }
.product-body p { margin: 0; }
.price { font-size: 1.15rem; color: var(--text); margin-top: 8px !important; }
.price small { font-size: .72rem; color: var(--muted); }
.price.big { font-size: 1.8rem; margin: 6px 0 16px !important; }
.product-page { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.product-page .eyebrow a { text-decoration: none; }
.order-btn { width: 100%; margin-top: 8px; }
@media (max-width: 860px) { .product-page { grid-template-columns: 1fr; } }

/* ---------- accounting ---------- */
.stat.good b { color: var(--ok); }
.good-text { color: var(--ok); }
.bad-text { color: var(--bad); }
.table td.wrap { white-space: normal; min-width: 180px; }
.month-input { min-height: 32px; padding: 4px 10px; width: auto; }
.budget-bars { display: grid; gap: 14px; }
.bb-head { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; }
.bb-track { height: 8px; background: var(--bg-2); border: 1px solid var(--line); margin-top: 6px; }
.bb-fill { height: 100%; background: var(--accent); }
.bb-fill.near { background: #C9861A; }
.bb-fill.over { background: var(--bad); }
.bb-fill.w0 { width: 0%; }
.bb-fill.w5 { width: 5%; }
.bb-fill.w10 { width: 10%; }
.bb-fill.w15 { width: 15%; }
.bb-fill.w20 { width: 20%; }
.bb-fill.w25 { width: 25%; }
.bb-fill.w30 { width: 30%; }
.bb-fill.w35 { width: 35%; }
.bb-fill.w40 { width: 40%; }
.bb-fill.w45 { width: 45%; }
.bb-fill.w50 { width: 50%; }
.bb-fill.w55 { width: 55%; }
.bb-fill.w60 { width: 60%; }
.bb-fill.w65 { width: 65%; }
.bb-fill.w70 { width: 70%; }
.bb-fill.w75 { width: 75%; }
.bb-fill.w80 { width: 80%; }
.bb-fill.w85 { width: 85%; }
.bb-fill.w90 { width: 90%; }
.bb-fill.w95 { width: 95%; }
.bb-fill.w100 { width: 100%; }
.image-drop { display: grid; gap: 12px; }
.drop-zone { position: relative; border: 1px dashed var(--accent); background: var(--bg); padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; cursor: pointer; color: var(--text); }
.drop-zone:hover { background: var(--bg-2); }
.drop-zone svg { width: 34px; height: 34px; color: var(--accent); }
.drop-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.preview-grid figure { position: relative; margin: 0; aspect-ratio: 1; background: var(--bg-2); }
.preview-grid img { width: 100%; height: 100%; object-fit: cover; }
.preview-grid figure span { position: absolute; bottom: 4px; inset-inline-start: 4px; background: var(--ink); color: var(--cream); font-size: .68rem; padding: 1px 6px; }

/* ---------- language switch + English (LTR) ---------- */
.lang-btn { text-decoration: none; font-family: var(--font-latin); font-size: .82rem; font-weight: 500; letter-spacing: .04em; }
.lang-btn[lang="ar"] { font-family: var(--font-ui); font-size: 1rem; }
[dir=ltr] .tagline { font-style: italic; }
[dir=ltr] .steps li { padding-inline-end: 28px; }
.en-fields { border: 1px solid var(--line); padding: 12px 16px; }
.en-fields summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.en-fields .grid-form { margin-top: 12px; }

/* ---------- staff layout: sidebar on the start side (right in Arabic) ---------- */
.staff .site-header .container { max-width: none; }
.staff-shell { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 73px); }
.staff-side { background: var(--surface); border-inline-end: 1px solid var(--line); }
.side-nav { position: sticky; top: 73px; display: flex; flex-direction: column; gap: 2px; padding: 18px 12px 28px; max-height: calc(100vh - 73px); overflow-y: auto; }
.side-title { margin: 16px 12px 6px; font-size: .72rem; letter-spacing: .08em; color: var(--muted); }
.side-title:first-child { margin-top: 0; }
.side-nav a, .side-logout { display: flex; align-items: center; gap: 12px; padding: 9px 12px; color: var(--text); text-decoration: none; font: 400 .92rem var(--font-ui); border: 0; background: none; width: 100%; text-align: start; cursor: pointer; border-inline-start: 2px solid transparent; }
.side-nav a:hover, .side-logout:hover { background: var(--bg-2); }
.side-nav a[aria-current="page"] { background: var(--bg-2); border-inline-start-color: var(--accent); font-weight: 500; }
.side-nav svg { width: 18px; height: 18px; flex: none; color: var(--accent); }
.side-site { margin-top: 14px; font-size: .82rem !important; color: var(--muted) !important; }
.staff-main { min-width: 0; }
.staff-who { white-space: nowrap; }
.staff .menu-btn { display: none; }
@media (max-width: 900px) {
  .staff-shell { grid-template-columns: 1fr; }
  .staff .menu-btn { display: inline-grid; }
  .staff-side { position: fixed; top: 73px; bottom: 0; inset-inline-start: 0; width: min(290px, 85vw); z-index: 25; transform: translateX(100%); transition: transform .25s; box-shadow: var(--shadow); }
  [dir=ltr] .staff-side { transform: translateX(-100%); }
  .staff-side:has(.side-nav.open) { transform: none; }
  .side-nav { position: static; max-height: none; }
  .staff-who { display: none; }
}
/* ---------- staff help ---------- */
.help { max-width: 900px; }
.help h2 { font-size: 1.25rem; }
.help-setup summary { list-style: none; cursor: pointer; }
.help-setup summary::-webkit-details-marker { display: none; }
.help-setup summary h2 { display: inline; }
.help-setup summary::after { content: " +"; color: var(--accent); }
.help-steps { padding: 0; margin: 0 0 24px; list-style: none; counter-reset: h; }
.help-steps li { counter-increment: h; position: relative; padding: 14px 0; padding-inline-start: 48px; border-bottom: 1px solid var(--line); }
.help-steps li::before { content: counter(h); position: absolute; inset-inline-start: 0; top: 14px; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--cream); display: grid; place-items: center; font-family: var(--font-latin); font-size: .85rem; }
.help-steps.big li b { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.help-steps li span { color: var(--muted); }
.help-steps pre { margin: 10px 0 0; }
.faq-dl dt { font-family: ui-monospace, Menlo, monospace; font-size: .85rem; margin-top: 14px; direction: ltr; text-align: start; }
.faq-dl dd { margin: 4px 0 0; color: var(--muted); }

/* ---------- English: brand typeface (matches the logo wordmark) ---------- */
[dir=ltr] body { font-family: var(--font-text-en); font-weight: 400; }
[dir=ltr] h1, [dir=ltr] h2, [dir=ltr] h3, [dir=ltr] h4,
[dir=ltr] .nav a, [dir=ltr] .btn, [dir=ltr] .eyebrow, [dir=ltr] .badge, [dir=ltr] .chat-toggle,
[dir=ltr] .price, [dir=ltr] .serial, [dir=ltr] .cert-no, [dir=ltr] .specs dt, [dir=ltr] .cert-preview dt,
[dir=ltr] .steps b, [dir=ltr] .steps li::before, [dir=ltr] .faq summary, [dir=ltr] .verified-badge,
[dir=ltr] .seal-badge, [dir=ltr] .product-img .tag, [dir=ltr] .topbar, [dir=ltr] .site-footer h4 {
  font-family: var(--font-brand);
  font-weight: 400;
  letter-spacing: .02em;
}
[dir=ltr] h1 { font-size: clamp(1.5rem, 3.3vw, 2.35rem); line-height: 1.3; }
[dir=ltr] h2 { font-size: clamp(1.15rem, 2.1vw, 1.6rem); line-height: 1.35; }
[dir=ltr] h3 { font-size: .95rem; }
[dir=ltr] .nav a { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
[dir=ltr] .btn { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; }
[dir=ltr] .faq summary { font-size: .88rem; }
[dir=ltr] .steps b { font-size: .9rem; }
[dir=ltr] .topbar { font-size: .62rem; letter-spacing: .05em; }
[dir=ltr] .specs dt, [dir=ltr] .cert-preview dt { font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; }
[dir=ltr] .chat-toggle { font-size: .72rem; }
/* Latin snippets inside Arabic pages (serials, prices, chip names) also use the brand face */
.latin { font-family: var(--font-brand); letter-spacing: .02em; }
.btn { white-space: nowrap; }
[dir=ltr] .header-actions .btn { padding-inline: 14px; font-size: .66rem; }
[dir=ltr] .nav { gap: 0; }
[dir=ltr] .nav a { padding: 8px 10px; }
/* ---------- ownership desk ---------- */
.method-pick { border: 0; padding: 0; margin: 0; display: flex; gap: 20px; flex-wrap: wrap; }
.method-pick .check { color: var(--text); }
.live-box { border: 1px dashed var(--line-strong); padding: 14px 16px; background: var(--bg); }
.live-box.ok { border: 1px solid var(--ok); background: color-mix(in srgb, var(--ok) 6%, var(--surface)); }
.live-box p { margin: 0 0 6px; }
.live-status { font-weight: 500; }
.live-box.ok .live-status { color: var(--ok); }
.inv-checks { list-style: none; padding: 0; margin: 0 0 16px; font-size: .9rem; }
.inv-checks li { padding: 4px 0; }
.transfer-card .price.big { margin-top: 0 !important; }
/* ---------- owner accounts ---------- */
.owner-auth h1 { margin-bottom: 4px; }
.verified-badge.reported { color: var(--bad); border-color: var(--bad); }
.verified-badge.reported i { background: var(--bad); }
.report-lost summary { cursor: pointer; color: var(--bad); }
.report-lost form { margin-top: 12px; }
.owner-actions { justify-content: flex-start; margin: 0 0 18px; }
.account-link { text-decoration: none; }
