@font-face {
  font-family: "IRANSansWebFaNum";
  src: url("fonts/woff2/IRANSansWeb(FaNum).woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSansWebFaNum";
  src: url("fonts/woff2/IRANSansWeb(FaNum)_Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSansWebFaNum";
  src: url("fonts/woff2/IRANSansWeb(FaNum)_Bold.woff2") format("woff2");
  font-weight: 700 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSansWebFaNum";
  src: url("fonts/woff2/IRANSansWeb(FaNum)_Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: "IRANSansWebFaNum", Tahoma, "Segoe UI", Arial, sans-serif;
}

.chapter-player {
  position: relative;
  display: grid;
  gap: 10px;
  margin: 0 0 30px;
  padding: 16px;
  border: 1px solid rgba(11, 94, 215, .18);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(248,251,255,.82)),
    radial-gradient(circle at top left, rgba(20,184,166,.18), transparent 10rem);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

.chapter-player::before {
  content: "نسخه صوتی فصل";
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(204, 251, 241, .78);
  color: var(--accent-dark, #0f766e);
  font-size: .82rem;
  font-weight: 900;
  line-height: 1;
}

html[lang="fa"] body {
  font-family: "IRANSansWebFaNum", Tahoma, "Segoe UI", Arial, sans-serif;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] p,
html[dir="rtl"] th,
html[dir="rtl"] td {
  text-align: right;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3 {
  letter-spacing: -0.01em;
}

html[dir="rtl"] ul,
html[dir="rtl"] ol {
  padding-right: 0;
  padding-left: 0;
}

html[dir="rtl"] main ul li,
html[dir="rtl"] main ol li {
  padding-right: 44px;
  padding-left: 16px;
}

html[dir="rtl"] main ol.chapter-grid > li.chapter-card,
html[dir="rtl"] .hero-points > li {
  padding: 0;
}

html[dir="rtl"] main ul li::before,
html[dir="rtl"] main ol li::before {
  right: 14px;
  left: auto;
}

html[dir="rtl"] h3 + p,
html[dir="rtl"] .callout,
html[dir="rtl"] .callout-block {
  border-right: 5px solid var(--accent, #14b8a6);
  border-left: 1px solid rgba(11,94,215,.18);
}

.chapter-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(11, 94, 215, .24);
  background: linear-gradient(90deg, rgba(11,94,215,.10), rgba(20,184,166,.12));
  color: var(--primary-dark, #0847a6);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.chapter-back-link::before {
  content: "→";
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
}

.chapter-back-link::after {
  content: none;
}

.chapter-back-link:hover,
.chapter-back-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(11, 94, 215, .42);
  box-shadow: 0 10px 24px rgba(15,23,42,.10);
  outline: none;
}

.chapter-player__audio,
.chapter-card-audio {
  display: block;
  width: 100%;
  accent-color: var(--accent, #14b8a6);
}

.chapter-player__audio {
  min-height: 44px;
  border-radius: 999px;
  filter: drop-shadow(0 8px 18px rgba(15,23,42,.08));
}

.chapter-player__audio::-webkit-media-controls-panel,
.chapter-card-audio::-webkit-media-controls-panel {
  background:
    linear-gradient(90deg, rgba(238,245,255,.98), rgba(240,253,250,.98));
}

.chapter-player--missing {
  color: var(--muted, #64748b);
  font-size: .92rem;
}

.chapter-card.has-audio {
  position: relative;
}

.chapter-card.has-audio > a {
  padding-bottom: 118px;
}

.chapter-card-player {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 4;
  width: calc(100% - 40px);
  padding: 10px 10px 9px;
  border: 1px solid rgba(11,94,215,.14);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,255,.9)),
    radial-gradient(circle at top right, rgba(20,184,166,.16), transparent 8rem);
  box-shadow: 0 12px 26px rgba(15,23,42,.09);
}

.chapter-card-player__label {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 7px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(204, 251, 241, .78);
  color: var(--accent-dark, #0f766e);
  font-size: .76rem;
  font-weight: 900;
  line-height: 1;
}

.chapter-card-audio {
  height: 38px;
  border-radius: 999px;
}

@media (max-width: 620px) {
  .chapter-card.has-audio > a {
    padding-bottom: 128px;
  }
}

@media print {
  .chapter-player,
  .chapter-back-link,
  .chapter-card-player,
  .chapter-card-audio {
    display: none !important;
  }
}
