/* ===========================================================
   مجله‌ی ریحانه‌استور — آرشیو (home.php / archive.php)
   و صفحه‌ی تک‌نوشته (single.php)
   همه‌چیز زیر اسکوپ .rey-ui، با همان توکن‌های base.css
   =========================================================== */

/* ---------- عناصر مشترک ---------- */
.rey-ui .mag-wrap { padding-bottom: 64px; }
.rey-ui .mag-wrap .sec-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; gap: 16px; }
.rey-ui .mag-wrap .sec-head .eyebrow { font: 600 11px var(--rey-font); color: var(--muted); letter-spacing: .1em; margin-bottom: 5px; }
.rey-ui .mag-wrap .sec-head h2 { font: 700 22px var(--rey-font); color: var(--navy); margin: 0; }

/* ---------- هدر مجله ---------- */
.rey-ui .mag-head { position: relative; overflow: hidden; border-radius: calc(24px * var(--rey-r)); margin-top: 18px;
  background: linear-gradient(115deg, var(--green-dark), var(--green) 58%, var(--green-light));
  padding: 38px 40px; color: #fff; }
.rey-ui .mag-head::before { content: ""; position: absolute; top: -70px; left: -50px;
  width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.07); }
.rey-ui .mag-head::after { content: ""; position: absolute; bottom: -90px; left: 120px;
  width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.05); }
.rey-ui .mag-head .kicker { display: inline-flex; align-items: center; gap: 8px;
  font: 700 11px var(--rey-font); letter-spacing: .12em; color: var(--green-mint);
  background: rgba(255,255,255,.14); border-radius: 99px; padding: 6px 14px; position: relative; z-index: 1; }
.rey-ui .mag-head h1 { font: 800 30px/1.6 var(--rey-font); margin: 16px 0 0; position: relative; z-index: 1; }
.rey-ui .mag-head p { font: 400 14px/2.1 var(--rey-font); color: var(--green-200); margin: 10px 0 0;
  max-width: 620px; position: relative; z-index: 1; }

/* ---------- چیپ دسته‌ها ---------- */
.rey-ui .mag-cats { display: flex; gap: 9px; margin-top: 22px; overflow-x: auto;
  padding-bottom: 4px; scrollbar-width: none; }
