/* ==========================================================================
   Impreza Ipakchi — zenhabits-style minimal Persian reading layer.
   Impreza has header_none → we inject .ipk-head/.ipk-foot ourselves (below).
   ========================================================================== */
/* Self-hosted Vazirmatn — Google Fonts is blocked/unreliable in Iran + a privacy/render cost. */
@font-face { font-family: 'Vazirmatn'; font-weight: 400; font-display: swap; src: url('fonts/vazirmatn-400.woff2') format('woff2'); }
@font-face { font-family: 'Vazirmatn'; font-weight: 500; font-display: swap; src: url('fonts/vazirmatn-500.woff2') format('woff2'); }
@font-face { font-family: 'Vazirmatn'; font-weight: 700; font-display: swap; src: url('fonts/vazirmatn-700.woff2') format('woff2'); }
@font-face { font-family: 'Vazirmatn'; font-weight: 800; font-display: swap; src: url('fonts/vazirmatn-800.woff2') format('woff2'); }

:root {
  --ink: #1c1b19; --ink-2: #3d3a36; --ink-soft: #7a756d;
  --paper: #fbfaf7; --paper-2: #f4f2ec; --rule: #e7e3da;
  --accent: #b8402f; --accent-tint: #f6e9e4; --secondary: #3f6f6a; --measure: 44rem;
}

/* --- typography + paper --- */
html { font-size: 18px; }
body, .l-body { background: var(--paper) !important; color: var(--ink) !important;
  font-family: 'Vazirmatn', Tahoma, sans-serif !important; line-height: 2 !important; direction: rtl; -webkit-font-smoothing: antialiased; }
p, li { font-size: 1.05rem; }
h1,h2,h3,h4,.w-post-elm.post_title,.entry-title { font-family:'Vazirmatn',Tahoma,sans-serif !important; font-weight:700 !important; line-height:1.6 !important; color:var(--ink) !important; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }

/* --- our injected header + footer --- */
.ipk-head { border-bottom: 1px solid var(--rule); background: var(--paper); }
.ipk-foot { border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: .85rem; margin-top: 3rem; }
.ipk-head-in { max-width: var(--measure); margin-inline: auto; padding: 1.5rem 1.25rem;
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.ipk-foot .ipk-head-in { padding-block: 1.4rem; justify-content: center; }
.ipk-brand { font-weight: 700; font-size: 1.4rem; color: var(--ink) !important; }
.ipk-nav a { color: var(--ink-soft) !important; margin-inline-start: 1.2rem; font-size: .98rem; }
.ipk-nav a:hover { color: var(--ink) !important; text-decoration: none; }

/* --- constrain the content column to a readable measure --- */
.l-main .l-section-h { max-width: var(--measure) !important; margin-inline: auto !important; }
.l-content { box-shadow: none !important; background: transparent !important; }

/* --- blog listing: Impreza renders us_post_list as a CSS-grid; force ONE column --- */
.us_post_list .w-grid-list { display: flex !important; flex-direction: column !important; grid-template-columns: 100% !important; gap: 0 !important; }
.us_post_list .w-grid-item { width: 100% !important; max-width: 100% !important; margin: 0 !important; }
.w-grid-item .w-grid-item-h { border-bottom: 1px solid var(--rule); padding-block: 2.2rem; }
.w-grid-none, .w-grid .w-grid-list-json { display: none !important; }
.w-post-elm.post_title a { font-size: 1.5rem !important; }
.w-post-elm.post_date, time { color: var(--ink-soft) !important; font-size: .85rem !important; }
/* keep any stray excerpt/content in the list inside the reading measure */
body:not(.single) .w-post-elm.post_content, body:not(.single) .entry-summary { max-width: var(--measure); margin-inline: auto; }

/* --- single post --- */
.single .entry-title, .single .w-post-elm.post_title { font-size: 2rem !important; margin-bottom: .4rem !important; }
.entry-content { font-size: 1.06rem; }
.entry-content p { margin-block: 1.15rem !important; }
.entry-content h2 { margin-top: 2.2rem !important; }
.entry-content img { max-width: 100%; height: auto; border-radius: 6px; }
blockquote { border-inline-start: 3px solid var(--accent); padding-inline-start: 1rem; color: var(--ink-soft); font-style: normal; }

/* --- hide clutter --- */
.l-sidebar, .w-sharing, .w-author, .post-related, .breadcrumbs,
.post_navigation, .w-comments, #comments, .l-preloader, .g-preloader { display: none !important; }

/* injected single-post title + date */
.ipk-title { font-size: 2rem !important; font-weight: 800 !important; line-height: 1.45 !important; letter-spacing: -.015em; margin: .5rem 0 .3rem !important; color: var(--ink) !important; }
.ipk-date { color: var(--ink-soft); font-size: .82rem; margin-bottom: 1.6rem; }
/* clean blog index (home.php) */
.ipk-home { max-width: var(--measure); margin-inline: auto; padding-block: 1rem; }
.ipk-list { list-style: none; margin: 0; padding: 0; }
.ipk-list li { border-bottom: 1px solid var(--rule); padding-block: 2.1rem; }
.ipk-list h2 { font-size: 1.55rem; font-weight: 800 !important; margin: 0 0 .35rem; letter-spacing: -.01em; }
.ipk-list h2 a { color: var(--ink) !important; }
.ipk-list h2 a:hover { color: var(--accent) !important; text-decoration: none; }
.ipk-list .ipk-date { font-size: .8rem; margin-bottom: 0; }
.ipk-excerpt { color: var(--ink-2); margin-top: .5rem; }
.ipk-pager { display: flex; gap: 1.2rem; justify-content: center; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.ipk-pager a, .ipk-pager .current { font-size: .95rem; color: var(--ink-soft); }
.ipk-pager .current { color: var(--ink); font-weight: 700; }
/* keep any stray full-bleed lede inside the reading column */
.l-main > .l-section > .l-section-h > p:first-child { max-width: var(--measure); margin-inline: auto; }

/* palette + type polish */
a { transition: color .18s ease; }
.ipk-brand { transition: color .18s ease; }
.ipk-brand:hover { color: var(--accent) !important; text-decoration: none; }
.ipk-brand, .single .entry-title, .single .w-post-elm.post_title,
.w-post-elm.post_title a, .post-list h2 { font-weight: 800 !important; letter-spacing: -.01em; }
.entry-content blockquote, blockquote { border-inline-start: 3px solid var(--accent) !important;
  background: var(--accent-tint) !important; padding: .3rem 1rem !important; border-radius: 0 8px 8px 0 !important; color: var(--ink-2) !important; }
::selection { background: var(--accent-tint); }
.ipk-foot .ipk-head-in { flex-direction: column; gap: .7rem; }
.ipk-socials { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.ipk-socials a { color: var(--ink-soft) !important; font-size: .85rem; transition: color .18s ease; }
.ipk-socials a:hover { color: var(--accent) !important; text-decoration: none; }

@media (max-width: 600px) { html { font-size: 17px; } .ipk-head-in { padding-inline: 1rem; } }
