/* ================================================================
   سه صفحهٔ ایستا — استایل تکمیلی
   ----------------------------------------------------------------
   تماس، قوانین و به‌زودی یک فایل مشترک دارند چون اجزایشان یکی
   است: فرم، کارت، تب، فهرست و پرسش‌های پرتکرار.

   هیچ رنگ خامی نوشته نشده؛ همه از توکن‌های قالب می‌آیند.
   ================================================================ */

/* ================================================================
   فرم
   ================================================================ */
.jj-pg-label {
  display: block;
  margin-bottom: .375rem;
  font-size: .8125rem;
  font-weight: 700;
  color: rgb(var(--c-ink-2));
}

.jj-pg-input {
  width: 100%;
  padding: .75rem 1rem;
  border-radius: 1rem;
  background-color: rgb(var(--c-surface));
  border: 1px solid rgb(var(--c-ink-3) / .28);
  color: rgb(var(--c-ink));
  font-family: inherit;
  font-size: .875rem;
  line-height: 1.9;
  transition: border-color .2s, box-shadow .2s;
}

.jj-pg-input::placeholder {
  color: rgb(var(--c-ink-3) / .75);
}

.jj-pg-input:focus {
  outline: none;
  border-color: rgb(var(--c-primary));
  box-shadow: 0 0 0 3px rgb(var(--c-primary) / .18);
}

textarea.jj-pg-input {
  resize: vertical;
  min-height: 6rem;
}

/*
 * هانی‌پات: باید برای ربات در DOM باشد ولی برای انسان — و برای
 * صفحه‌خوان — نباشد.
 */
.jj-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ================================================================
   پیام نتیجهٔ فرم
   ================================================================ */
.jj-pg-flash {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  margin-bottom: 1.25rem;
  padding: .875rem 1.125rem;
  border-radius: 1rem;
  font-size: .875rem;
  line-height: 1.9;
  border: 1px solid transparent;
}

.jj-pg-flash-ok {
  background-color: rgb(var(--c-ok) / .10);
  border-color: rgb(var(--c-ok) / .35);
  color: rgb(var(--c-ok));
}

.jj-pg-flash-err {
  background-color: rgb(var(--c-err) / .10);
  border-color: rgb(var(--c-err) / .35);
  color: rgb(var(--c-err));
}

/* ================================================================
   کارت‌ها
   ================================================================ */
.jj-pg-card-icon {
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
}

.jj-pg-card:hover .jj-pg-card-icon {
  transform: scale(1.08);
  background-color: rgb(var(--c-primary));
  color: rgb(var(--c-on-primary));
}

.jj-pg-card:hover {
  box-shadow: 0 10px 20px -12px rgb(0 0 0 / .18);
  border-color: rgb(var(--c-primary) / .4);
}

a.jj-pg-card {
  text-decoration: none;
}

/* ================================================================
   تب‌های صفحهٔ قوانین
   ================================================================ */
.jj-pg-tab {
  background-color: rgb(var(--c-ink-3) / .10);
  color: rgb(var(--c-ink-2));
  text-decoration: none;
  transition: background-color .2s, color .2s;
}

.jj-pg-tab:hover {
  background-color: rgb(var(--c-ink-3) / .18);
  color: rgb(var(--c-primary));
}

.jj-pg-tab-on,
.jj-pg-tab-on:hover {
  background-color: rgb(var(--c-primary));
  color: rgb(var(--c-on-primary));
}

/* ================================================================
   فهرست کناری
   ================================================================ */
.jj-pg-toc {
  list-style: none;
  padding-inline-start: 0;
  margin: 0;
  max-height: min(60vh, 34rem);
  overflow-y: auto;
  scrollbar-width: thin;
}

.jj-pg-toc-on {
  background-color: rgb(var(--c-primary) / .10);
  color: rgb(var(--c-primary));
  font-weight: 700;
}

/*
 * لنگرها زیر سرستون چسبان سایت گم نشوند.
 */
.jj-pg-prose h2 {
  scroll-margin-top: 6rem;
}

/* ================================================================
   متن حقوقی
   ----------------------------------------------------------------
   خروجی ویرایشگر وردپرس هیچ کلاس تیلویندی ندارد، پس شکلش اینجا
   داده می‌شود.
   ================================================================ */
.jj-pg-prose {
  color: rgb(var(--c-ink-2));
  line-height: 2;
}

.jj-pg-prose > * + * {
  margin-top: 1.1em;
}

.jj-pg-prose p {
  text-align: justify;
}

.jj-pg-prose h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: rgb(var(--c-ink));
  margin-top: 2em;
  padding-bottom: .5rem;
  border-bottom: 1px solid rgb(var(--c-ink-3) / .2);
}

