/* Poyacity owner-approved cross-page visual consistency */
:root {
  --poya-text-size: 1rem;
  --poya-small-size: .875rem;
  --poya-title-size: clamp(1.75rem, 4vw, 2.75rem);
  --poya-subtitle-size: clamp(1rem, 2vw, 1.125rem);
}
html { scroll-behavior: smooth; }
body, button, input, select, textarea { font-family: Vazirmatn, Tahoma, Arial, sans-serif; }
body { font-size: var(--poya-text-size); line-height: 1.85; }
p, li, label, input, select, textarea, button, a { font-size: inherit; }
small, .help-text, .section-kicker, .section-subtitle, .content-meta { font-size: var(--poya-small-size); }
.content-card h2, .section-card h2, .dashboard-card h2, .data-store-card h2, .download-card h2 { font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.55; }
.content-hero,
.dashboard-hero,
.city-hero,
.data-store-hero,
.data-store-checkout-hero,
.download-hero,
.app-hero-content,
.form-hero,
.legal-hero,
.danger-hero {
  text-align: center;
  align-items: center;
  justify-content: center;
}
.content-hero > *,
.dashboard-hero > *,
.city-hero > *,
.data-store-hero > *,
.data-store-checkout-hero > *,
.download-hero > *,
.app-hero-content > *,
.form-hero > *,
.legal-hero > *,
.danger-hero > * { margin-inline: auto; }
.content-hero h1,
.dashboard-hero h1,
.city-hero h1,
.data-store-hero h1,
.data-store-checkout-hero h1,
.download-hero h1,
.app-hero-content h1,
.form-hero h1 { font-size: var(--poya-title-size); text-align: center; }
.content-hero > p,
.dashboard-hero > p,
.city-hero > p,
.data-store-hero > p,
.data-store-checkout-hero > p,
.download-hero > p,
.app-hero-content > p,
.form-hero > p { font-size: var(--poya-subtitle-size); text-align: center; }
.content-meta { justify-content: center; text-align: center; }
body:is([data-page="support"], [data-page="privacy"], [data-page="account-deletion"]) .content-hero {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}
body:is([data-page="support"], [data-page="privacy"], [data-page="account-deletion"]) .content-hero > :where(h1, p, .content-meta) {
  inline-size: 100%;
  margin-inline: auto !important;
  text-align: center !important;
  justify-content: center !important;
}
#poyaForm .report-form-section > label,
#reportTypeLabel, #reportCategoryLabel, #cooperationLabel {
  direction: rtl;
  text-align: right;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.85;
  font-weight: 700;
  color: var(--poya-ink, #142033);
  margin: 24px 0 8px;
}

