/* Shared reading and touch targets for the approved Mojan page templates. */
:root {
  --ux-forest: #293b33;
  --ux-ink: #292b28;
  --ux-reading-size: 18px;
}

/* Specificity protects the final reading layer from the legacy article themes. */
html body.mj-site p.ux-prose {
  box-sizing: border-box;
  font-size: var(--ux-reading-size) !important;
  color: var(--ux-ink) !important;
  max-inline-size: min(100%, 720px) !important;
}
/* The older forest callout expected white body copy. Once its longer
   paragraphs are charcoal, a light surface is required for legibility. */
body.mj-site .ref-cta:has(p.ux-prose) {
  background: #fff !important;
  color: var(--ux-ink) !important;
  box-shadow: inset 0 0 0 1px #d8dfda;
}
body.mj-site .ref-cta:has(p.ux-prose) :is(h2,h3,p,.ref-inline) {
  color: var(--ux-ink) !important;
}
html body.mj-site main#main h1 {
  font-size: clamp(30px, 3.35vw, 43px) !important;
  font-weight: 700 !important;
}
body.mj-site main .mj-instagram-inline,
body.mj-site main .mj-instagram-inline *,
body.mj-site main .mj-instagram-kicker,
body.mj-site main .mj-instagram-button bdi,
body.mj-site main #content-home-01 > p:first-of-type,
body.mj-site main #content-home-01 .faq-jump {
  font-size: 14px !important;
}

/* Labels that fell below the reading minimum in one or both legacy layouts. */
body.mj-site main :is(.mj-article-signature, .mj-article-signature *,
  .ref-breadcrumb, .ref-breadcrumb a, .ref-breadcrumb span, a.mj-breadcrumb,
  .ref-more, small, .v8-toc a, .visit-toc a, .ref-toc a, .eyebrow,
  .m13-kicker, .mj-eyebrow, .mj-search > span, .step-index,
  .travel-sidebar a, .travel-hero-bottom > span, .related-pages a,
  .contact-row > span, figcaption .mj-textlink) {
  font-size: 14px !important;
}

html body.mj-site :is(a,button,summary,input,select,textarea,[tabindex]):focus-visible {
  outline: 2px solid var(--ux-forest) !important;
  outline-offset: 3px;
}

body.mj-site :is(.mj-header .mj-book, a.button[href*="nobat.ir/"], a.button[href*="wa.me/"]) {
  background: var(--ux-forest) !important;
  color: #fff !important;
  border: 1px solid var(--ux-forest) !important;
}
body.mj-site :is(a.button.outline, .ref-cta a.button):is([href*="nobat.ir/"],[href*="wa.me/"]) {
  background: #fff !important;
  color: var(--ux-forest) !important;
  border: 1px solid var(--ux-forest) !important;
}

body.mj-site :is(.final-toc, .ref-toc, .v8-toc, .visit-toc, .section-nav,
    .ref-breadcrumb, .mj-navigation, .mj-footer) a,
body.mj-site a.mj-breadcrumb,
body.mj-site :is(.final-toc, .ref-toc, .mj-menu) summary {
  min-height: 44px;
  min-width: 44px;
  box-sizing: border-box;
  align-items: center;
}
/* Preserve the existing responsive visibility rules of secondary header links. */
body.mj-site :is(.final-toc, .ref-toc, .v8-toc, .visit-toc, .section-nav, .ref-breadcrumb) a,
body.mj-site a.mj-breadcrumb,
body.mj-site .mj-footer a,
body.mj-site .mj-navigation .mj-menu-all {
  display: inline-flex;
}
body.mj-site .mj-footer-grid > div > a { display: flex; }
.ux-toc-disclosure > summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  font-weight: 600;
}
.ux-toc-disclosure > summary::before { content: "▸"; margin-inline-end: .5em; }
.ux-toc-disclosure[open] > summary::before { content: "▾"; }
@media (min-width: 901px) {
  body.mj-site .mj-navigation > a { display: inline-flex; }
}
/* Reference pages with text only should not reserve an empty photo column. */
body.mj-site .ref-intro:has(> .ref-intro-copy:only-child) {
  display: block;
  grid-template-columns: none;
}

@media (max-width: 767px) {
  :root { --ux-reading-size: 17px; }
  body.mj-site .mj-header-inner {
    height: 56px !important;
    min-height: 56px !important;
    gap: 12px;
  }
  body.mj-site .mj-header .mj-logo img { max-height: 36px; }
  body.mj-site .mj-footer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px 16px;
  }
  body.mj-site .mj-footer-grid > div:first-child { grid-column: 1 / -1; }
  body.mj-site .mj-footer-grid > div { min-width: 0; }
  body.mj-site .mj-footer-bottom { flex-wrap: wrap; }
  body.mj-site .mj-footer-bottom > div { flex-wrap: wrap; }
}
@media (min-width: 768px) {
  .ux-toc-disclosure > summary { display: none; }
}
