@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Shared design tokens. Page styles may extend these semantic roles, not redefine components. */
:root {
  color-scheme: light;
  --color-canvas: #f4f8fb;
  --color-surface: #ffffff;
  --color-surface-raised: #edf6fa;
  --color-surface-strong: #e1f0f6;
  --color-text: #102735;
  --color-text-muted: #526b79;
  --color-border: #c8dbe5;
  --color-primary: #006f96;
  --color-primary-hover: #005b7b;
  --color-positive: #147845;
  --color-warning: #8a5a00;
  --color-danger: #b42336;
  --color-on-primary: #ffffff;
  --font-sans: "Vazirmatn", Tahoma, "Segoe UI", Arial, sans-serif;
  --radius-control: 10px;
  --radius-button: 12px;
  --radius-card: 16px;
  --content-width: 1280px;
  --control-height: 44px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }

/* Shared brand primitive used by every website header. */
.wordmark { width: 150px; height: 48px; display: inline-flex; flex: 0 0 auto; align-items: center; overflow: visible; padding: 0; border-radius: 0; background: transparent; text-decoration: none; }
.wordmark .brand-logo { display: block; width: 100%; height: 100%; object-fit: contain; object-position: right center; }
@media(max-width:640px){.wordmark{width:132px;height:42px}}

/* Compact main-site header: static markup, independent of page-local shells. */
header.az-header {
  position: relative; z-index: 50; width: 100%; height: 72px; min-height: 72px;
  margin: 0; padding: 0 max(24px, calc((100% - 1280px) / 2));
  display: flex; flex-wrap: nowrap; align-items: center; gap: 28px;
  border: 0; border-bottom: 1px solid var(--color-border);
  background: var(--color-surface); color: var(--color-text);
  font: 600 14px/1.5 var(--font-sans); direction: rtl;
}
header.az-header .wordmark { width: 132px; height: 48px; margin: 0; flex: 0 0 132px; }
header.az-header .brand-logo { width: 100%; height: 100%; object-fit: contain; }
header.az-header .az-navigation { margin-inline-start: auto; }
header.az-header .az-navigation > summary { display: none; }
@media (min-width: 1101px) {
  header.az-header .az-navigation::details-content { content-visibility: visible; }
}
header.az-header .az-navigation > nav { display: flex; align-items: center; gap: 16px; }
header.az-header a, header.az-header button, header.az-header summary {
  font-family: var(--font-sans); font-size: 14px; font-weight: 600; line-height: 1.5;
  text-decoration: none; white-space: nowrap; letter-spacing: normal;
}
header.az-header .az-navigation nav > a { display: flex; align-items: center; min-height: 44px; padding: 0 4px; color: var(--color-text-muted); }
header.az-header nav > a:hover { color: var(--color-primary); }
header.az-header .az-account { flex: 0 0 104px; width: 104px; }
header.az-header .header-account-link, header.az-header .account-menu-toggle {
  width: 104px; height: 44px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--color-primary); background: var(--color-surface-raised);
  border: 1px solid var(--color-border); border-radius: var(--radius-control);
}
header.az-header :is(a, button, summary):focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
header.az-header .account-dropdown { color: var(--color-text); background: var(--color-surface); }
header.az-header .account-dropdown :is(a, button) { min-height: 44px; }
body:has(.az-header) .auth-shell { height: calc(100dvh - 72px); }
@media (max-width: 1100px) {
  header.az-header { gap: 12px; padding-inline: 16px; }
  header.az-header .az-navigation > summary {
    display: flex; align-items: center; justify-content: center; min-width: 56px; height: 44px;
    padding: 0 8px; border: 1px solid var(--color-border); border-radius: var(--radius-control); cursor: pointer;
  }
  header.az-header .az-navigation > summary::marker { content: ''; }
  header.az-header .az-navigation > nav { display: none; }
  header.az-header .az-navigation[open] > nav {
    position: absolute; inset-inline: 16px; top: calc(100% + 8px); display: flex;
    flex-direction: column; align-items: stretch; gap: 0; padding: 12px;
    max-height: calc(100dvh - 96px); overflow-y: auto;
    border: 1px solid var(--color-border); border-radius: 12px;
    background: var(--color-surface); box-shadow: 0 16px 40px #10273518;
  }
  header.az-header .az-navigation nav > a { padding-inline: 12px; }
}
@media (max-width: 800px) {
  body:has(.az-header) .auth-shell { height: auto; min-height: calc(100dvh - 72px); }
}
@media (max-width: 380px) {
  header.az-header { gap: 8px; padding-inline: 12px; }
  header.az-header .wordmark { width: 108px; flex-basis: 108px; }
}

