/* بفرما — قالب خبر روزنامه‌ای / اینفوگرافیک (news-paper) */
.np-page {
  --np-bg: #f3ecd9;
  --np-paper: #f7f1e3;
  --np-ink: #1f2430;
  --np-muted: #5c6470;
  --np-line: #d9cfb8;
  --np-blue: #3d6fd8;
  --np-purple: #6b5bb8;
  --np-yellow: #ffe56a;
  --np-green: #2f9a6a;
  --np-card: #fffdf8;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 229, 106, .18), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(61, 111, 216, .08), transparent 26%),
    linear-gradient(180deg, #efe6d2, var(--np-bg) 40%, #ebe2cd);
  color: var(--np-ink);
  font-family: "Gandom", "Vazirmatn", Tahoma, sans-serif;
}

.np-wrap {
  width: min(1080px, calc(100% - 24px));
  margin: 18px auto 48px;
}

.np-sheet {
  position: relative;
  background: var(--np-paper);
  border: 1px solid #e4dac4;
  border-radius: 18px;
  box-shadow:
    0 18px 40px rgba(40, 30, 10, .12),
    0 2px 0 rgba(255, 255, 255, .65) inset;
  overflow: hidden;
}

.np-spiral {
  position: absolute;
  inset: 0 auto 0 0;
  width: 28px;
  background:
    repeating-linear-gradient(
      180deg,
      transparent 0 18px,
      #4a5160 18px 22px,
      transparent 22px 40px
    );
  opacity: .55;
  pointer-events: none;
}

.np-inner {
  padding: 22px 18px 28px 36px;
}

@media (min-width: 900px) {
  .np-inner { padding: 28px 28px 36px 48px; }
}

.np-kicker {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: var(--np-purple);
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
  padding: .35rem .7rem;
  border-radius: 999px;
  box-shadow: 0 6px 0 rgba(60, 48, 120, .25);
}

.np-hero {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 1.25rem;
}

@media (min-width: 900px) {
  .np-hero {
    grid-template-columns: 1.35fr .85fr;
    align-items: start;
  }
}

.np-title {
  margin: .55rem 0 .4rem;
  font-size: clamp(1.45rem, 3.4vw, 2.15rem);
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -.02em;
}

.np-title em {
  font-style: normal;
  background: linear-gradient(transparent 62%, var(--np-yellow) 62%);
  padding: 0 .1em;
}

.np-lede {
  margin: 0;
  color: var(--np-muted);
  font-size: 1.02rem;
  line-height: 1.85;
  background: #fff8e8;
  border: 1.5px dashed #e2c86a;
  border-radius: 14px;
  padding: .85rem 1rem;
}

.np-facts {
  background: #fff;
  border: 2px solid #eadfca;
  border-radius: 16px;
  padding: .9rem 1rem 1rem;
  box-shadow: 0 10px 0 rgba(0, 0, 0, .04);
  position: relative;
}

.np-facts::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 18px;
  width: 54px;
  height: 18px;
  background: repeating-linear-gradient(90deg, #f7c9de 0 8px, #fde8f1 8px 16px);
  border-radius: 2px;
  transform: rotate(-4deg);
}

.np-facts h3 {
  margin: .2rem 0 .7rem;
  font-size: 1rem;
  color: var(--np-purple);
}

.np-facts ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .55rem;
}

.np-facts li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: .55rem;
  align-items: start;
  font-size: .92rem;
  line-height: 1.55;
}

.np-facts li b {
  color: var(--np-blue);
}

.np-facts .ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #eef3ff;
  font-size: .95rem;
}

.np-grid {
  display: grid;
  gap: .9rem;
}

@media (min-width: 900px) {
  .np-grid {
    grid-template-columns: 1fr 1fr;
  }
  .np-block.wide { grid-column: 1 / -1; }
}

