/* =========================================================
   عيارك | Eyarak — نظام التصميم
   Mobile-first · RTL · وضع نهاري/ليلي · بدون مكتبات
   ========================================================= */

/* ---------- 1. المتغيرات (Design Tokens) ---------- */
:root {
  /* الخط */
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, "Noto Sans Arabic", system-ui, sans-serif;

  /* المقاسات */
  --fs-xs: .75rem;   /* 12 */
  --fs-sm: .875rem;  /* 14 */
  --fs-md: 1rem;     /* 16 */
  --fs-lg: 1.125rem; /* 18 */
  --fs-xl: 1.375rem; /* 22 */
  --fs-2xl: 1.75rem; /* 28 */
  --fs-3xl: 2.25rem; /* 36 */

  --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem;
  --sp-5: 1.25rem; --sp-6: 1.5rem; --sp-8: 2rem; --sp-10: 2.5rem;

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;
  --container: 1120px;

  /* الألوان — الوضع النهاري */
  --bg: #FAF8F3;
  --surface: #FFFFFF;
  --surface-2: #F4F0E6;
  --border: #E7DFCC;
  --text: #1C1A16;
  --text-muted: #625B4E;
  --gold: #C9A227;          /* تعبئة (أزرار، شارات) مع نص داكن */
  --gold-strong: #8A6912;   /* نص وروابط ذهبية على الخلفية الفاتحة */
  --gold-soft: #FBF3DA;     /* خلفيات مميزة */
  --on-gold: #1C1A16;
  --up: #12703A;   --up-soft: #E6F4EC;
  --down: #B42318; --down-soft: #FDECEA;
  --warn: #8A5300; --warn-soft: #FFF4DE;
  --focus: #1F5FD1;
  --shadow: 0 1px 2px rgb(28 26 22 / .05), 0 4px 16px rgb(28 26 22 / .06);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #121110;
  --surface: #1B1A17;
  --surface-2: #24221E;
  --border: #36322B;
  --text: #F3EFE6;
  --text-muted: #ABA291;
  --gold: #E0B84A;
  --gold-strong: #E8C463;
  --gold-soft: #2A2416;
  --on-gold: #1C1A16;
  --up: #4CC98A;   --up-soft: #15291E;
  --down: #F4847B; --down-soft: #321A18;
  --warn: #F2B65A; --warn-soft: #2E2414;
  --focus: #7FA8FF;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 4px 16px rgb(0 0 0 / .25);
  color-scheme: dark;
}

/* ---------- 2. الأساس ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--gold-strong); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 var(--sp-3); font-weight: 700; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
p { margin: 0 0 var(--sp-4); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* الأرقام: أرقام لاتينية بعرض ثابت لتسهيل المقارنة في الجداول */
.num, .price, td, .badge { font-variant-numeric: tabular-nums; }
.num { direction: ltr; unicode-bidi: isolate; display: inline-block; }
/* داخل الجداول تبقى الخلية خلية جدول (وإلا تنكسر حدود الصفوف) */
td.num, th.num { display: table-cell; direction: rtl; unicode-bidi: normal; }
.pair { display: inline-flex; gap: var(--sp-3); font-size: var(--fs-sm); }
.pair small { color: var(--text-muted); margin-inline-end: 2px; }
@media (max-width: 480px) {
  .price-table th, .price-table td { padding: .75rem .6rem; }
  .price-table td.price { font-size: var(--fs-md); }
}

.icon { width: 1.15em; height: 1.15em; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.muted { color: var(--text-muted); }
.stack > * + * { margin-block-start: var(--sp-4); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- 3. الترويسة ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  border-block-end: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; gap: var(--sp-3); min-height: 60px; }
.brand { display: flex; align-items: center; gap: var(--sp-2); text-decoration: none; color: var(--text); }
.brand-name { font-size: var(--fs-xl); font-weight: 700; line-height: 1; }
.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: var(--sp-2); }

.nav { display: none; }
.nav a { color: var(--text); text-decoration: none; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface-2); color: var(--gold-strong); }
@media (min-width: 1100px) { .nav { display: flex; gap: 2px; } .menu-btn { display: none; } }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
[data-theme="dark"] .icon-sun, :root:not([data-theme="dark"]) .icon-moon { display: none; }

/* اختيار الدولة */
.select {
  appearance: none; font: inherit; font-size: var(--fs-sm); color: var(--text);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23887E6B' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left .6rem center / 1rem;
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: .5rem .85rem; padding-inline-end: 2rem; min-height: 40px;
}