:where(.section-card, .content-card, .dashboard-card, .chart-card, .data-store-builder, .data-store-citizen-products, .data-store-checkout-card) > :where(h2, h3),
:where(.section-card, .content-card, .dashboard-card, .data-store-builder, .data-store-citizen-products, .data-store-checkout-card) .dashboard-section-heading :where(h2, h3),
:where(.section-card, .content-card, .dashboard-card, .chart-card, .data-store-citizen-grid article, .data-store-checkout-card, .download-card, .support-card, .privacy-card) :where(h2, h3) {
  text-align: center;
  margin-inline: auto;
}
.poya-owner-motion {
  opacity: 0;
  transform: translateY(18px) scale(.99);
  transition: opacity .55s ease, transform .65s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease;
  transition-delay: var(--poya-motion-delay, 0ms);
}
.poya-owner-motion.poya-owner-motion-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.poya-owner-motion.poya-owner-motion-visible:hover {
  transform: translateY(-4px) scale(1.005);
}
.poya-top-five-details { margin-top: 1rem; border-top: 1px solid rgba(23,105,170,.18); padding-top: .75rem; }
.poya-top-five-details summary { cursor: pointer; font-weight: 700; color: #1769aa; }
.poya-top-five-details ul { margin: .75rem 0 0; padding: 0; list-style: none; display: grid; gap: .45rem; }
.poya-top-five-details li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem .7rem; border-radius: .65rem; background: rgba(23,105,170,.06); }
.poya-top-five-details[hidden] { display: none !important; }
.poya-chart-prerequisite-card { position: relative; }
.poya-chart-prerequisite {
  position: absolute;
  z-index: 2;
  inset-block-start: 4.35rem;
  inset-inline: 1.25rem;
  inline-size: fit-content;
  max-inline-size: calc(100% - 2.5rem);
  margin: 0 auto;
  padding: .3rem .7rem;
  border: 1px solid rgba(23, 105, 170, .2);
  border-radius: 999px;
  background: rgba(23, 105, 170, .05);
  color: #30465b !important;
  text-align: center;
  font-size: .78rem;
  font-weight: 650;
  line-height: 1.7;
}
.poya-page-backlinks { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-bottom: 1rem; }
.poya-page-updated { text-align: center; font-size: var(--poya-small-size); opacity: .85; }
.poya-scroll-top {
  position: fixed !important;
  right: 20px !important;
  left: auto !important;
  bottom: 20px;
  z-index: 9999;
  inline-size: 48px;
  block-size: 48px;
  border: 1px solid #0a2f50 !important;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f3f68 0%, #092b49 100%) !important;
  color: #fff !important;
  box-shadow: 0 12px 30px rgba(7, 34, 58, .34) !important;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s, visibility .25s, transform .25s;
}
.poya-scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.data-store-update-card {
  inline-size: fit-content;
  max-inline-size: min(100%, 520px);
  margin: 0 auto 1.25rem;
  padding: .55rem 1rem;
  border: 1px solid var(--poya-border, #dce6ef);
  border-radius: 999px;
  background: var(--poya-surface, #fff);
  box-shadow: var(--poya-shadow-sm, 0 6px 18px rgba(20, 46, 72, .07));
  text-align: center;
}
.data-store-update-card .poya-page-updated { margin-block-end: 0; }
.data-store-hero .data-store-update-card,
.data-store-checkout-hero .data-store-update-card {
  margin: .25rem auto 0;
  border-color: rgba(255, 255, 255, .42);
  background: rgba(255, 255, 255, .14);
  color: #fff;
  box-shadow: none;
}
.data-store-hero .data-store-update-card .poya-page-updated,
.data-store-checkout-hero .data-store-update-card .poya-page-updated { color: #fff; }
.owner-direct-downloads .download-hero {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.owner-direct-downloads .download-hero h1,
.owner-direct-downloads .download-hero > p { margin-block: 0 !important; }

@media (max-width: 560px) {
  .poya-scroll-top { right: 14px !important; left: auto !important; bottom: 14px; }
}

body:is(.data-store-page, .data-store-checkout-page) :is(.data-store-hero, .data-store-checkout-hero) h1,
.owner-direct-downloads :is(.download-hero h1, .download-card h2, .content-card h2) {
  inline-size: 100%;
  margin-inline: auto !important;
  text-align: center !important;
  justify-self: center;
}
.owner-direct-downloads .download-card { align-items: center; text-align: center; }
.owner-direct-downloads .download-actions { inline-size: 100%; justify-content: center; }

.content-footer-inner {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: .9rem;
  text-align: center;
}
.content-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .55rem 1.15rem;
}
.content-footer-links a {
  display: inline-flex;
  min-block-size: 40px;
  align-items: center;
  padding-inline: .35rem;
  font-weight: 700;
  text-decoration: none;
}
.content-footer-links a:hover,
.content-footer-links a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.content-footer-copyright { display: block; }
.data-store-page .data-store-product-card [data-owner-center-square],
.data-store-page .product-title-icon-centered { display: none !important; }
.owner-store-metric-hidden { display: none !important; }
.owner-direct-downloads .download-card[data-channel="google-play"],
.owner-direct-downloads .download-card[data-channel="ios-appstore"] { display: none !important; }
.owner-support-form { max-width: 760px; margin: 2rem auto 0; }
.owner-support-form .poya-field { display: grid; gap: .45rem; margin-bottom: 1rem; }
.owner-support-form input, .owner-support-form select, .owner-support-form textarea { width: 100%; }
.owner-support-result[data-state="success"] { color: #1b5e20; }
.owner-support-result[data-state="error"] { color: #b71c1c; }
.support-email-line, .support-email-link { color: inherit; }
.support-email-link { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Owner contrast closure: component backgrounds and their text must switch as
   one unit in both themes. These selectors intentionally load after each
   page's legacy inline styles. */
html:not(.theme-dark) body[data-page="index"] .cta-box .secondary-btn {
  background: #f4f8fc !important;
  border-color: #c7d8e6 !important;
  color: #123b61 !important;
}

.theme-dark #poyaForm .map-status {
  background: var(--poya-surface-soft, #162235) !important;
  border-color: var(--poya-border, #314156) !important;
  color: var(--poya-ink, #eff6ff) !important;
}

.theme-dark body[data-page="report"] .form-intro :where(h1, p),
.theme-dark body[data-page="participation"] .participation-hero h1 {
  color: #fff !important;
}

.theme-dark body:is([data-page="dashboard"], [data-page="city"], [data-page="dashboard-pro"]) .chart-card h3,
.theme-dark body[data-page="dashboard-pro"] .kpi-card h3,
.theme-dark body[data-page="city"] .report-concept-summary {
  color: var(--poya-ink, #eff6ff) !important;
}

/* The legacy dashboard pages keep white canvas cards in both themes.  Their
   headings therefore stay dark with the Chart.js labels instead of inheriting
   the dark-theme page ink. */
.theme-dark body:is([data-page="dashboard"], [data-page="city"]) .chart-card {
  background: #fff !important;
  border-color: #d6e1eb !important;
  color: #172432 !important;
}
.theme-dark body:is([data-page="dashboard"], [data-page="city"]) .chart-card h3 {
  color: #24384c !important;
}

.theme-dark body[data-page="dashboard-pro"] .alert-banner {
  background: #352d18 !important;
  border-color: #a97918 !important;
}
.theme-dark body[data-page="dashboard-pro"] .alert-banner :where(strong, span) {
  color: #ffe7a3 !important;
}

.theme-dark .filter-reset-btn {
  background: var(--poya-brand-700, #298bd2) !important;
  color: #fff !important;
}

.theme-dark :where(.owner-support-form, .form-card, .participation-card) form {
  background: transparent !important;
  color: var(--poya-ink, #eff6ff) !important;
  box-shadow: none !important;
}
.theme-dark :where(.owner-support-form, .form-card, .participation-card) form :where(label, .consent-row, .participation-field-meta) {
  color: var(--poya-ink, #eff6ff) !important;
}
.theme-dark body[data-page="participation"] .participation-submit {
  background: var(--poya-brand-700, #298bd2) !important;
  color: #fff !important;
}

.theme-dark .poya-button-secondary,
.theme-dark .poya-auth-btn-secondary {
  background: var(--poya-surface-soft, #162235) !important;
  border-color: var(--poya-border, #314156) !important;
  color: var(--poya-ink, #eff6ff) !important;
}
.theme-dark :where(.poya-auth-eyebrow, .poya-auth-inline-action, .content-footer a) {
  color: #8bc8f5 !important;
}
.theme-dark .poya-auth-btn-danger {
  background: #3b2022 !important;
  border-color: #7f3d40 !important;
  color: #ffb4ab !important;
}

.theme-dark :where(.data-store-page, .data-store-checkout-page) {
  --store-primary-strong: #b9dcf7;
}
.theme-dark .data-store-page :where(.data-store-builder, .data-store-citizen-products, .data-store-citizen-grid article) :where(h2, h3),
.theme-dark .data-store-checkout-page .data-store-checkout-card :where(h2, h3) {
  color: var(--store-ink, #eff6ff) !important;
}

.theme-dark .download-platform-icon { color: #b9dcf7 !important; }
.theme-dark .release-state.pending { color: #ffd77a !important; }
.theme-dark .release-state.ready { color: #80dbad !important; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .poya-owner-motion,
  .poya-owner-motion.poya-owner-motion-visible,
  .poya-owner-motion.poya-owner-motion-visible:hover {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Owner-approved continuous report card */
#poyaForm .report-form-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(15, 23, 42, .12));
  border-radius: 22px;
  padding: clamp(1rem, 3vw, 2rem);
  box-shadow: 0 16px 42px rgba(15, 23, 42, .08);
}
#poyaForm .report-form-section {
  display: block;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
#poyaForm .report-form-section + .report-form-section {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border, rgba(15, 23, 42, .12));
}
#poyaForm .report-question-label {
  display: block;
  width: 100%;
  margin: 24px 0 10px;
  direction: rtl;
  text-align: right;
  font: inherit;
  font-size: 16px;
  line-height: 1.85;
  font-weight: 700;
}
@media (max-width: 560px) {
  #poyaForm .report-form-card { border-radius: 16px; padding: 1rem; }
}