.np-block {
  background: var(--np-card);
  border: 1.5px solid var(--np-line);
  border-radius: 16px;
  padding: 1rem 1rem 1.05rem;
  position: relative;
  box-shadow: 0 8px 0 rgba(0, 0, 0, .03);
  overflow: visible;
}

.np-sticker {
  position: absolute;
  top: -14px;
  left: 12px;
  width: 40px;
  height: 40px;
  object-fit: contain;
  transform: rotate(-8deg);
  filter: drop-shadow(0 4px 0 rgba(0,0,0,.08));
  pointer-events: none;
  z-index: 2;
}

.np-list {
  margin: .7rem 0 0;
  padding: 0 1.1rem 0 0;
  color: var(--np-muted);
  font-size: .9rem;
  line-height: 1.75;
}

.np-clip {
  position: absolute;
  top: 14px;
  left: 18px;
  width: 38px;
  opacity: .9;
  pointer-events: none;
  z-index: 3;
}

.np-num {
  display: inline-grid;
  place-items: center;
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 .35rem;
  border-radius: 999px;
  background: var(--np-blue);
  color: #fff;
  font-weight: 800;
  font-size: .85rem;
  margin-left: .45rem;
  vertical-align: middle;
}

.np-block h2 {
  display: inline;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.6;
}

.np-block p {
  margin: .65rem 0 0;
  color: var(--np-muted);
  line-height: 1.8;
  font-size: .95rem;
}

.np-shot {
  margin: .8rem 0 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5dbc5;
  background: #fff;
}

.np-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.np-shot figcaption {
  font-size: .78rem;
  color: var(--np-muted);
  padding: .4rem .65rem .55rem;
  background: #faf6ec;
}

.np-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .75rem;
}

.np-pill {
  background: #eef3ff;
  color: #2c4ea8;
  border: 1px solid #d5e0fb;
  border-radius: 999px;
  padding: .28rem .65rem;
  font-size: .8rem;
  font-weight: 700;
}

.np-flow {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  margin-top: .75rem;
}

.np-flow span {
  background: #fff;
  border: 1.5px solid #d9cfb8;
  border-radius: 10px;
  padding: .35rem .55rem;
  font-size: .8rem;
  font-weight: 700;
}

.np-flow i {
  color: var(--np-blue);
  font-style: normal;
  font-weight: 800;
}

.np-bars {
  margin-top: .85rem;
  display: grid;
  gap: .55rem;
}

.np-bar {
  display: grid;
  grid-template-columns: 110px 1fr 42px;
  gap: .5rem;
  align-items: center;
  font-size: .82rem;
}

.np-bar .track {
  height: 14px;
  background: #efe8d8;
  border-radius: 999px;
  overflow: hidden;
}

.np-bar .fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4d7be0, #6f8ff0);
}

.np-bar .fill.is-top {
  background: linear-gradient(90deg, #2f9a6a, #4ec48c);
}

.np-bar b { text-align: left; direction: ltr; }

.np-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
  margin-top: .75rem;
}

.np-compare div {
  background: #f7f2e7;
  border-radius: 12px;
  padding: .65rem;
  text-align: center;
  font-size: .8rem;
  border: 1px dashed #d9cfb8;
}

.np-compare strong {
  display: block;
  margin-bottom: .35rem;
  font-size: .84rem;
}

.np-sticky {
  display: inline-block;
  margin-top: .7rem;
  background: var(--np-yellow);
  color: #3a3418;
  font-size: .82rem;
  font-weight: 700;
  padding: .45rem .65rem;
  border-radius: 8px;
  transform: rotate(-1.5deg);
  box-shadow: 0 6px 0 rgba(0, 0, 0, .06);
}

.np-term {
  margin-top: .7rem;
  background: #1e2430;
  color: #d7e0f0;
  border-radius: 12px;
  padding: .7rem .85rem;
  font-family: ui-monospace, Consolas, monospace;
  font-size: .8rem;
  direction: ltr;
  text-align: left;
  line-height: 1.55;
}