/* ---------- 4. شريط الحالة / التنبيهات ---------- */
.status {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-sm); padding: .3rem .75rem; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--text-muted);
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status--live { background: var(--up-soft); color: var(--up); }
.status--stale { background: var(--warn-soft); color: var(--warn); }
.status--closed { background: var(--surface-2); color: var(--text-muted); }

.alert {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md);
  background: var(--warn-soft); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent);
  font-size: var(--fs-sm);
}
.alert .icon { margin-top: .2em; }

/* ---------- 5. البطاقات ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-5); box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-block-end: var(--sp-4); flex-wrap: wrap; }
.card-head h2 { margin: 0; font-size: var(--fs-lg); }

/* بطاقة السعر الرئيسي */
.hero-price {
  background:
    radial-gradient(120% 100% at 100% 0%, var(--gold-soft) 0%, transparent 60%),
    var(--surface);
}
.hero-label { font-size: var(--fs-sm); color: var(--text-muted); margin: 0 0 var(--sp-1); }
.hero-value { font-size: var(--fs-3xl); font-weight: 700; line-height: 1.15; display: flex; align-items: baseline; gap: var(--sp-2); flex-wrap: wrap; }
.hero-value .currency { font-size: var(--fs-md); font-weight: 500; color: var(--text-muted); }
.hero-meta { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-3); flex-wrap: wrap; font-size: var(--fs-sm); color: var(--text-muted); }
.hero-meta span { display: inline-flex; align-items: center; gap: var(--sp-1); }

/* شبكة البطاقات الصغيرة */
.tiles { display: grid; gap: var(--sp-3); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-4); }
.tile-label { font-size: var(--fs-sm); color: var(--text-muted); margin: 0; }
.tile-value { font-size: var(--fs-xl); font-weight: 700; margin: 2px 0 var(--sp-1); }

/* ---------- 6. شارة التغيّر (لون + سهم + نص — لا نعتمد على اللون وحده) ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 2px;
  font-size: var(--fs-sm); font-weight: 600; padding: .1rem .5rem; border-radius: var(--r-pill);
  direction: ltr;
}
.badge .icon { width: 1em; height: 1em; }
.badge--up { color: var(--up); background: var(--up-soft); }
.badge--down { color: var(--down); background: var(--down-soft); }
.badge--flat { color: var(--text-muted); background: var(--surface-2); }

/* ---------- 7. جدول الأسعار ---------- */
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); }
.price-table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); min-width: 340px; }
.price-table caption { text-align: start; padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm); color: var(--text-muted); caption-side: bottom; }
.price-table th, .price-table td { padding: .85rem var(--sp-4); text-align: start; border-block-end: 1px solid var(--border); white-space: nowrap; }
.price-table thead th { background: var(--surface-2); font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); }
.price-table tbody tr:last-child td, .price-table tbody tr:last-child th { border-block-end: 0; }
.price-table tbody th { font-weight: 600; }
.price-table td.price { font-weight: 700; font-size: var(--fs-lg); }
.price-table tr.is-featured { background: var(--gold-soft); }
.karat-chip { display: inline-grid; place-items: center; min-width: 2.2rem; height: 1.6rem; border-radius: var(--r-sm); background: var(--gold); color: var(--on-gold); font-size: var(--fs-sm); font-weight: 700; margin-inline-end: var(--sp-2); }
.na { color: var(--text-muted); font-weight: 400; font-size: var(--fs-sm); }

/* ---------- 8. الرسم البياني ---------- */
.tabs { display: flex; gap: var(--sp-1); overflow-x: auto; padding: 3px; background: var(--surface-2); border-radius: var(--r-md); scrollbar-width: none; }
.tab { font: inherit; font-size: var(--fs-sm); border: 0; background: transparent; color: var(--text-muted); padding: .35rem .8rem; border-radius: var(--r-sm); cursor: pointer; white-space: nowrap; }
.tab[aria-selected="true"] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.chart { position: relative; height: 240px; margin-top: var(--sp-4); }
@media (min-width: 720px) { .chart { height: 300px; } }
.chart svg { width: 100%; height: 100%; }
.chart-line { fill: none; stroke: var(--gold-strong); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart-area { fill: var(--gold); opacity: .14; }
.chart-grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--text-muted); font-size: var(--fs-sm); border: 1px dashed var(--border); border-radius: var(--r-md); padding: var(--sp-4); }