.rey-ui .mag-cats::-webkit-scrollbar { display: none; }
.rey-ui .mag-cats a { flex: 0 0 auto; font: 600 12.5px var(--rey-font); color: var(--text-3);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 99px; padding: 9px 18px; transition: all .2s; white-space: nowrap; }
.rey-ui .mag-cats a:hover { border-color: var(--green-300); color: var(--green); }
.rey-ui .mag-cats a.active { background: var(--green); border-color: var(--green); color: #fff; }

/* ---------- چیدمان دوستونه ---------- */
.rey-ui .mag-layout { display: grid; grid-template-columns: 1fr 300px; gap: 36px; align-items: start; margin-top: 30px; }
.rey-ui .mag-layout > * { min-width: 0; }

/* ---------- نوشته‌ی شاخص ---------- */
.rey-ui .mag-feat { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: calc(22px * var(--rey-r));
  overflow: hidden; margin-bottom: 26px; transition: border-color .25s, box-shadow .25s; }
.rey-ui .mag-feat:hover { border-color: var(--green-300); box-shadow: 0 16px 36px rgba(0,95,54,.08); }
.rey-ui .mag-feat > * { min-width: 0; }
.rey-ui .mag-feat .ph { display: block; position: relative; aspect-ratio: 16 / 10; background: var(--gray-1); overflow: hidden; }
.rey-ui .mag-feat .ph img { width: 100%; height: 100%; object-fit: cover; }
.rey-ui .mag-feat .txt { padding: 28px 30px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.rey-ui .mag-feat .txt .mag-meta { margin-top: 16px; }
.rey-ui .mag-feat .txt h3 { font: 800 20px/1.8 var(--rey-font); color: var(--navy); margin: 12px 0 0; }
.rey-ui .mag-feat .txt p { font: 400 13px/2.1 var(--rey-font); color: var(--text-3); margin: 10px 0 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* پلیس‌هولدر وقتی تصویر شاخص ندارد */
.rey-ui .ph-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #c9d3cd; background: repeating-linear-gradient(45deg, #f2f4f6, #f2f4f6 8px, #f7f8fa 8px, #f7f8fa 16px); }
.rey-ui .mini-post .ph-empty { position: static; width: 100%; height: 100%; }

/* ---------- گرید نوشته‌ها ---------- */
.rey-ui .mag-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.rey-ui .mag-list--3 { grid-template-columns: repeat(3, 1fr); }
.rey-ui .mag-list > * { min-width: 0; }
.rey-ui .mag-post { display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: calc(18px * var(--rey-r)); overflow: hidden;
  transition: transform .25s, border-color .25s, box-shadow .25s; }
.rey-ui .mag-post:hover { transform: translateY(-3px); border-color: var(--green-300); box-shadow: 0 14px 30px rgba(18,48,63,.09); }
.rey-ui .mag-post .ph { display: block; position: relative; aspect-ratio: 16 / 10; background: var(--gray-1); overflow: hidden; }
.rey-ui .mag-post .ph img { width: 100%; height: 100%; object-fit: cover; }
.rey-ui .mag-post .body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.rey-ui .mag-post h3 { font: 700 15px/1.85 var(--rey-font); color: var(--navy); margin: 10px 0 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rey-ui .mag-post p { font: 400 12.5px/2 var(--rey-font); color: var(--text-3); margin: 9px 0 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rey-ui .mag-post .mag-meta { margin-top: auto; padding-top: 14px; }

/* برچسب دسته روی تصویر */
.rey-ui .mag-chip { display: inline-flex; align-items: center; gap: 6px;
  font: 700 11px var(--rey-font); color: var(--green);
  background: var(--green-100); border-radius: 99px; padding: 5px 13px; }
.rey-ui .mag-chip.on-img { position: absolute; top: 12px; inset-inline-end: 12px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(4px); }

/* متادیتا (تاریخ / زمان مطالعه) */
.rey-ui .mag-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font: 400 11.5px var(--rey-font); color: var(--muted); }
.rey-ui .mag-meta span { display: inline-flex; align-items: center; gap: 5px; }
.rey-ui .mag-meta svg { width: 14px; height: 14px; flex: 0 0 14px; }

/* ---------- حالت خالی ---------- */
.rey-ui .mag-empty { background: var(--surface); border: 1px dashed var(--border);
  border-radius: calc(20px * var(--rey-r)); padding: 54px 24px; text-align: center; }
.rey-ui .mag-empty b { display: block; font: 800 17px var(--rey-font); color: var(--navy); }
.rey-ui .mag-empty p { font: 400 13px/2.1 var(--rey-font); color: var(--text-3); margin: 8px 0 18px; }

/* ---------- صفحه‌بندی ---------- */
.rey-ui .mag-pager { display: flex; justify-content: center; gap: 7px; margin-top: 34px; flex-wrap: wrap; }
.rey-ui .mag-pager .page-numbers { min-width: 40px; height: 40px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font: 700 13px var(--rey-font); color: var(--text-3);
  background: var(--surface); border: 1px solid var(--border); border-radius: calc(12px * var(--rey-r)); transition: all .2s; }
.rey-ui .mag-pager .page-numbers:hover { border-color: var(--green-300); color: var(--green); }
.rey-ui .mag-pager .page-numbers.current { background: var(--green); border-color: var(--green); color: #fff; }
.rey-ui .mag-pager .page-numbers.dots { border-color: transparent; background: none; }

/* ---------- سایدبار ---------- */
.rey-ui .mag-side { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 18px; }
.rey-ui .mag-card2 { background: var(--surface); border: 1px solid var(--border); border-radius: calc(18px * var(--rey-r)); padding: 20px; }
.rey-ui .mag-card2 > .head { display: flex; align-items: center; gap: 9px;
  font: 700 14px var(--rey-font); color: var(--navy); margin-bottom: 14px; }
.rey-ui .mag-card2 > .head svg { width: 17px; height: 17px; color: var(--green); }
.rey-ui .mini-post { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-2); }
.rey-ui .mini-post:last-child { border-bottom: none; padding-bottom: 0; }
.rey-ui .mini-post:first-child { padding-top: 0; }
.rey-ui .mini-post > span:last-child { min-width: 0; flex: 1; }
.rey-ui .mini-post .ph { position: relative; display: block; flex: 0 0 62px; width: 62px; height: 62px; border-radius: calc(12px * var(--rey-r));
  overflow: hidden; background: var(--gray-1); }
.rey-ui .mini-post .ph img { width: 100%; height: 100%; object-fit: cover; }
.rey-ui .mini-post b { font: 600 12.5px/1.8 var(--rey-font); color: var(--navy); display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rey-ui .mini-post span { font: 400 11px var(--rey-font); color: var(--muted); display: block; margin-top: 5px; }
.rey-ui .mini-post .rank { flex: 0 0 24px; width: 24px; height: 24px; border-radius: calc(8px * var(--rey-r));
  background: var(--green-100); color: var(--green); font: 800 12px var(--rey-font);
  display: flex; align-items: center; justify-content: center; margin-top: 2px; }

.rey-ui .cat-list { display: flex; flex-direction: column; }
.rey-ui .cat-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font: 500 13px var(--rey-font); color: var(--text-3);
  padding: 10px 12px; border-radius: calc(10px * var(--rey-r)); transition: all .2s; }
.rey-ui .cat-list a:hover { background: var(--green-050); color: var(--green); }
.rey-ui .cat-list a i { font-style: normal; font: 600 11px var(--rey-font); color: var(--muted);
  background: var(--gray-1); border-radius: 99px; padding: 2px 9px; }

.rey-ui .mag-card2.cta { background: var(--navy); border: none; }
.rey-ui .mag-card2.cta .head { color: #fff; }
.rey-ui .mag-card2.cta p { font: 400 12px/2.1 var(--rey-font); color: #9fb3bd; margin: 0 0 14px; }
.rey-ui .mag-card2.cta a { display: block; text-align: center; background: var(--green); color: #fff;
  font: 700 13px var(--rey-font); padding: 11px; border-radius: calc(10px * var(--rey-r)); }

/* ===========================================================
   تک‌نوشته (single.php)
   =========================================================== */

/* نوار پیشرفت مطالعه */
.rey-ui .read-bar { position: fixed; top: 0; inset-inline-start: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--green), var(--green-light)); z-index: 999; transition: width .1s linear; }

.rey-ui .post-hero { padding-top: 22px; }
.rey-ui .post-hero h1 { font: 800 30px/1.75 var(--rey-font); color: var(--navy); margin: 16px 0 0; max-width: 760px; }
.rey-ui .post-hero .lead { font: 400 14.5px/2.2 var(--rey-font); color: var(--text-3); margin: 14px 0 0; max-width: 720px; }
.rey-ui .post-hero .mag-meta { margin-top: 18px; }
.rey-ui .post-cover { margin-top: 24px; border-radius: calc(22px * var(--rey-r)); overflow: hidden;
  aspect-ratio: 16 / 7; background: var(--gray-1); }
.rey-ui .post-cover img { width: 100%; height: 100%; object-fit: cover; }

/* بدنه‌ی نوشته */
.rey-ui .post-body { margin-top: 30px; font: 400 15px/2.35 var(--rey-font); color: var(--text-2); }
.rey-ui .post-body > *:first-child { margin-top: 0; }
.rey-ui .post-body p { margin: 0 0 20px; }
.rey-ui .post-body a { color: var(--green); border-bottom: 1px dashed var(--green-300); }
.rey-ui .post-body h2 { font: 800 21px var(--rey-font); color: var(--navy);
  margin: 44px 0 18px; display: flex; align-items: center; gap: 12px; scroll-margin-top: 90px; }
.rey-ui .post-body h2::before { content: ""; width: 10px; height: 10px; border-radius: 3px;
  background: var(--green); transform: rotate(45deg); flex: 0 0 auto; }
.rey-ui .post-body h3 { font: 700 17px var(--rey-font); color: var(--navy); margin: 32px 0 14px; scroll-margin-top: 90px; }
.rey-ui .post-body h4 { font: 700 15px var(--rey-font); color: var(--navy); margin: 26px 0 12px; }
.rey-ui .post-body ul, .rey-ui .post-body ol { margin: 0 0 20px; padding-inline-start: 22px; }
.rey-ui .post-body li { margin-bottom: 9px; }
.rey-ui .post-body ul { list-style: none; padding-inline-start: 4px; }
.rey-ui .post-body ul > li { position: relative; padding-inline-start: 20px; }
.rey-ui .post-body ul > li::before { content: ""; position: absolute; top: 13px; inset-inline-start: 4px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.rey-ui .post-body img { border-radius: calc(16px * var(--rey-r)); margin: 8px 0; height: auto; }
.rey-ui .post-body figure { margin: 26px 0; }
.rey-ui .post-body figcaption { font: 400 12px var(--rey-font); color: var(--muted); text-align: center; margin-top: 9px; }
.rey-ui .post-body blockquote { border: 1px solid var(--border); border-inline-start: 4px solid var(--green);
  background: var(--surface); border-radius: calc(14px * var(--rey-r)); margin: 26px 0; padding: 18px 22px;
  font: 400 14px/2.2 var(--rey-font); color: var(--text-2); }
.rey-ui .post-body blockquote p:last-child { margin-bottom: 0; }
.rey-ui .post-body code { font: 500 13px ui-monospace, Menlo, monospace; background: var(--gray-1);
  border-radius: calc(6px * var(--rey-r)); padding: 2px 7px; direction: ltr; display: inline-block; }
.rey-ui .post-body pre { background: var(--navy); color: #d7e4ea; border-radius: calc(14px * var(--rey-r));
  padding: 18px; overflow-x: auto; direction: ltr; text-align: left; margin: 0 0 20px; }
.rey-ui .post-body pre code { background: none; color: inherit; padding: 0; }
.rey-ui .post-body table { width: 100%; border-collapse: separate; border-spacing: 0;
  border: 1px solid var(--border); border-radius: calc(14px * var(--rey-r)); overflow: hidden; margin: 0 0 22px; font-size: 13.5px; }
.rey-ui .post-body th { background: var(--gray-1); color: var(--navy); font-weight: 700; padding: 12px 14px; text-align: start; }
.rey-ui .post-body td { padding: 12px 14px; border-top: 1px solid var(--border); }
.rey-ui .post-body hr { border: none; border-top: 1px dashed var(--border); margin: 32px 0; }
.rey-ui .post-table-scroll { overflow-x: auto; }

/* برچسب‌ها */
.rey-ui .post-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 34px; }
.rey-ui .post-tags .lbl { font: 700 12.5px var(--rey-font); color: var(--navy); }
.rey-ui .post-tags a { font: 500 12px var(--rey-font); color: var(--text-3);
  background: var(--surface); border: 1px solid var(--border); border-radius: 99px;
  padding: 7px 15px; transition: all .2s; }
.rey-ui .post-tags a:hover { border-color: var(--green-300); color: var(--green); }

/* اشتراک‌گذاری */
.rey-ui .post-share { display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  margin-top: 22px; padding-top: 20px; border-top: 1px dashed var(--border); }
.rey-ui .post-share .lbl { font: 700 12.5px var(--rey-font); color: var(--navy); margin-inline-end: 4px; }
.rey-ui .post-share a, .rey-ui .post-share button { width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--border); border-radius: calc(12px * var(--rey-r)); background: var(--surface); color: var(--text-3);
  display: inline-flex; align-items: center; justify-content: center; transition: all .2s; }
.rey-ui .post-share a:hover, .rey-ui .post-share button:hover { border-color: var(--green); color: var(--green); background: var(--green-050); }
.rey-ui .post-share svg { width: 17px; height: 17px; }
.rey-ui .post-share .copied { border-color: var(--green); background: var(--green-100); color: var(--green); }

/* نویسنده */
.rey-ui .post-author { display: flex; align-items: center; gap: 16px; margin-top: 30px;
  background: var(--surface); border: 1px solid var(--border); border-radius: calc(18px * var(--rey-r)); padding: 20px; }
.rey-ui .post-author img { width: 56px; height: 56px; border-radius: 50%; flex: 0 0 56px; }
.rey-ui .post-author b { font: 700 14px var(--rey-font); color: var(--navy); display: block; }
.rey-ui .post-author span { font: 400 12px/1.9 var(--rey-font); color: var(--text-3); display: block; margin-top: 4px; }

/* نوشته‌ی قبلی/بعدی */
.rey-ui .post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 26px; }
.rey-ui .post-nav > * { min-width: 0; }
.rey-ui .post-nav a { background: var(--surface); border: 1px solid var(--border); border-radius: calc(16px * var(--rey-r));
  padding: 16px 18px; transition: border-color .2s; display: block; }
.rey-ui .post-nav a:hover { border-color: var(--green-300); }
.rey-ui .post-nav .dir { display: flex; align-items: center; gap: 6px;
  font: 600 11.5px var(--rey-font); color: var(--green); margin-bottom: 8px; }
.rey-ui .post-nav .dir svg { width: 14px; height: 14px; }
.rey-ui .post-nav b { font: 600 13px/1.8 var(--rey-font); color: var(--navy); display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rey-ui .post-nav a.next { text-align: end; }
.rey-ui .post-nav a.next .dir { justify-content: flex-end; }

/* فهرست مطالب */
.rey-ui .toc { max-height: 60vh; overflow-y: auto; }
.rey-ui .toc a { display: block; font: 500 12.5px/1.8 var(--rey-font); color: var(--text-3);
  padding: 8px 12px; border-radius: calc(9px * var(--rey-r)); border-inline-start: 2px solid transparent; transition: all .2s; }
.rey-ui .toc a.lvl-3 { padding-inline-start: 26px; font-size: 12px; }
.rey-ui .toc a:hover { color: var(--green); background: var(--green-050); }
.rey-ui .toc a.active { color: var(--green); background: var(--green-100); border-inline-start-color: var(--green); font-weight: 700; }

/* نوشته‌های مرتبط */
.rey-ui .post-related { margin-top: 48px; }

/* ---------- دیدگاه‌ها ---------- */
.rey-ui .rey-comments { margin-top: 48px; }
.rey-ui .rey-comments .head2 { font: 800 18px var(--rey-font); color: var(--navy); margin: 0 0 18px;
  display: flex; align-items: center; gap: 10px; }
.rey-ui .rey-comments .head2 svg { width: 19px; height: 19px; color: var(--green); }
.rey-ui .comment-list { list-style: none; margin: 0; padding: 0; }
.rey-ui .comment-list ul.children { list-style: none; margin: 12px 0 0; padding-inline-start: 28px; }
.rey-ui .comment-list .comment-body { background: var(--surface); border: 1px solid var(--border);
  border-radius: calc(16px * var(--rey-r)); padding: 18px 20px; margin-bottom: 12px; }
.rey-ui .comment-list .comment-meta2 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rey-ui .comment-list .comment-meta2 img { width: 38px; height: 38px; border-radius: 50%; }
.rey-ui .comment-list .comment-meta2 b { font: 700 13px var(--rey-font); color: var(--navy); display: block; }
.rey-ui .comment-list .comment-meta2 span { font: 400 11px var(--rey-font); color: var(--muted); }
.rey-ui .comment-list .comment-text { font: 400 13.5px/2.15 var(--rey-font); color: var(--text-2); }
.rey-ui .comment-list .comment-text p { margin: 0 0 10px; }
.rey-ui .comment-list .comment-text p:last-child { margin-bottom: 0; }
.rey-ui .comment-list .reply { margin-top: 10px; }
.rey-ui .comment-list .reply a { font: 600 12px var(--rey-font); color: var(--green); }
.rey-ui .comment-respond { background: var(--surface); border: 1px solid var(--border);
  border-radius: calc(18px * var(--rey-r)); padding: 22px 24px; margin-top: 20px; }
.rey-ui .comment-respond .comment-reply-title { font: 800 16px var(--rey-font); color: var(--navy); margin: 0 0 6px; }
.rey-ui .comment-respond .comment-notes,
.rey-ui .comment-respond .logged-in-as { font: 400 12px/1.9 var(--rey-font); color: var(--muted); margin: 0 0 16px; }
.rey-ui .comment-respond label { display: block; font: 600 12.5px var(--rey-font); color: var(--navy); margin-bottom: 7px; }
.rey-ui .comment-respond input[type=text],
.rey-ui .comment-respond input[type=email],
.rey-ui .comment-respond input[type=url],
.rey-ui .comment-respond textarea { width: 100%; font: 400 13px var(--rey-font); color: var(--text);
  background: #fff; border: 1px solid var(--border); border-radius: calc(12px * var(--rey-r)); padding: 12px 14px;
  transition: border-color .2s, box-shadow .2s; }
.rey-ui .comment-respond textarea { min-height: 130px; resize: vertical; line-height: 2; }
.rey-ui .comment-respond input:focus, .rey-ui .comment-respond textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,95,54,.12); }
.rey-ui .comment-respond .comment-form-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.rey-ui .comment-respond .comment-form-fields > p { margin: 0; }
.rey-ui .comment-respond .comment-form-cookies-consent { display: flex; align-items: center; gap: 8px;
  font: 400 12px var(--rey-font); color: var(--text-3); margin: 12px 0 0; }
.rey-ui .comment-respond .comment-form-cookies-consent label { display: inline; margin: 0; font-weight: 400; color: inherit; }
.rey-ui .comment-respond .form-submit { margin: 16px 0 0; }
.rey-ui .comment-respond .submit { background: var(--green); color: #fff; border: none;
  font: 700 13px var(--rey-font); padding: 12px 30px; border-radius: 99px; cursor: pointer; transition: background .2s; }
.rey-ui .comment-respond .submit:hover { background: var(--green-dark); }

/* ---------- ریسپانسیو ---------- */
@media (max-width: 1024px) {
  .rey-ui .mag-layout { grid-template-columns: 1fr 260px; gap: 24px; }
  .rey-ui .mag-feat { grid-template-columns: 1fr; }
  .rey-ui .mag-feat .ph { aspect-ratio: 16 / 8; }
}
@media (max-width: 860px) {
  .rey-ui .mag-head { padding: 26px 20px; border-radius: calc(18px * var(--rey-r)); margin-top: 12px; }
  .rey-ui .mag-head h1 { font-size: 21px; }
  .rey-ui .mag-head p { font-size: 13px; }
  .rey-ui .mag-layout { grid-template-columns: 1fr; gap: 26px; margin-top: 22px; }
  .rey-ui .mag-side { position: static; }
  .rey-ui .mag-list { grid-template-columns: 1fr 1fr; gap: 12px; }
  .rey-ui .mag-post h3 { font-size: 13px; }
  .rey-ui .mag-post p { display: none; }
  .rey-ui .mag-post .body { padding: 12px 13px 14px; }
  .rey-ui .mag-feat .txt { padding: 18px 18px 22px; }
  .rey-ui .mag-feat .txt h3 { font-size: 16px; }
  .rey-ui .post-hero h1 { font-size: 20px; }
  .rey-ui .post-hero .lead { font-size: 13px; }
  .rey-ui .post-cover { aspect-ratio: 16 / 9; border-radius: calc(16px * var(--rey-r)); }
  .rey-ui .post-body { font-size: 14px; line-height: 2.25; margin-top: 22px; }
  .rey-ui .post-body h2 { font-size: 17px; margin: 32px 0 14px; }
  .rey-ui .post-body h3 { font-size: 15px; }
  .rey-ui .post-nav { grid-template-columns: 1fr; }
  .rey-ui .comment-respond { padding: 16px; }
  .rey-ui .comment-respond .comment-form-fields { grid-template-columns: 1fr; }
  .rey-ui .comment-list ul.children { padding-inline-start: 14px; }
}
@media (max-width: 520px) {
  .rey-ui .mag-list { grid-template-columns: 1fr; }
  .rey-ui .mag-post p { display: -webkit-box; }
}

/* ===========================================================
   صفحه‌ی نتایج جستجو
   =========================================================== */
.rey-ui .rey-search .mag-head { margin-bottom: 8px; }
.rey-ui .rey-search-sec { margin-top: 32px; }
.rey-ui .rey-search-sec .sec-head { margin-bottom: 16px; }
.rey-ui .rey-search-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.rey-ui .rey-search-grid > * { min-width: 0; }
.rey-ui .rey-search-grid .pcard { border: 1px solid var(--border); height: 100%; }
.rey-ui .rey-search-grid .pcard:hover { border-color: var(--green-300); }
.rey-ui .rey-search-pops { display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px; margin: 0 0 20px; font: 400 12px var(--rey-font); color: var(--muted); }
.rey-ui .rey-search-pops a { font-weight: 500; color: var(--text-3);
  background: var(--gray-1); border-radius: 99px; padding: 5px 14px; transition: all .2s; }
.rey-ui .rey-search-pops a:hover { background: var(--green-100); color: var(--green); }

@media (max-width: 1024px) { .rey-ui .rey-search-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px)  { .rey-ui .rey-search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
