/* Shared offline design fixes. No remote fonts or icon fonts are required. */
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }

/* Match the typography of the original online templates. Web-font links are kept in the HTML; these are safe fallbacks. */
html[lang="en"] body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  letter-spacing: 0;
}
html[lang="fa"] body {
  font-family: 'Vazirmatn', Tahoma, 'Segoe UI', sans-serif !important;
  letter-spacing: -0.015em;
}
html[lang="ku"] body {
  font-family: 'Noto Kufi Arabic', 'Noto Sans Arabic', 'Rabar', 'Vazirmatn', Tahoma, sans-serif !important;
  letter-spacing: -0.01em;
  word-spacing: 0.04em;
}
button, input, select, textarea, [contenteditable="true"] {
  font-family: inherit !important;
  font-size: inherit;
  letter-spacing: inherit;
}
button { line-height: 1.25; }
.brand-logo-text {
  font-family: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  letter-spacing: -0.02em;
}

/* Tailwind v4 generated utilities reference --brand-* while the original templates define --color-brand-*.
   These aliases restore the exact original palette behavior for all buttons, borders, gradients and shadows. */
:root {
  --brand-50: var(--color-brand-50);
  --brand-100: var(--color-brand-100);
  --brand-200: var(--color-brand-200);
  --brand-300: var(--color-brand-300);
  --brand-400: var(--color-brand-400);
  --brand-500: var(--color-brand-500);
  --brand-600: var(--color-brand-600);
  --brand-700: var(--color-brand-700);
  --brand-800: var(--color-brand-800);
  --brand-900: var(--color-brand-900);
}
.logo-mark { width: 100%; height: 100%; object-fit: contain; }
.shadow-soft { box-shadow: 0 20px 50px -20px rgba(15,23,42,.35); }
.shadow-glow { box-shadow: 0 0 0 1px rgba(99,102,241,.12),0 20px 60px -25px rgba(99,102,241,.40); }

/* Keep notification text readable in all languages and themes. */
#toast-container { direction: inherit; }
#toast-container > div {
  color: #fff !important;
  opacity: 1 !important;
  font-family: inherit !important;
  font-weight: 600;
  line-height: 1.65;
}
#toast-container button { color: #cbd5e1; }
#toast-container button:hover { color: #fff; }
#loading-overlay, #tour-tooltip { font-family: inherit; }
#loading-overlay { color: #fff; }
#loading-title { color: #fff; font-weight: 800; }
#loading-message { color: #cbd5e1; }

/* Local SVG icons inherit the original utility sizing and text color. */
svg.local-icon { display: inline-block; flex: 0 0 auto; fill: currentColor; vertical-align: middle; }

/* Article PDF icon replacement; no Bootstrap icon font is needed. */
.article-pdf-icon { color: #3b82f6; }