/* Shared account-menu component */
.account-menu { position: relative; }
.account-menu-toggle {
  min-height: var(--control-height);
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border: 1px solid var(--line, var(--color-border));
  border-radius: var(--radius-control);
  color: var(--ink, var(--color-text));
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}
.account-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 40;
  width: min(280px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid var(--line, var(--color-border));
  border-radius: 12px;
  color: var(--ink, var(--color-text));
  background: var(--night, var(--color-surface));
  box-shadow: 0 20px 45px rgba(16, 39, 53, .16);
}
.account-dropdown-label { display: block; color: var(--muted, var(--color-text-muted)); font-size: 11px; }
.account-dropdown strong { display: block; overflow: hidden; margin: 2px 0 10px; text-align: left; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.account-dropdown a,
.account-dropdown button { width: 100%; min-height: 42px; display: flex; align-items: center; padding: 0 10px; border: 0; border-top: 1px solid var(--line, var(--color-border)); color: var(--ink, var(--color-text)); background: transparent; font-size: 12px; font-weight: 500; text-decoration: none; cursor: pointer; }
.account-dropdown button { color: var(--color-danger); }
.account-dropdown a:hover,
.account-dropdown button:hover { color: var(--earth, var(--color-primary)); }

/* Shared support component */
footer.site-footer { width: min(calc(100% - 48px), var(--content-width)); min-height: 180px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin: 0 auto; padding: 32px 0 88px; border-top: 1px solid var(--line, var(--color-border)); color: var(--muted, var(--color-text-muted)); font-size: 12px; direction: rtl; }
.site-footer-brand img { display: block; width: 150px; height: auto; }
.site-footer-info { text-align: center; line-height: 1.8; }
.site-footer-info p { margin: 4px 0; }
.site-footer-info a { text-underline-offset: 4px; }
.site-footer-social a { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink, var(--color-text)); text-decoration: none; }
.site-footer-social svg { width: 24px; height: 24px; flex: 0 0 24px; fill: currentColor; }
.site-footer-social a:hover { color: var(--earth, var(--color-primary)); }
.site-footer a:focus-visible { outline: 2px solid var(--earth, var(--color-primary)); outline-offset: 4px; }
@media (max-width: 640px) {
  footer.site-footer { width: calc(100% - 32px); flex-direction: column; justify-content: center; gap: 20px; }
}

.support-fab { position: fixed; bottom: max(18px, env(safe-area-inset-bottom)); left: 18px; z-index: 100; min-height: 48px; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: #fff; background: #229ed9; box-shadow: 0 12px 32px rgba(0,0,0,.28); font-size: 12px; font-weight: 800; line-height: 1; text-decoration: none; }
.support-fab svg { display: block; width: 20px; max-width: 20px; height: 20px; max-height: 20px; flex: 0 0 20px; fill: currentColor; }
.support-fab:hover { color: #fff; background: #1688bd; transform: translateY(-2px); }
.support-fab:focus-visible { outline: 2px solid var(--earth, var(--color-primary)); outline-offset: 3px; }

@media (prefers-reduced-motion: no-preference) {
  .support-fab { transition: transform .2s ease, background-color .2s ease; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition-duration: .01ms !important; }
}