.np-eq {
  margin-top: .75rem;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.np-eq span {
  background: #fff;
  border: 2px solid #d9cfb8;
  border-radius: 12px;
  padding: .45rem .7rem;
}

.np-footer {
  margin-top: 1.1rem;
  padding: 1rem;
  border-radius: 14px;
  background: linear-gradient(90deg, #fff4c2, #eaf1ff);
  border: 1.5px solid #e2d6b4;
  text-align: center;
}

.np-footer strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: .35rem;
}

.np-footer p {
  margin: 0;
  color: var(--np-muted);
  font-size: .92rem;
  line-height: 1.7;
}

.np-clip {
  position: absolute;
  top: 14px;
  left: 18px;
  width: 34px;
  opacity: .85;
  pointer-events: none;
}

.np-deco {
  position: absolute;
  width: 42px;
  opacity: .7;
  pointer-events: none;
}
.np-deco.pen { bottom: 18px; left: 42px; }
.np-deco.mag { bottom: 16px; right: 22px; }

/* هایلایت و خط‌کشی دست‌نویس روی عبارات مهم */
.np-page mark,
.np-page .np-hl,
.np-page .np-hl-y {
  background: linear-gradient(transparent 42%, rgba(255, 229, 106, .92) 42%, rgba(255, 229, 106, .92) 92%, transparent 92%);
  color: inherit;
  padding: 0 .12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.np-page .np-hl-g {
  background: linear-gradient(transparent 42%, rgba(167, 232, 196, .9) 42%, rgba(167, 232, 196, .9) 92%, transparent 92%);
  color: inherit;
  padding: 0 .12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.np-page .np-hl-b {
  background: linear-gradient(transparent 42%, rgba(186, 214, 255, .92) 42%, rgba(186, 214, 255, .92) 92%, transparent 92%);
  color: inherit;
  padding: 0 .12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.np-page .np-hl-p {
  background: linear-gradient(transparent 42%, rgba(255, 206, 180, .9) 42%, rgba(255, 206, 180, .9) 92%, transparent 92%);
  color: inherit;
  padding: 0 .12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.np-page .np-hl-l {
  background: linear-gradient(transparent 42%, rgba(220, 208, 255, .9) 42%, rgba(220, 208, 255, .9) 92%, transparent 92%);
  color: inherit;
  padding: 0 .12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.np-page .np-u,
.np-page .np-uline {
  text-decoration: underline;
  text-decoration-color: #3d6fd8;
  text-decoration-thickness: 2.5px;
  text-underline-offset: 4px;
  text-decoration-skip-ink: none;
}

.np-page .np-uw {
  text-decoration: underline wavy #e45b6a;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  text-decoration-skip-ink: none;
}

.np-page .np-ug {
  text-decoration: underline;
  text-decoration-color: #2f9a6a;
  text-decoration-thickness: 2.5px;
  text-underline-offset: 4px;
  text-decoration-skip-ink: none;
}

.np-page .np-hl-u {
  background: linear-gradient(transparent 42%, rgba(255, 229, 106, .92) 42%, rgba(255, 229, 106, .92) 92%, transparent 92%);
  text-decoration: underline;
  text-decoration-color: #c48a12;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-skip-ink: none;
  color: inherit;
  padding: 0 .12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.np-page .np-title em {
  font-style: normal;
  background: linear-gradient(transparent 48%, rgba(255, 229, 106, .95) 48%, rgba(255, 229, 106, .95) 94%, transparent 94%);
  text-decoration: underline wavy #6b5bb8;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.np-page .np-lede strong,
.np-page .np-block p strong,
.np-page .np-footer strong {
  font-weight: 800;
  color: var(--np-ink);
}

.np-page .np-block p strong.np-hl,
.np-page .np-block p strong.np-hl-y,
.np-page .np-lede strong.np-hl {
  font-weight: 800;
}