/* ---------- 9. النماذج والحاسبات ---------- */
.form-grid { display: grid; gap: var(--sp-4); }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, 1fr); } }
.field label { display: block; font-size: var(--fs-sm); font-weight: 600; margin-block-end: var(--sp-1); }
.field .hint { font-size: var(--fs-xs); color: var(--text-muted); margin-top: var(--sp-1); }
.input {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-md); padding: .65rem .85rem; min-height: 46px;
}
.input:focus { border-color: var(--gold-strong); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 30%, transparent); }
.input[inputmode="decimal"] { direction: ltr; text-align: right; }

.segmented { display: inline-flex; background: var(--surface-2); border-radius: var(--r-md); padding: 3px; }
.segmented label { padding: .35rem .8rem; border-radius: var(--r-sm); font-size: var(--fs-sm); cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented input:checked + span { font-weight: 600; }
.segmented label:has(input:checked) { background: var(--surface); box-shadow: var(--shadow); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font: inherit; font-weight: 600; min-height: 46px; padding: .6rem 1.25rem;
  border-radius: var(--r-md); border: 1px solid transparent; cursor: pointer; text-decoration: none;
}
.btn--primary { background: var(--gold); color: var(--on-gold); }
.btn--primary:hover { filter: brightness(1.05); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }

.result { background: var(--surface-2); border-radius: var(--r-md); padding: var(--sp-4); }
.result dl { display: grid; grid-template-columns: 1fr auto; gap: var(--sp-2) var(--sp-4); margin: 0; }
.result dt { color: var(--text-muted); }
.result dd { margin: 0; font-weight: 600; text-align: end; }
.result .total dt, .result .total dd { font-size: var(--fs-lg); color: var(--text); font-weight: 700; border-top: 1px solid var(--border); padding-top: var(--sp-2); }
.note { font-size: var(--fs-xs); color: var(--text-muted); margin-top: var(--sp-3); }

/* ---------- 10. روابط الدول ---------- */
.country-grid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .country-grid { grid-template-columns: repeat(3, 1fr); } }
.country-link {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); text-decoration: none; color: var(--text);
}
.country-link:hover { border-color: var(--gold); }
.country-link small { display: block; color: var(--text-muted); font-size: var(--fs-xs); }
.country-code { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .05em; color: var(--gold-strong); background: var(--gold-soft); padding: .15rem .45rem; border-radius: 6px; direction: ltr; }

/* ---------- 11. مسار التنقل ---------- */
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-1); padding: 0; margin: var(--sp-4) 0; font-size: var(--fs-sm); color: var(--text-muted); }
.breadcrumbs li + li::before { content: "‹"; margin-inline-end: var(--sp-1); }
.breadcrumbs a { color: var(--text-muted); }

/* ---------- 12. مساحة إعلانية (ارتفاع محجوز لمنع اهتزاز الصفحة CLS) ---------- */
.ad-slot { min-height: 100px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--surface-2); color: var(--text-muted); font-size: var(--fs-xs); }
.ad-slot::before { content: "إعلان"; }
.ad-slot[data-filled]::before { content: none; }

/* ---------- 13. التذييل ---------- */
.footer-grid { display: grid; gap: var(--sp-6); }
.site-footer h3 { font-size: var(--fs-md); color: var(--text); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-2); }

/* ---------- 14. تخطيط الصفحة ---------- */
.page { padding-block: var(--sp-5); display: grid; gap: var(--sp-5); grid-template-columns: minmax(0, 1fr); }
.page > *, .layout-2 > * { min-width: 0; } /* يمنع الجداول والتبويبات من توسيع الصفحة على الموبايل */
.layout-2 > * + * { margin-block-start: var(--sp-5); }
@media (min-width: 1000px) { .layout-2 > * + * { margin-block-start: 0; } }
.section-title { display: flex; align-items: center; gap: var(--sp-2); }
.section-title .icon { color: var(--gold-strong); }
@media (min-width: 1000px) {
  .layout-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--sp-5); align-items: start; }
}

/* ---------- 15. إضافات المرحلة 3 ---------- */
.skip-link { position: absolute; inset-inline-start: 1rem; top: -100px; z-index: 50; background: var(--gold); color: var(--on-gold); padding: .5rem 1rem; border-radius: var(--r-sm); font-weight: 600; }
.skip-link:focus { top: .5rem; }

