/* Article-only editorial layout. Homepage, header and footer remain untouched. */
body.single-post .site-main.ph-story-page { margin: 0 0 28px !important; width: 100%; min-width: 0; }
.ph-story-page > .ph-container-wide { width: min(1280px, calc(100% - 32px)); }
.ph-story-page [hidden] { display: none !important; }
.ph-story { --story-font-size: 18px; min-width: 0; color: var(--ph-color-text-primary); }
.ph-story-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 42px; padding-block: 8px; color: var(--ph-color-text-secondary); font-size: 11px; }
.ph-story-breadcrumb a { color: var(--ph-color-text-secondary); }
.ph-story :is(a,button):focus-visible { outline: 2px solid var(--ph-color-news-blue); outline-offset: 3px; box-shadow: none; }
.ph-story-masthead { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 22px; padding: 20px; border: 1px solid var(--ph-color-border); border-top: 3px solid var(--ph-color-news-blue); border-radius: 10px; background: var(--ph-color-surface); align-items: center; }
.ph-story-masthead--text { grid-template-columns: minmax(0,1fr); }
.ph-story-intro { min-width: 0; }
.ph-story-kicker { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--ph-color-text-secondary); font-size: 11px; }
.ph-story-kicker .ph-badge { min-height: 26px; padding: 3px 10px; font-size: 11px; box-shadow: none; }
.ph-story-page .ph-story-title { margin: 10px 0 12px; color: var(--ph-color-text-primary); font-size: clamp(23px,2vw,29px); line-height: 1.65; font-weight: 850; letter-spacing: -.015em; overflow-wrap: anywhere; }
.ph-story-lead { margin: 0; font-size: 15px; line-height: 1.95; color: var(--ph-color-text-secondary); }
.ph-story-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--ph-color-border); font-size: 11px; line-height: 1.9; color: var(--ph-color-text-secondary); }
.ph-story-comments-link { color: var(--ph-color-news-blue); text-decoration: none; }
.ph-story-meta time { white-space: nowrap; }
.ph-story-reading { display: inline-flex; gap: 4px; align-items: center; }
.ph-story-reading svg { width: 14px; height: 14px; }
.ph-story-visual { margin: 0; min-width: 0; }
.ph-story-visual > img { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; border-radius: 7px; background: var(--ph-color-surface-soft); }
.ph-story-visual figcaption { margin-top: 6px; font-size: 11px; line-height: 1.7; color: var(--ph-color-text-secondary); }
.ph-story-layout { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 18px; align-items: start; margin-top: 18px; }
.ph-story-reading-column { min-width: 0; }
.ph-story-paper { border: 1px solid var(--ph-color-border); border-radius: 10px; background: var(--ph-color-surface); overflow: hidden; }
.ph-story-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; padding: 6px 20px; border-bottom: 1px solid var(--ph-color-border); background: var(--ph-color-surface-soft); }
.ph-story-type-tools,.ph-story-share { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ph-story-type-tools > span { color: var(--ph-color-text-secondary); font-size: 11px; margin-inline-end: 7px; }
.ph-story-toolbar :is(button,a) { display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 6px 9px; border: 0; border-radius: 5px; color: var(--ph-color-text-primary); background: transparent; font: inherit; font-size: 12px; line-height: 1.5; text-decoration: none; cursor: pointer; box-shadow: none; transform: none; }
.ph-story-toolbar [data-story-font] { font-family: Tahoma, sans-serif; direction: ltr; font-size: 15px; }
.ph-story-toolbar :is(button,a):hover { color: var(--ph-color-news-blue); background: transparent; transform: none; }
.ph-story-toolbar button:disabled { opacity: .4; cursor: default; }
.ph-story-page .ph-story-body { margin: 0 !important; padding: 20px 26px 4px; color: var(--ph-color-text-primary); font-size: var(--story-font-size); line-height: 1.95; overflow-wrap: anywhere; }
.ph-story-body > :first-child { margin-top: 0; }
.ph-story-body p { margin: 0 0 16px; }
.ph-story-body p[style*="justify"] { text-align: start !important; }
/* Imported legacy spans use 12px; normalize their presentation, not stored content. */
.ph-story-body span[style*="font-size"],.ph-story-body font[size] { font-size: inherit !important; line-height: inherit !important; }
.ph-story-body :is(h2,h3,h4) { margin: 24px 0 10px; color: var(--ph-color-text-primary); font-weight: 800; line-height: 1.7; }
.ph-story-body h2 { font-size: 1.3em; }
.ph-story-body h3 { font-size: 1.15em; }
.ph-story-body h4 { font-size: 1.05em; }
.ph-story-body a { color: var(--ph-color-news-blue); text-decoration: underline; text-underline-offset: 4px; }
.ph-story-body :is(ul,ol) { margin: 0 22px 18px 0; padding: 0; }
.ph-story-body li { margin-bottom: 5px; }
.ph-story-body blockquote { margin: 20px 0; padding: 14px 18px; border: 0; border-inline-start: 3px solid var(--ph-color-transport-cyan); background: var(--ph-color-surface-soft); border-radius: 5px; font-size: 1em; }
.ph-story-body blockquote > :last-child { margin-bottom: 0; }
.ph-story-body :is(img,video) { max-width: 100%; height: auto; }
.ph-story-body img { height: auto !important; }
.ph-story-body p:empty { display: none; }
.ph-story-body :is(iframe,embed,object) { max-width: 100%; }
.ph-story-body iframe[src*="aparat"],.ph-story-body iframe[src*="youtube"] { width: 100%; height: auto; aspect-ratio: 16/9; }
.ph-story-body :is(figure,.wp-caption) { max-width: 100%; margin: 16px auto; }
.ph-story-body :is(figcaption,.wp-caption-text) { font-size: 12px; line-height: 1.8; color: var(--ph-color-text-secondary); }
.ph-story-body pre { max-width: 100%; overflow: auto; direction: ltr; text-align: left; font-size: .8em; }
.ph-story-table-scroll { max-width: 100%; overflow-x: auto; margin-block: 16px; }
.ph-story-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; width: 100%; margin: 0; font-size: .85em; }
.ph-story-table-scroll table { display: table; }
.ph-story-body :is(td,th) { padding: 8px 10px; border: 1px solid var(--ph-color-border); text-align: start; }
.ph-story-body th { background: var(--ph-color-surface-soft); }
.ph-story-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; margin: 0 26px 12px; }
.ph-story-tags > span { font-size: 11px; color: var(--ph-color-text-secondary); }
.ph-story-tags a { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 9px; background: var(--ph-color-surface-soft); border-radius: 4px; color: var(--ph-color-text-secondary); font-size: 11px; text-decoration: none; }
.ph-story-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 26px; padding: 12px 0; border-top: 1px solid var(--ph-color-border); color: var(--ph-color-text-secondary); font-size: 11px; }
.ph-story-end a { color: var(--ph-color-news-blue); font-size: 12px; min-height: 32px; display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
.ph-story-sidebar { display: grid; gap: 14px; min-width: 0; }
.ph-story-sidebar[data-story-sticky="true"] { position: sticky; top: 16px; }
.ph-story-side-news,.ph-story-related { padding: 0 14px; background: var(--ph-color-surface); border: 1px solid var(--ph-color-border); border-radius: 10px; }
.ph-story-section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 50px; border-bottom: 1px solid var(--ph-color-border); }
.ph-story-page .ph-story-section-head h2,.ph-story-page .ph-story-resources h2 { margin: 0; color: var(--ph-color-text-primary); font-size: 16px; font-weight: 800; line-height: 1.7; }
.ph-story-section-head h2::before { display: inline-block; content: ''; width: 4px; height: 13px; border-radius: 1px; background: var(--ph-color-signal-orange); margin-inline-end: 7px; }
.ph-story-section-head > a { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: var(--ph-color-news-blue); font-size: 11px; text-decoration: none; }
.ph-story-side-news .ph-story-section-head > a { min-width: 44px; font-size: 17px; }
.ph-story-card { min-width: 0; }
.ph-story-card + .ph-story-card { border-top: 1px solid var(--ph-color-border); }
.ph-story-card__link { display: grid; grid-template-columns: 76px minmax(0,1fr); gap: 10px; padding: 12px 0; align-items: center; color: var(--ph-color-text-primary); text-decoration: none !important; }
.ph-story-card__image { display: grid; place-items: center; width: 76px; height: 70px; overflow: hidden; border-radius: 5px; background: var(--ph-color-surface-soft); color: var(--ph-color-text-secondary); }
.ph-story-card__image img { width: 100%; height: 100%; object-fit: cover; }
.ph-story-card__image > svg { width: 28px; height: 28px; }
.ph-story-card__copy { min-width: 0; }
.ph-story-page .ph-story-card h3 { margin: 0 0 5px; font-size: 12px; line-height: 1.8; font-weight: 750; color: var(--ph-color-text-primary); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.ph-story-card__date { color: var(--ph-color-text-secondary); font-size: 10px; line-height: 1.6; }
.ph-story-card__link:hover h3,.ph-story-card__link:focus-visible h3 { color: var(--ph-color-news-blue); }
.ph-story-resources { padding: 13px 14px 3px; background: var(--ph-color-surface-soft); border: 1px solid var(--ph-color-border); border-radius: 10px; }
.ph-story-page .ph-story-resources h2 { font-size: 14px; margin-bottom: 4px; }
.ph-story-resources > a { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 60px; padding: 9px 0; text-decoration: none; color: var(--ph-color-text-primary); }
.ph-story-resources > a + a { border-top: 1px solid var(--ph-color-border); }
.ph-story-resources strong { display: block; font-size: 12px; line-height: 1.8; }
.ph-story-resources small { display: block; font-size: 10px; color: var(--ph-color-text-secondary); }
.ph-story-resources > a > span:last-child { color: var(--ph-color-news-blue); }
.ph-story-resources > a:hover strong { color: var(--ph-color-news-blue); }
.ph-story-related { margin-top: 18px; }
.ph-story-related-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 24px; }
.ph-story-related-grid .ph-story-card:nth-child(-n+2) { border-top: 0; }
.ph-story-related .ph-story-card__link { grid-template-columns: 96px minmax(0,1fr); min-height: 112px; }
.ph-story-related .ph-story-card__image { width: 96px; height: 78px; }
.ph-story-related .ph-story-card h3 { font-size: 13px; }
.ph-story-reading-column > .ph-ad { margin: 16px 0 0; }
.ph-story-body .ph-ad { margin-block: 16px; }
.ph-story .ph-ad::before { content: 'تبلیغات'; }
.ph-story-pages { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 26px 18px; }
.ph-story-pages :is(a,.post-page-numbers) { display: inline-grid; place-items: center; min-width: 40px; min-height: 40px; border: 1px solid var(--ph-color-border); border-radius: 4px; }
.ph-story-pages .current { background: var(--ph-color-surface-soft); }
@media(max-width:1099px) {
 .ph-story-layout { grid-template-columns: minmax(0,1fr) 284px; gap: 14px; }
 .ph-story-masthead { gap: 18px; padding: 16px; }
 .ph-story-page .ph-story-title { font-size: 25px; }
 .ph-story-lead { font-size: 14px; }
 .ph-story-page .ph-story-body { padding: 18px 20px 4px; font-size: var(--story-font-size); }
 .ph-story-related-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .ph-story-related-grid .ph-story-card:nth-child(3) { border-top: 1px solid var(--ph-color-border); }
}
@media(max-width:899px) {
 .ph-story-layout { grid-template-columns: minmax(0,1fr); }
 .ph-story-sidebar { grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: start; position: static !important; }
 .ph-story-sidebar > .ph-ad { grid-column: 1/-1; }
 .ph-story-page .ph-story-title { font-size: 23px; }
 .ph-story-meta { font-size: 10px; gap: 4px 10px; }
}
@media(max-width:679px) {
 .ph-story-page > .ph-container-wide { width: calc(100% - 24px); }
 .ph-story-breadcrumb { min-height: 38px; font-size: 10px; }
 .ph-story-masthead { grid-template-columns: minmax(0,1fr); gap: 14px; padding: 14px; border-radius: 8px; }
 .ph-story-page .ph-story-title { font-size: 23px; line-height: 1.7; margin-block: 8px 10px; }
 .ph-story-lead { font-size: 14px; line-height: 1.95; }
 .ph-story-meta { margin-top: 10px; padding-top: 10px; font-size: 10px; }
 .ph-story-layout { margin-top: 12px; gap: 12px; }
 .ph-story { --story-font-size: 17px; }
 .ph-story-toolbar { padding: 4px 8px; gap: 0; }
 .ph-story-toolbar :is(button,a) { padding-inline: 7px; font-size: 11px; gap: 4px; }
 .ph-story-type-tools > span { display: none; }
 .ph-story-share { gap: 0; }
 .ph-story-toolbar [data-story-print] > span { display: none; }
 .ph-story-page .ph-story-body { padding: 16px 14px 2px; }
 .ph-story-body p { margin-bottom: 14px; }
 .ph-story-tags { margin-inline: 14px; }
 .ph-story-end { margin-inline: 14px; }
 .ph-story-sidebar { grid-template-columns: minmax(0,1fr); gap: 12px; }
 .ph-story-related { margin-top: 12px; }
 .ph-story-related-grid { grid-template-columns: minmax(0,1fr); }
 .ph-story-related-grid .ph-story-card:nth-child(2) { border-top: 1px solid var(--ph-color-border); }
 .ph-story-card__link { grid-template-columns: 84px minmax(0,1fr); padding-block: 10px; }
 .ph-story-card__image { width: 84px; }
 .ph-story-page .ph-story-card h3 { font-size: 13px; }
 .ph-story-related .ph-story-card__link { grid-template-columns: 84px minmax(0,1fr); min-height: 98px; }
 .ph-story-related .ph-story-card__image { width: 84px; height: 70px; }
 .ph-story-section-head > a { max-width: 45%; }
}
/* Native discussion; no changes to admin comments or other post types. */
.ph-story .ph-news-comments { margin-top: 18px; padding: 0 18px 16px; border: 1px solid var(--ph-color-border); border-radius: 10px; background: var(--ph-color-surface); scroll-margin-top: 20px; }
.ph-news-comments .ph-story-section-head > span { font-size: 11px; color: var(--ph-color-text-secondary); }
.ph-news-comments :is(.ph-news-comments__empty,.ph-news-comments__closed,.comment-notes,.logged-in-as,.must-log-in) { margin: 12px 0; font-size: 12px; line-height: 1.9; color: var(--ph-color-text-secondary); }
.ph-news-comments .comment-respond { margin: 14px 0 0; padding: 0; }
.ph-news-comments .comment-reply-title { margin: 0 0 10px; font-size: 15px; line-height: 1.8; color: var(--ph-color-text-primary); font-weight: 750; }
.ph-news-comments .comment-reply-title small { margin-inline-start: 12px; font-size: 11px; font-weight: 400; }
.ph-news-comments a { color: var(--ph-color-news-blue); }
.ph-news-comments .comment-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 0; }
.ph-news-comments .comment-form > p { margin: 0; min-width: 0; }
.ph-news-comments .comment-form > :not(.comment-form-author):not(.comment-form-email) { grid-column: 1/-1; }
.ph-news-comments .comment-form label { display: block; margin-bottom: 5px; color: var(--ph-color-text-primary); font-size: 12px; line-height: 1.8; }
.ph-news-comments .comment-form :is(input[type="text"],input[type="email"],textarea) { display: block; width: 100%; max-width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid var(--ph-color-border-strong); border-radius: 6px; background: var(--ph-color-surface); color: var(--ph-color-text-primary); font: inherit; font-size: 14px; line-height: 1.8; box-shadow: none; }
.ph-news-comments .comment-form textarea { min-height: 116px; resize: vertical; }
.ph-news-comments .comment-form :is(input,textarea):focus-visible { outline: 2px solid var(--ph-color-news-blue); outline-offset: 2px; }
.ph-news-comments .comment-form .comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 8px; }
.ph-news-comments .comment-form-cookies-consent input { flex: none; margin: 5px 0 0; width: 16px; height: 16px; accent-color: var(--ph-color-news-blue); }
.ph-news-comments .comment-form-cookies-consent label { margin: 0; color: var(--ph-color-text-secondary); font-size: 11px; }
.ph-news-comments .form-submit .submit { min-height: 44px; padding: 9px 22px; border: 0; border-radius: 6px; background: var(--ph-color-news-blue); color: var(--ph-color-surface); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: none; }
.ph-news-comments .form-submit .submit:hover { filter: brightness(.95); }
.ph-news-comments .ph-news-comments__list,.ph-news-comments .children { list-style: none; margin: 0; padding: 0; }
.ph-news-comments .ph-news-comment { margin: 0; padding: 0; overflow-wrap: anywhere; }
.ph-news-comments .ph-news-comment__body { padding: 14px 0; border-bottom: 1px solid var(--ph-color-border); scroll-margin-top: 20px; }
.ph-news-comments .ph-news-comment__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 14px; font-size: 12px; line-height: 1.8; }
.ph-news-comment__meta time { font-size: 10px; color: var(--ph-color-text-secondary); }
.ph-news-comment__text { margin-top: 7px; font-size: 14px; line-height: 1.95; }
.ph-news-comment__text > :last-child { margin-bottom: 0; }
.ph-news-comment__text p { margin: 0 0 8px; }
.ph-news-comment__text :is(img,iframe,video) { max-width: 100%; height: auto; }
.ph-news-comment__text pre { white-space: pre-wrap; }
.ph-news-comment__pending { margin: 7px 0; color: var(--ph-color-text-secondary); font-size: 12px; }
.ph-news-comments .comment-reply-link { display: inline-flex; align-items: center; min-height: 36px; padding-inline: 4px; margin-top: 4px; font-size: 11px; }
.ph-news-comments .children { margin-inline-start: 18px; padding-inline-start: 12px; border-inline-start: 2px solid var(--ph-color-border); }
.ph-news-comments .children .children { margin-inline-start: 8px; padding-inline-start: 8px; }
.ph-news-comments .comment-navigation,.ph-news-comments .comments-pagination { margin: 14px 0; }
.ph-news-comments .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.ph-news-comments .page-numbers { min-width: 36px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 4px 8px; border: 1px solid var(--ph-color-border); border-radius: 4px; font-size: 12px; }
@media(max-width:679px) {
 .ph-story .ph-news-comments { margin-top: 12px; padding-inline: 14px; }
 .ph-news-comments .comment-form { grid-template-columns: minmax(0,1fr); }
 .ph-news-comments .children { margin-inline-start: 10px; padding-inline-start: 8px; }
 .ph-news-comments .children .children { margin-inline-start: 4px; padding-inline-start: 4px; }
}
@media print {
 .ph-story .ph-news-comments,.ph-story-comments-link { display: none !important; }
 body.single-post { background: white !important; color: black !important; }
 body.single-post :is(.ph-topbar,.ph-site-header,.site-header,.site-footer,.ph-site-footer,.ph-story-breadcrumb,.ph-story-sidebar,.ph-story-toolbar,.ph-story-related,.ph-story-tags,.ph-story-end,.ph-ad,#wpadminbar) { display: none !important; }
 .ph-story-page > .ph-container-wide { width: 100%; }
 .ph-story-layout,.ph-story-masthead { display: block; }
 .ph-story-masthead,.ph-story-paper { border: 0; background: white; padding: 0; }
 .ph-story :is(.ph-story-title,.ph-story-lead,.ph-story-body,.ph-story-meta) { color: black; }
 .ph-story-visual { width: 60%; margin: 12px auto; }
 .ph-story-page .ph-story-body { padding: 0; font-size: 12pt; }
 .ph-story-body a { color: black; }
 .ph-story-body img,.ph-story-body blockquote { break-inside: avoid; }
}