.jj-pg-prose h2:first-child {
  margin-top: 0;
}

.jj-pg-prose h3,
.jj-pg-prose h4 {
  font-size: 1rem;
  font-weight: 700;
  color: rgb(var(--c-ink));
  margin-top: 1.6em;
}

.jj-pg-prose ul,
.jj-pg-prose ol {
  padding-inline-start: 1.5rem;
}

.jj-pg-prose li + li {
  margin-top: .4em;
}

.jj-pg-prose a {
  color: rgb(var(--c-primary));
  text-decoration: underline;
}

.jj-pg-prose blockquote {
  border-inline-start: 4px solid rgb(var(--c-primary));
  padding-inline-start: 1rem;
  color: rgb(var(--c-ink-2));
  font-style: normal;
}

.jj-pg-prose table {
  width: 100%;
  border-collapse: collapse;
}

.jj-pg-prose th,
.jj-pg-prose td {
  border: 1px solid rgb(var(--c-ink-3) / .25);
  padding: .5rem .75rem;
  text-align: right;
}

/* ================================================================
   نوار پیشرفت صفحهٔ «به‌زودی»
   ================================================================ */
.jj-pg-bar {
  display: block;
  width: 100%;
  height: .5rem;
  border-radius: 9999px;
  background-color: rgb(var(--c-ink-3) / .18);
  overflow: hidden;
}

.jj-pg-bar-fill {
  display: block;
  height: 100%;
  border-radius: 9999px;
  background-color: rgb(var(--c-primary));
}

/* ================================================================
   محتوای ویرایشگر برگه
   ================================================================ */
.jj-pg-body > * + * {
  margin-top: 1em;
}

.jj-pg-body p {
  line-height: 2;
  text-align: justify;
  color: rgb(var(--c-ink-2));
}

.jj-pg-body a {
  color: rgb(var(--c-primary));
  text-decoration: underline;
}

/* ================================================================
   پرسش‌های پرتکرار
   ================================================================ */
.jj-faq summary::-webkit-details-marker { display: none; }
.jj-faq summary::marker { content: ""; }

.jj-faq .jj-faq-icon {
  display: inline-flex;
  transition: transform .25s ease;
}

.jj-faq[open] .jj-faq-icon {
  transform: rotate(90deg);
}

.jj-faq summary:focus-visible {
  outline: 2px solid rgb(var(--c-primary));
  outline-offset: -2px;
  border-radius: 1rem;
}

/* ================================================================
   اعداد
   ================================================================ */
.jj-pg-scope .jj-num {
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

/* ================================================================
   حرکت
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  .jj-pg-card-icon,
  .jj-faq .jj-faq-icon {
    transition: none;
  }

  .jj-pg-card:hover .jj-pg-card-icon {
    transform: none;
  }
}

/* ================================================================
   ابزارهای غایب از بیلد فعلی
   ================================================================ */
.jj-pg-scope .font-display-hero { font-family: inherit; }
.jj-pg-scope .mt-auto           { margin-top: auto; }
.jj-pg-scope .mt-5              { margin-top: 1.25rem; }
.jj-pg-scope .p-10              { padding: 2.5rem; }
.jj-pg-scope .break-words       { overflow-wrap: break-word; }

@media (min-width: 640px) {
  .jj-pg-scope .sm\:w-56 { width: 14rem; }
}

@media (min-width: 1024px) {
  .jj-pg-scope .lg\:col-span-12 { grid-column: span 12 / span 12; }
}

@media (min-width: 768px) {
  .jj-pg-scope .md\:p-7  { padding: 1.75rem; }
  .jj-pg-scope .md\:p-9  { padding: 2.25rem; }

  .jj-pg-scope .md\:text-display-hero {
    font-size: clamp(2.25rem, 4.5vw, 3.5rem);
    line-height: 1.22;
    font-weight: 800;
    letter-spacing: -.02em;
  }

  .jj-pg-scope .md\:text-headline-lg {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    line-height: 1.35;
    font-weight: 700;
    letter-spacing: -.012em;
  }

  .jj-pg-scope .md\:text-body-lg {
    font-size: 1.0625rem;
    line-height: 1.85;
  }
}

/* ================================================================
   چاپ
   ----------------------------------------------------------------
   متن حقوقی چیزی است که واقعاً چاپ می‌شود. هر دو تب باید بیایند،
   نه فقط تب فعال.
   ================================================================ */
@media print {
  .jj-pg-scope [data-jj-panel] {
    display: block !important;
  }

  .jj-pg-scope .jj-pg-tab,
  .jj-pg-scope form,
  .jj-pg-scope aside {
    display: none;
  }

  .jj-faq > div {
    display: block !important;
  }
}
