/*
 * Main KurdNation editorial rhythm, Newspaper Standard Pack.
 * CSS only: keep native columns, RTL reservations, image requests and lazy loading.
 * Large cards use 20px titles, compact lists 16px; article headings/body retain
 * their established hierarchy. No hero/Big Grid or article-image cropping.
 */
body.knmsc-editorial {
    --knmsc-type: var(--kn-font, "vazir-fd-wol", Tahoma, Arial, sans-serif);
    --knmsc-card-title: 20px;
    --knmsc-list-title: 16px;
    --knmsc-card-radius: 8px;
    --knmsc-card-ink: var(--kn-ink, #172635);
    --knmsc-card-muted: var(--kn-muted, #526375);
}

/* The three service tools use the site's existing font token everywhere.
   No webfont is downloaded; icon glyph selectors and numeric sizing stay intact. */
body.knmsc-editorial :is(.knd-wrap, .knw-wrap, .kwc-wrap, .kntd, .knmsc-service-nav) {
    font-family: var(--knmsc-type);
}
body.knmsc-editorial :is(.knd-wrap, .knw-wrap, .kwc-wrap, .kntd, .knmsc-service-nav) :is(
    h2, h3, p, a, button, input, select, label, dt, dd, time,
    .kut-card-label, .kut-card-value, .kut-card-note, .kut-heading-mark,
    .knd-date, .kwc-time, .kwc-date, .knw-temp, .knw-desc, .knw-meta,
    .knw-forecast, .knw-freshness, .kntd__tool, .kntd__date-part) {
    font-family: var(--knmsc-type);
}
body.knmsc-editorial .knmsc-sidebar-tool > summary,
body.knmsc-editorial:is(.knmsc-design-dates, .knmsc-design-weather,
    .knmsc-design-world_clocks) .td-page-header .td-page-title {
    font-family: var(--knmsc-type);
}

/* Exact regular modules; overlay modules (slide/mx4/mx8) remain theme-owned. */
body.knmsc-editorial .td-main-content-wrap :is(.td_module_1, .td_module_2,
    .td_module_3, .td_module_4, .td_module_5, .td_module_10, .td_module_11) .td-module-title {
    font-family: var(--knmsc-type);
    font-size: var(--knmsc-card-title);
    font-weight: 700;
    line-height: 1.6;
    color: var(--knmsc-card-ink);
    margin-block: 0 8px;
    overflow-wrap: break-word;
}
body.knmsc-editorial .td-main-content-wrap :is(.td_module_6, .td_module_7,
    .td_module_8, .td_module_15, .td_module_mx2, .td_module_related_posts) .td-module-title {
    font-family: var(--knmsc-type);
    font-size: var(--knmsc-list-title);
    font-weight: 700;
    line-height: 1.65;
    color: var(--knmsc-card-ink);
    margin-block: 0 6px;
    overflow-wrap: break-word;
}
body.knmsc-editorial .td-main-content-wrap :is(.td_module_1, .td_module_2,
    .td_module_3, .td_module_4, .td_module_5, .td_module_6, .td_module_7,
    .td_module_8, .td_module_10, .td_module_11, .td_module_15,
    .td_module_mx2, .td_module_related_posts) .td-module-title a {
    font: inherit;
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: .2em;
}
body.knmsc-editorial .td-main-content-wrap :is(.td_module_1, .td_module_2,
    .td_module_3, .td_module_4, .td_module_5, .td_module_6, .td_module_7,
    .td_module_8, .td_module_10, .td_module_11, .td_module_15,
    .td_module_mx2, .td_module_related_posts) .td-module-title a:hover {
    color: var(--kn-link, #914400);
    text-decoration: underline;
}
body.knmsc-editorial .td-main-content-wrap .td-excerpt {
    font-family: var(--knmsc-type);
    font-size: 15px;
    line-height: 1.85;
    color: var(--knmsc-card-muted);
}
body.knmsc-editorial .td-main-content-wrap .td-excerpt p { font: inherit; }
body.knmsc-editorial .td-main-content-wrap :is(.td_module_1, .td_module_2,
    .td_module_3, .td_module_4, .td_module_5, .td_module_6, .td_module_7,
    .td_module_8, .td_module_10, .td_module_11, .td_module_15,
    .td_module_mx2, .td_module_related_posts) :is(.td-post-date, .td-module-date) {
    font-family: var(--knmsc-type);
    font-size: 12px;
    line-height: 1.7;
    color: var(--knmsc-card-muted);
}

/* Normalize the visible thumbnail canvas, not the source file. Width remains
   the manufacturer's width (fluid for stacked cards; fixed for compact lists).
   The explicit CSS aspect ratio supersedes the image's intrinsic ratio while
   its original width/height attributes still serve non-CSS clients. */
body.knmsc-editorial .td-main-content-wrap :is(.td_module_1, .td_module_2,
    .td_module_3, .td_module_4, .td_module_5, .td_module_6, .td_module_7,
    .td_module_10, .td_module_11, .td_module_mx2,
    .td_module_related_posts) .td-module-thumb > .td-image-wrap > img.entry-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover;
    object-position: center;
    border-radius: var(--knmsc-card-radius);
    background: #f1f4f7;
}
/* Stacked cards fill their own column directly below the section bar. This
   never expands the small side-by-side 6/7/mx2 thumbnail over its text column. */
body.knmsc-editorial .td-main-content-wrap :is(.td_module_1, .td_module_2,
    .td_module_3, .td_module_4, .td_module_5,
    .td_module_related_posts) .td-module-thumb,
body.knmsc-editorial .td-main-content-wrap :is(.td_module_1, .td_module_2,
    .td_module_3, .td_module_4, .td_module_5,
    .td_module_related_posts) .td-module-thumb > .td-image-wrap,
body.knmsc-editorial .td-main-content-wrap :is(.td_module_1, .td_module_2,
    .td_module_3, .td_module_4, .td_module_5,
    .td_module_related_posts) .td-module-thumb > .td-image-wrap > img.entry-thumb {
    width: 100%;
}
/* These document-oriented slots keep the whole thumbnail visible. An editor
   can apply knmsc-preserve-image to another builder row for artwork with text.
   No source URLs or thumbnail generation are changed by this stylesheet. */
body.knmsc-editorial .td-main-content-wrap :is(.kn-home-monthly-col,
    .kn-home-statement-main, .knmsc-preserve-image) :is(.td_module_1,
    .td_module_2, .td_module_3, .td_module_4, .td_module_5, .td_module_6,
    .td_module_7, .td_module_10, .td_module_11, .td_module_mx2,
    .td_module_related_posts) .td-module-thumb > .td-image-wrap > img.entry-thumb {
    object-fit: contain;
}

/* Real WordPress avatars only. No shape-based guessing of news subjects,
   no changes to logos/wordmarks, membership banners or printed identity cards. */
body.knmsc-editorial :is(.comments, #comments, .comment-list) img.avatar {
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
    background: #f1f4f7;
}

/* Text-entry controls use the same already-loaded font. Buttons and icon-font
   descendants keep their provider's styles; this does not reset icon glyphs. */
body.knmsc-editorial .td-main-content-wrap :is(.everest-forms, #commentform) :is(
    input[type="text"], input[type="email"], input[type="tel"],
    input[type="url"], input[type="search"], textarea, select) {
    font-family: var(--knmsc-type);
    font-size: 16px;
    line-height: 1.6;
}
@media (max-width: 767px) {
    body.knmsc-editorial { --knmsc-card-title: 19px; }
    /* Large archive list cards share the readable compact type scale on phones. */
    body.knmsc-editorial .td-main-content-wrap :is(.td_module_10, .td_module_11) .td-module-title {
        font-size: var(--knmsc-list-title);
        line-height: 1.65;
    }
}
@media print {
    body.knmsc-editorial .td-main-content-wrap :is(.td_module_1, .td_module_2,
        .td_module_3, .td_module_4, .td_module_5, .td_module_6, .td_module_7,
        .td_module_10, .td_module_11, .td_module_mx2,
        .td_module_related_posts) .td-module-thumb > .td-image-wrap > img.entry-thumb {
        aspect-ratio: auto;
        object-fit: contain;
        border-radius: 0;
    }
}