/* قائمة الموبايل بدون JavaScript */
.mobile-nav { position: relative; }
.mobile-nav summary { list-style: none; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav nav {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 30;
  width: min(80vw, 280px); display: grid; padding: var(--sp-2);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.mobile-nav nav a { color: var(--text); text-decoration: none; padding: .6rem .75rem; border-radius: var(--r-sm); }
.mobile-nav nav a:hover, .mobile-nav nav a[aria-current="page"] { background: var(--surface-2); color: var(--gold-strong); }
@media (min-width: 1100px) { .mobile-nav { display: none; } }
.country-form { margin: 0; }

.lead { font-size: var(--fs-lg); color: var(--text-muted); margin-top: calc(var(--sp-2) * -1); }
.prose h2 { margin-top: var(--sp-5); }
.prose h2:first-child, .prose h1 + h2 { margin-top: 0; }
.prose ul { padding-inline-start: 1.25rem; margin: 0 0 var(--sp-4); }
.prose li { margin-bottom: var(--sp-2); }
.empty-state { text-align: center; padding-block: var(--sp-8); }
.empty-state .empty-icon { width: 40px; height: 40px; margin: 0 auto var(--sp-3); color: var(--gold-strong); }
.alert--info { background: var(--surface-2); color: var(--text-muted); border-color: var(--border); }
.w-full { width: 100%; }
.label { display: block; font-size: var(--fs-sm); font-weight: 600; margin-block-end: var(--sp-1); }
.calc .result { margin-top: var(--sp-5); }
.result dl > div { display: contents; }
.result [hidden] { display: none; }
.input[aria-invalid="true"] { border-color: var(--down); }
.footer-bottom p { margin: 0 0 var(--sp-1); }
.price-table th a { color: var(--text); font-weight: 600; }
.chart-tooltip { position: absolute; pointer-events: none; background: var(--text); color: var(--bg); font-size: var(--fs-xs); padding: .25rem .5rem; border-radius: 6px; transform: translate(-50%, -120%); white-space: nowrap; direction: ltr; }
.chart-axis { fill: var(--text-muted); font-size: 11px; font-family: var(--font); }
.chart-dot { fill: var(--gold-strong); }
.chart-cursor { stroke: var(--text-muted); stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.chart-labels { position: absolute; inset: 0; pointer-events: none; font-size: var(--fs-xs); color: var(--text-muted); direction: ltr; }
.chart-labels span { position: absolute; background: color-mix(in srgb, var(--surface) 80%, transparent); padding: 0 4px; border-radius: 4px; }
.lbl-hi { top: 0; left: 0; } .lbl-lo { bottom: 26px; left: 0; }
.lbl-from { bottom: 0; left: 0; } .lbl-to { bottom: 0; right: 0; }
@media (max-width: 480px) {
  .karat-label { display: none; }               /* على الموبايل يكفي رمز العيار */
  .price-table thead th:first-child { width: 1%; }
  .price-table caption { padding: var(--sp-3); }
}
/* الأسئلة الشائعة */
.faq details { border-bottom: 1px solid var(--border); padding-block: var(--sp-2); }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 700; color: var(--gold-strong); font-size: var(--fs-lg); }
.faq details[open] summary::after { content: "−"; }
.faq summary h3 { margin: 0; font-size: var(--fs-md); font-weight: 600; }
.faq details p { margin: var(--sp-2) 0 0; color: var(--text-muted); }
ins.adsbygoogle { display: block; }

/* ---------- 16. هوية 2026-11: الشعار، القائمة بالأيقونات، الأعلام، التذييل الجديد ---------- */
/* الشعار ثنائي اللغة: العلامة | عيارك ┃ EYARAK */
.brand { gap: .6rem; flex-shrink: 0; }
.brand-mark { display: inline-grid; place-items: center; border-radius: 12px; box-shadow: 0 0 0 1px rgb(201 162 39 / .35), 0 6px 18px -8px rgb(201 162 39 / .7); }
.brand-mark img { width: 38px; height: 38px; display: block; border-radius: 11px; }
.brand-name { font-size: 1.55rem; font-weight: 700; line-height: 1; letter-spacing: -.01em; }
.brand-sep { width: 1px; align-self: stretch; margin-block: 6px; background: linear-gradient(transparent, var(--gold), transparent); }
.brand-latin {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif; font-size: .78rem; font-weight: 700; letter-spacing: .32em;
  direction: ltr; line-height: 1; padding-inline-start: .32em; /* يعادل المسافة بعد آخر حرف */
  background: linear-gradient(180deg, #E9C35A, #A97F17); -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-theme="dark"] .brand-latin { background-image: linear-gradient(180deg, #F6DE8D, #D4A93A); }
/* الموبايل: قائمة الدول موجودة داخل زر القائمة، فنُخفي حقل الاختيار ليتسع الشعار الكامل */
@media (max-width: 520px) { .site-header .country-form { display: none; } .brand-name { font-size: 1.35rem; } .brand-latin { font-size: .7rem; letter-spacing: .26em; } .brand-mark img { width: 34px; height: 34px; } .brand { gap: .5rem; } }
@media (max-width: 330px) { .brand-sep, .brand-latin { display: none; } }

/* القائمة الرئيسية بأيقونات */
.nav a { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .65rem; white-space: nowrap; }
.nav-icon { width: 18px; height: 18px; color: var(--gold-strong); flex-shrink: 0; }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--gold); }
.mobile-nav nav a { display: flex; align-items: center; gap: .6rem; }
.mobile-nav nav { width: min(86vw, 320px); max-height: 75vh; overflow-y: auto; }
.mobile-nav-h { margin: var(--sp-2) .75rem var(--sp-1); font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted); }
.mobile-countries { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.mobile-countries a { font-size: var(--fs-sm); padding: .5rem .6rem !important; }

/* الأعلام */
.flag { width: 20px; height: 15px; border-radius: 3px; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 0 1px rgb(0 0 0 / .12); vertical-align: middle; }
.flag--nav { width: 18px; height: 13.5px; }
.flag--lg { width: 32px; height: 24px; border-radius: 4px; }
.flag--hero { width: 30px; height: 22.5px; border-radius: 4px; margin-inline-end: .55rem; vertical-align: -2px; }
.country-link { justify-content: flex-start; }
.country-link .country-link-text { flex: 1; min-width: 0; }
.country-link .tool-icon { width: 28px; height: 28px; padding: 5px; border-radius: 8px; background: var(--gold-soft); color: var(--gold-strong); flex-shrink: 0; }
.country-cell { display: inline-flex; align-items: center; gap: .5rem; color: var(--text); font-weight: 600; text-decoration: none; }
.country-cell:hover span:first-of-type { color: var(--gold-strong); }
.price-table--arab .country-code { font-weight: 600; opacity: .85; }
@media (max-width: 520px) { .price-table--arab .country-code { display: none; } }

/* المربعات */
.tile { position: relative; overflow: hidden; }
.tile-value small { font-size: var(--fs-xs); font-weight: 500; color: var(--text-muted); }
.tile-karat { position: absolute; inset-inline-end: -4px; top: -10px; font-size: 3.4rem; font-weight: 700; line-height: 1; color: var(--gold); opacity: .14; pointer-events: none; }
.tile-icon { position: absolute; inset-inline-end: 10px; top: 10px; width: 22px; height: 22px; color: var(--gold); opacity: .55; }
.tile--k24 { border-top: 3px solid var(--gold); }

/* السوق العالمي */
.global-main { display: grid; gap: var(--sp-4); }
@media (min-width: 760px) { .global-main { grid-template-columns: 1fr 1.3fr; align-items: center; } }
.global-label { margin: 0; color: var(--text-muted); font-size: var(--fs-sm); }
.global-value { margin: .2rem 0; font-size: var(--fs-3xl); font-weight: 700; display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.global-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); margin: 0; }
.global-grid > div { background: var(--surface-2); border-radius: var(--r-md); padding: var(--sp-3); }
.global-grid dt { font-size: var(--fs-xs); color: var(--text-muted); }
.global-grid dd { margin: 2px 0 0; font-weight: 700; font-size: var(--fs-lg); }
.small { font-size: var(--fs-sm); }
.charts-2 { display: grid; gap: var(--sp-5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .charts-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.charts-2 > * { min-width: 0; }

/* التذييل الجديد — داكن دائمًا بلمسة ذهبية */
.site-footer {
  position: relative; overflow: hidden; margin-top: var(--sp-10); padding-block: var(--sp-10) var(--sp-5);
  background: #15130F; color: #BDB4A2; font-size: var(--fs-sm);
  border-top: 1px solid #3A3222;
}
.site-footer::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, transparent, #C9A227 20%, #F6DE8D 50%, #C9A227 80%, transparent); }
.footer-glow { position: absolute; width: 520px; height: 520px; inset-inline-start: -160px; top: -260px; background: radial-gradient(circle, rgb(201 162 39 / .16), transparent 65%); pointer-events: none; }
.site-footer .container { position: relative; }
.site-footer a { color: #D9D1BF; text-decoration: none; }
.site-footer a:hover { color: #F2CF6A; }
.footer-top { display: grid; gap: var(--sp-3); padding-bottom: var(--sp-6); margin-bottom: var(--sp-6); border-bottom: 1px solid #2C271D; }
@media (min-width: 860px) { .footer-top { grid-template-columns: auto 1fr auto; align-items: center; gap: var(--sp-6); } }
.brand--footer { color: #F3EFE6; }
.brand--footer .brand-latin { background-image: linear-gradient(180deg, #F6DE8D, #D4A93A); }
.footer-tagline { margin: 0; color: #BDB4A2; max-width: 52ch; }
.footer-cta { display: inline-flex; align-items: center; gap: .5rem; justify-self: start; padding: .65rem 1rem; border-radius: var(--r-pill); background: linear-gradient(180deg, #E9C35A, #C9A227); color: #1C1A16 !important; font-weight: 700; box-shadow: 0 8px 24px -10px rgb(201 162 39 / .8); }
.footer-cta:hover { filter: brightness(1.06); }
.footer-grid { display: grid; gap: var(--sp-6); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer-h { display: flex; align-items: center; gap: .45rem; font-size: var(--fs-md); color: #F3EFE6; margin: 0 0 var(--sp-3); }
.footer-h .icon { width: 18px; height: 18px; color: #E0B84A; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-2); }
.footer-countries { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--sp-4) !important; }
.footer-countries a { display: inline-flex; align-items: center; gap: .5rem; }
.footer-countries .flag { box-shadow: 0 0 0 1px rgb(255 255 255 / .12); }
.footer-note { display: flex; gap: .5rem; align-items: flex-start; margin: var(--sp-6) 0 0; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: #1D1A15; border: 1px solid #2C271D; font-size: var(--fs-xs); color: #B5AC99; }
.footer-note .icon { width: 16px; height: 16px; color: #E0B84A; flex-shrink: 0; margin-top: 1px; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-4); margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid #2C271D; font-size: var(--fs-xs); color: #A39A87; }
.footer-bottom p { margin: 0; }
.footer-bottom strong { color: #F2CF6A; font-weight: 700; }
.footer-credit a { color: #A39A87; }
.to-top { display: inline-flex; align-items: center; gap: .3rem; }
.to-top .icon { width: 14px; height: 14px; }
.flag, .flag--hero { display: inline-block; }
.note .icon { display: inline-block; vertical-align: -3px; margin-inline-end: .25rem; }
.global-main--compact { grid-template-columns: 1fr !important; }
@media (min-width: 760px) { .global-main--compact .global-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- 17. الفضة ---------- */
.karat-chip--silver { background: linear-gradient(180deg, #E6E8EC, #AEB4BD); color: #1C1A16; min-width: 2.6rem; }
.hero-price--silver { background-image: radial-gradient(120% 140% at 0% 0%, rgb(174 180 189 / .22), transparent 60%); }
.tile--silver .tile-karat { color: #8E96A3; font-size: 2.6rem; }
.tile--silver:first-child { border-top: 3px solid #AEB4BD; }
.global-grid--3 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .global-grid--3 { grid-template-columns: repeat(3, 1fr); } }
.metal-teaser { display: flex; align-items: center; gap: var(--sp-3); text-decoration: none; color: var(--text); padding: var(--sp-4); }
.metal-teaser:hover { border-color: var(--gold); }
.metal-teaser-text { flex: 1; min-width: 0; }
.metal-teaser-text strong { display: block; font-size: var(--fs-lg); }
.metal-teaser-text small { color: var(--text-muted); }
.metal-teaser-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; font-weight: 700; flex-shrink: 0;
  background: linear-gradient(145deg, #F2F4F7, #A9B0BA); color: #2B2F36; box-shadow: inset 0 0 0 2px rgb(255 255 255 / .5); direction: ltr; }
.metal-teaser-icon--gold { background: linear-gradient(145deg, #F6DE8D, #C9A227); color: #3A2C05; }
.metal-teaser .icon:last-child { color: var(--text-muted); }
