/* ==========================================================================
   Canada Nitharsanam - UI refresh layer
   Loaded after assets/css/app.css (theme.css + style.css). Refines the
   existing theme; remove this file to go back to the original look.
   ========================================================================== */

:root {
    --cn-red: #cb0000;
    --cn-red-dark: #a30000;
    --cn-red-soft: #fff1f1;
    --cn-ink: #1d1f23;
    --cn-ink-2: #474b52;
    --cn-muted: #6b7079;
    --cn-line: #e7e8eb;
    --cn-bg: #f3f4f6;
    --cn-card: #ffffff;
    --cn-radius: 12px;
    --cn-radius-sm: 8px;
    --cn-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --cn-shadow-hover: 0 6px 18px rgba(16, 24, 40, .12);
    --cn-focus: 0 0 0 3px rgba(203, 0, 0, .35);
    --theme-primary: var(--cn-red);
}

/* ---------- Base ---------- */
body {
    background: var(--cn-bg);
    color: var(--cn-ink);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; }

a { transition: color .15s ease, background-color .15s ease, box-shadow .15s ease; }

:focus-visible {
    outline: none;
    box-shadow: var(--cn-focus) !important;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 2000;
    background: #fff;
    color: var(--cn-ink);
    padding: 10px 16px;
    border-radius: var(--cn-radius-sm);
    font-weight: 600;
    box-shadow: var(--cn-shadow-hover);
}
.skip-link:focus { top: 12px; }

.site-content { padding-top: 16px; padding-bottom: 24px; }
.site-content:focus { outline: none; }

/* ---------- Header ---------- */
body #navbar {
    min-height: 64px;
    padding: 6px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    z-index: 1030;
}
body #navbar .main-logo { height: 48px; width: auto; }

.site-primary-nav { gap: 4px; }
.site-primary-nav .nav-link {
    color: rgba(255, 255, 255, .92) !important;
    font-weight: 600;
    font-size: 16px;
    padding: 10px 14px !important;
    border-radius: 999px;
}
.site-primary-nav .nav-link:hover,
.site-primary-nav .nav-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, .16);
}

body .navbar-toggler {
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: var(--cn-radius-sm);
    min-width: 44px;
    min-height: 44px;
    background: transparent !important;
}
body .navbar-toggler .fa { font-size: 20px; }

/* Off-canvas (mobile) menu */
body .offcanvas.bg-theme-primary { max-width: 86vw; }
body .offcanvas .offcanvas-header { border-bottom: 1px solid rgba(255, 255, 255, .18); }
body .offcanvas .mobile-header-close {
    background: rgba(255, 255, 255, .15);
    border: 0;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 18px;
}
body .offcanvas .nav-link {
    color: #fff !important;
    padding: 12px 14px !important;
    border-radius: var(--cn-radius-sm);
    font-size: 17px;
}
body .offcanvas .nav-link:hover,
body .offcanvas .nav-link.active { background: rgba(255, 255, 255, .16); }
.offcanvas-section-label {
    list-style: none;
    margin: 14px 14px 4px;
    font-size: 13px;
    letter-spacing: .5px;
    color: rgba(255, 255, 255, .75);
}

/* Desktop category bar */
.category-bar {
    background: #fff;
    border-bottom: 1px solid var(--cn-line);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.category-bar__list {
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: thin;
}
.category-bar__list a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 6px 14px;
    border-radius: 999px;
    color: var(--cn-ink-2);
    font-weight: 600;
    white-space: nowrap;
}
.category-bar__list a:hover { background: var(--cn-red-soft); color: var(--cn-red); }
.category-bar__list a.active { background: var(--cn-red); color: #fff; }

/* ---------- Cards / sections ---------- */
body .lsb-sections,
body .mfc-section.ds-container,
body .rsb-sections {
    background: var(--cn-card);
    border-radius: var(--cn-radius);
    box-shadow: var(--cn-shadow);
    border: 1px solid var(--cn-line);
}
body .lsb-sections { padding: 16px; }
body .mfc-section.ds-container { padding: 20px 24px; }
body .rsb-sections { padding: 12px 14px; }

/* Section titles */
body .section-title {
    font-size: 22px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--cn-ink);
    margin-bottom: 18px;
}
body .section-title:before { background: var(--cn-red); width: 56px; height: 3px; bottom: -10px; }
body .section-title:after { bottom: -9px; height: 1px; background: var(--cn-line); }
.section-title__sub { display: block; font-size: 14px; font-weight: 500; color: var(--cn-muted); margin-top: 2px; }

body .mfc-ac-header { gap: 10px; padding: 0 0 8px; }
body .mfc-ac-header .go-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--cn-red-soft);
    color: var(--cn-red);
}
body .mfc-ac-header .go-back:hover { background: var(--cn-red); color: #fff; }

body .rsb-sec-header {
    background: transparent;
    border-radius: 0;
    margin: 16px 0 8px;
    border-bottom: 2px solid var(--cn-line);
}
body .rsb-sec-header a {
    padding: 6px 0 8px;
    border-left: 0;
    color: var(--cn-ink);
    font-size: 18px;
    font-weight: 700;
    position: relative;
}
body .rsb-sec-header a:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 48px;
    height: 2px;
    background: var(--cn-red);
}
body .rsb-sec-header a:hover { background: transparent; color: var(--cn-red); }

body .mfc-article-section-header h4 { font-size: 20px; font-weight: 700; }
body .mfc-article-section-header:before { background: var(--cn-red); }

/* ---------- Lead story (home) ---------- */
.lead-story {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 8px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--cn-line);
}
.lead-story__media {
    display: block;
    overflow: hidden;
    border-radius: var(--cn-radius);
    aspect-ratio: 16 / 9;
    background: #ddd;
}
.lead-story__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.lead-story:hover .lead-story__media img { transform: scale(1.03); }
.lead-story__title { font-size: 26px; line-height: 1.4; font-weight: 700; margin: 6px 0 8px; }
.lead-story__title a { color: var(--cn-ink); }
.lead-story__title a:hover { color: var(--cn-red); }
.lead-story__excerpt { color: var(--cn-ink-2); font-size: 17px; line-height: 1.75; margin: 0 0 8px; }

.chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--cn-red-soft);
    color: var(--cn-red);
    font-size: 13px;
    font-weight: 700;
}
.chip:hover { background: var(--cn-red); color: #fff; }

.meta { color: var(--cn-muted); font-size: 13px; }

/* ---------- Post lists (home, category, tag, popular, archive) ---------- */
body .lsba-sec .a-item,
body .article-item {
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--cn-line);
}
body .lsba-sec .a-item > a,
body .article-item > a {
    flex: none;
    width: 168px;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: var(--cn-radius-sm);
    background: #ddd;
}
body .lsba-sec .a-item img,
body .article-item a img {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
    transition: transform .35s ease;
}
body .lsba-sec .a-item:hover img,
body .article-item:hover a img { transform: scale(1.05); }

body .lsba-sec .a-item h4,
body .article-item h4 { flex: 1; min-width: 0; gap: 6px; }

body .lsba-sec .a-item h4 > a,
body .article-item h4 > a {
    font-size: 18px;
    line-height: 1.5;
    font-weight: 600;
    color: var(--cn-ink);
    -webkit-line-clamp: 3;
}
body .lsba-sec .a-item h4 > a:hover,
body .article-item h4 > a:hover { color: var(--cn-red); }

body .lsba-sec .a-item .ap-at a,
body .article-item .article-footer span { color: var(--cn-muted); font-size: 13px; }

body .article-item .article-footer { gap: 8px; flex-wrap: wrap; }
body .article-footer .feed-category a {
    background: var(--cn-red-soft);
    color: var(--cn-red);
    border-radius: 999px;
    padding: 3px 12px;
    font-weight: 700;
    letter-spacing: 0;
}
body .article-footer .feed-category a:hover { background: var(--cn-red); color: #fff; }

.business-promo { display: block; margin-top: 16px; border-radius: var(--cn-radius); overflow: hidden; }
.business-promo img { display: block; transition: transform .35s ease; }
.business-promo:hover img { transform: scale(1.02); }

/* Sidebar list */
body .rsba-sec .a-item { gap: 10px; padding: 10px 0; margin: 0; border-bottom: 1px solid var(--cn-line); }
body .rsba-sec .a-item > a {
    flex: none;
    width: 96px;
    aspect-ratio: 4 / 3;
    border-radius: var(--cn-radius-sm);
    overflow: hidden;
}
body .rsba-sec .a-item img {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    object-fit: cover;
    box-shadow: none;
    border-radius: 0;
}
body .rsba-sec .a-item h4 > a { font-size: 15px; line-height: 1.5; font-weight: 600; color: var(--cn-ink); -webkit-line-clamp: 3; }
body .rsba-sec .a-item h4 > a:hover { color: var(--cn-red); }

body .rsbac-route-links { gap: 6px; border-top: 1px solid var(--cn-line); padding-top: 14px; }
body .rsbac-route-links a {
    margin: 0;
    border-radius: 999px;
    border: 1px solid var(--cn-line);
    padding: 6px 12px;
    color: var(--cn-ink-2);
    font-weight: 600;
}
body .rsbac-route-links a:hover { background: var(--cn-red-soft); border-color: var(--cn-red); color: var(--cn-red); }

/* Ads */
.ad-slot { position: relative; margin: 16px 0; text-align: center; }
.ad-slot__label {
    display: block;
    font-size: 11px;
    letter-spacing: .5px;
    color: var(--cn-muted);
    margin-bottom: 4px;
}
body .blurb img { border-radius: var(--cn-radius-sm); }

/* ---------- Article page ---------- */
body .ds-news-title h1 {
    font-size: 30px;
    line-height: 1.4;
    font-weight: 700;
    color: var(--cn-ink);
    margin: 4px 0 12px;
}
body .ds-tag-stamp { gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
body .ds-topics { display: flex; flex-wrap: wrap; gap: 6px; }
body .ds-topics a {
    margin: 0;
    padding: 3px 12px;
    border-radius: 999px;
    border: 0;
    background: var(--cn-red-soft);
    font-size: 13px;
}
body .ds-topics a:hover { background: var(--cn-red); color: #fff; }
body .ds-news-ts { color: var(--cn-muted); margin: 0; }

.ds-featured-image { margin: 12px 0 8px; }
.ds-featured-image img {
    display: block;
    width: 100%;
    max-height: 560px;
    object-fit: cover;
    border-radius: var(--cn-radius);
}

body .ds-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 12px 0 8px;
}
body .ds-content,
body .ds-content p,
body .ds-content li {
    font-size: 18px;
    line-height: 1.9;
    font-weight: 400;
    color: #2a2d33;
}
body .ds-content p { margin: 0 0 1.1em; }
body .ds-content h2 { font-size: 24px; line-height: 1.45; font-weight: 700; margin: 1.4em 0 .5em; }
body .ds-content h3 { font-size: 21px; line-height: 1.45; font-weight: 700; margin: 1.3em 0 .5em; }
body .ds-content img { height: auto; border-radius: var(--cn-radius-sm); margin: 1em auto; }
body .ds-content blockquote,
body .ds-content .blockquote {
    margin: 1.2em 0;
    padding: 12px 18px;
    border-left: 4px solid var(--cn-red);
    background: var(--cn-red-soft);
    border-radius: 0 var(--cn-radius-sm) var(--cn-radius-sm) 0;
}
body .ds-content table { width: 100%; display: block; overflow-x: auto; }

body .ds-share-blurb { border-top: 1px solid var(--cn-line); border-bottom: 1px solid var(--cn-line); padding: 8px 0; margin: 8px 0; }
body .ds-share-icons a { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; }

/* Related posts */
body .dp-ra-item {
    gap: 12px;
    padding: 8px;
    border-radius: var(--cn-radius-sm);
    border: 1px solid var(--cn-line);
    background: #fff;
    height: calc(100% - 10px);
}
body .dp-ra-item:hover { box-shadow: var(--cn-shadow-hover); }
body .dp-ra-item > a { flex: none; width: 96px; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; }
body .dp-ra-item img { width: 100% !important; height: 100% !important; margin: 0 !important; object-fit: cover; box-shadow: none; border-radius: 0; }
body .dp-ra-item h4 { flex: 1; min-width: 0; }
body .dp-ra-item h4 a { height: auto; font-size: 15px; line-height: 1.5; font-weight: 600; color: var(--cn-ink); }
body .dp-ra-item h4 a:hover { color: var(--cn-red); }

/* ---------- Business directory ---------- */
.business-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}
.business-card {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--cn-line);
    border-radius: var(--cn-radius);
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.business-card:hover { box-shadow: var(--cn-shadow-hover); transform: translateY(-2px); border-color: #f3c2c2; }
.business-card__media { aspect-ratio: 3 / 2; background: #eee; overflow: hidden; }
.business-card__media img { width: 100%; height: 100%; object-fit: cover; }
.business-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.business-card__title { font-size: 18px; line-height: 1.4; font-weight: 700; margin: 0; }
.business-card__title a { color: var(--cn-ink); }
/* stretched link: whole card clickable, one link for keyboard/screen readers */
.business-card__title a:after { content: ""; position: absolute; inset: 0; border-radius: var(--cn-radius); }
.business-card__title a:focus-visible { box-shadow: none !important; }
.business-card__title a:focus-visible:after { box-shadow: var(--cn-focus); }
.business-card:hover .business-card__title a { color: var(--cn-red); }
.business-card__meta { display: flex; gap: 8px; align-items: baseline; margin: 0; font-size: 14px; color: var(--cn-muted); }
.business-card__meta i { color: var(--cn-red); width: 14px; text-align: center; }

.back-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    font-size: 14px;
    font-weight: 600;
    color: var(--cn-red);
}
.back-link:hover { color: var(--cn-red-dark); }
.business-subtitle { color: var(--cn-muted); margin: -4px 0 8px; }
.business-subtitle i { color: var(--cn-red); }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 48px 16px; color: var(--cn-muted); }
.empty-state i { font-size: 44px; color: #c9ccd2; margin-bottom: 12px; }
.empty-state h2 { font-size: 20px; color: var(--cn-ink); margin-bottom: 6px; }
.btn-theme {
    background: var(--cn-red);
    border-color: var(--cn-red);
    color: #fff;
    border-radius: 999px;
    padding: 10px 20px;
    font-weight: 600;
}
.btn-theme:hover { background: var(--cn-red-dark); color: #fff; }

/* ---------- Pagination ---------- */
.pagination-wrapper .pagination-wrapper { margin: 0; }
body .pagination-wrapper { margin: 20px 0 4px; }
body .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 0;
}
body .pagination li a,
body .pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px !important;
    margin: 0;
    border-radius: 999px;
    border: 1px solid var(--cn-line);
    background: #fff;
    color: var(--cn-ink-2);
    font-family: "Poppins", sans-serif;
    font-size: 15px;
    font-weight: 500;
}
body .pagination li a:hover { border-color: var(--cn-red); color: var(--cn-red); background: var(--cn-red-soft); }
body .pagination li.active span { background: var(--cn-red); border-color: var(--cn-red); color: #fff; }
body .pagination li.disabled span { color: #b6b9bf; background: #f7f7f8; }

/* ---------- Footer ---------- */
body #footer { margin-bottom: 0; }
body .footer-menu { background: #1d1f23; border-bottom: 1px solid #2c2f35; }
body .footer-menu .navbar-nav li a {
    font-size: 13px;
    letter-spacing: 1px;
    padding: 12px 10px;
    color: rgba(255, 255, 255, .85);
}
body .footer-menu .navbar-nav li a:hover { color: #fff; }
body .footer-bottom { background: #16181b; color: rgba(255, 255, 255, .65); font-size: 13px; }
body .footer-bottom a { color: rgba(255, 255, 255, .9); }

/* ---------- Tablet & mobile ---------- */
@media (max-width: 991.98px) {
    body #navbar .main-logo { height: 38px; }
    body .ds-news-title h1 { font-size: 24px; }
    .lead-story__title { font-size: 22px; }
}

@media (max-width: 767.98px) {
    .site-content { padding-top: 10px; padding-left: 10px; padding-right: 10px; }
    body .lsb-sections { padding: 12px; border-radius: 10px; }
    body .mfc-section.ds-container { padding: 14px; border-radius: 10px; }

    body .lsba-sec .a-item > a,
    body .article-item > a { width: 112px; }
    body .lsba-sec .a-item h4 > a,
    body .article-item h4 > a { font-size: 16px; line-height: 1.5; }

    .lead-story__media { border-radius: 10px; }
    .lead-story__title { font-size: 20px; }
    .lead-story__excerpt { font-size: 16px; -webkit-line-clamp: 3; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }

    body .ds-news-title h1 { font-size: 22px; line-height: 1.45; }
    body .ds-content,
    body .ds-content p,
    body .ds-content li { font-size: 17px; line-height: 1.85; }

    .business-grid { grid-template-columns: 1fr; gap: 12px; }
    .business-card { flex-direction: row; }
    .business-card__media { width: 120px; flex: none; aspect-ratio: auto; }
    .business-card__body { padding: 12px 14px; }
    .business-card:hover { transform: none; }

    body .footer-menu .navbar-nav { float: none; }
    body .footer-bottom .text-end { text-align: left !important; margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   Home page
   ========================================================================== */

/* Top stories: lead (left) + three headlines (right) */
.top-stories { margin-bottom: 8px; }
.top-stories__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--cn-line);
}
.top-stories .lead-story { margin: 0; padding: 0; border: 0; }
.top-stories .lead-story__title { font-size: 24px; }

.top-stories__side { display: flex; flex-direction: column; gap: 14px; }
.mini-story { display: flex; flex-direction: column; gap: 6px; }
.mini-story + .mini-story { padding-top: 14px; border-top: 1px solid var(--cn-line); }
.mini-story__media {
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: var(--cn-radius-sm);
    overflow: hidden;
    background: #ddd;
}
.mini-story__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.mini-story:hover .mini-story__media img { transform: scale(1.04); }
.mini-story__media { display: none; }
.mini-story:first-child .mini-story__media { display: block; }
.mini-story__cat { color: var(--cn-red); font-size: 13px; font-weight: 700; }
.mini-story__title { font-size: 17px; line-height: 1.5; font-weight: 700; margin: 0; }
.mini-story__title a { color: var(--cn-ink); }
.mini-story__title a:hover { color: var(--cn-red); }

/* Section header used by "Latest" and category blocks */
.home-section { margin-top: 24px; }
.home-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 8px;
    margin-bottom: 4px;
    border-bottom: 2px solid var(--cn-line);
    position: relative;
}
.home-section__header:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 56px;
    height: 2px;
    background: var(--cn-red);
}
.home-section__title { font-size: 21px; line-height: 1.4; font-weight: 700; margin: 0; }
.home-section__title a { color: var(--cn-ink); }
.home-section__title a:hover { color: var(--cn-red); }
.home-section__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--cn-red);
    white-space: nowrap;
}
.home-section__more i { font-size: 11px; }
.home-section__more:hover { color: var(--cn-red-dark); }
.home-section__footer { text-align: center; margin-top: 18px; }

.a-item__cat { display: block; width: 100%; color: var(--cn-red); font-size: 13px; font-weight: 700; line-height: 1.4; }

/* Category blocks: 4-up story cards */
.story-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 14px;
}
.story-card { display: flex; flex-direction: column; gap: 6px; }
.story-card__media {
    display: block;
    aspect-ratio: 3 / 2;
    border-radius: var(--cn-radius-sm);
    overflow: hidden;
    background: #ddd;
}
.story-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.story-card:hover .story-card__media img { transform: scale(1.05); }
.story-card__title {
    font-size: 16px;
    line-height: 1.5;
    font-weight: 600;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.story-card__title a { color: var(--cn-ink); }
.story-card__title a:hover { color: var(--cn-red); }

.business-promo { margin-top: 24px; }

/* Sidebar: most read (ranked) */
.popular-list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.popular-list__item {
    display: grid;
    grid-template-columns: 28px 72px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--cn-line);
}
.popular-list__item:last-child { border-bottom: 0; }
.popular-list__rank { font-size: 24px; font-weight: 800; line-height: 1; color: #d5d7dc; text-align: center; }
.popular-list__item:first-child .popular-list__rank { color: var(--cn-red); }
.popular-list__thumb { display: block; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: #ddd; }
.popular-list__thumb img { width: 100%; height: 100%; object-fit: cover; }
.popular-list__title {
    font-size: 15px;
    line-height: 1.5;
    font-weight: 600;
    color: var(--cn-ink);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.popular-list__title:hover { color: var(--cn-red); }

@media (max-width: 1199.98px) {
    .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
    .top-stories__grid { grid-template-columns: 1fr; }
    .top-stories__side .mini-story__media { display: none !important; }
}

@media (max-width: 767.98px) {
    .top-stories .lead-story__title { font-size: 20px; }
    .home-section { margin-top: 18px; }
    .home-section__title { font-size: 19px; }
    .story-grid { grid-template-columns: 1fr; gap: 0; margin-top: 4px; }
    .story-card {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        grid-template-rows: auto auto;
        column-gap: 12px;
        row-gap: 4px;
        padding: 12px 0;
        border-bottom: 1px solid var(--cn-line);
    }
    .story-card:last-child { border-bottom: 0; }
    .story-card__media { grid-row: 1 / span 2; }
    .story-card__title { font-size: 16px; }
}

/* Feed timestamps: the theme title-cases and enlarges these */
body .lsba-sec .a-item .ap-at,
body .lsba-sec .a-item .ap-at span {
    display: block;
    width: 100%;
    font-size: 13px;
    font-weight: 500;
    color: var(--cn-muted);
    text-transform: none;
    line-height: 1.4;
}
body .article-item .article-footer span { text-transform: none; font-size: 13px; color: var(--cn-muted); }

/* ==========================================================================
   Fixes after first deploy (2026-12-02)
   ========================================================================== */

/* 1. Home: the lead story stretched to the height of the headline column and the
      extra height became a gap between photo and title. */
.top-stories__grid { align-items: start; }
.top-stories .lead-story { align-content: start; grid-auto-rows: max-content; }

/* 2. Smaller badges */
.site-primary-nav .nav-link {
    font-size: 14px;
    padding: 6px 12px !important;
    line-height: 1.4;
}
.category-bar__list a { min-height: 34px; padding: 4px 12px; font-size: 14px; }
.chip { padding: 1px 9px; font-size: 11px; }
body .ds-topics a { padding: 1px 9px; font-size: 11px; }
body .article-footer .feed-category a { padding: 1px 9px; font-size: 11px; }
.a-item__cat, .mini-story__cat { font-size: 12px; }

/* 3. Smaller headings and text */
body .ds-news-title h1 { font-size: 24px; line-height: 1.45; margin: 4px 0 10px; }
.lead-story__title,
.top-stories .lead-story__title { font-size: 21px; line-height: 1.45; }
.lead-story__excerpt { font-size: 15px; line-height: 1.7; }
.mini-story__title { font-size: 15px; }
.home-section__title { font-size: 19px; }
body .lsba-sec .a-item h4 > a,
body .article-item h4 > a { font-size: 16px; line-height: 1.5; }
.story-card__title { font-size: 15px; }
body .section-title { font-size: 20px; }
body .ds-content,
body .ds-content p,
body .ds-content li { font-size: 17px; line-height: 1.85; }
body .ds-content h2 { font-size: 21px; }
body .ds-content h3 { font-size: 19px; }

/* 4. Related posts on the post page: real cards (photo on top, title below) */
body .mfc-article-section-header {
    background: none;
    padding: 0 0 8px;
    margin: 24px 0 14px !important;
    border-bottom: 2px solid var(--cn-line);
    position: relative;
}
body .mfc-article-section-header:before {
    top: auto;
    bottom: -2px;
    left: 0;
    width: 56px;
    height: 2px;
    background: var(--cn-red);
}
body .mfc-article-section-header h4,
body .mfc-article-section-header h4 span {
    font-size: 19px;
    font-weight: 700;
    background: none;
    padding: 0;
    color: var(--cn-ink);
}
body #divPYRec { row-gap: 14px; }
body .dp-ra-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    height: 100%;
    margin: 0;
    padding: 0 0 10px;
    overflow: hidden;
    border: 1px solid var(--cn-line);
    border-radius: var(--cn-radius-sm);
    background: #fff;
}
body .dp-ra-item > a {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 0;
}
body .dp-ra-item img { width: 100% !important; height: 100% !important; object-fit: cover; }
body .dp-ra-item h4 { padding: 0 12px; }
body .dp-ra-item h4 a {
    font-size: 15px;
    line-height: 1.5;
    -webkit-line-clamp: 3;
}

@media (max-width: 767.98px) {
    body .ds-news-title h1 { font-size: 20px; }
    .lead-story__title, .top-stories .lead-story__title { font-size: 19px; }
    .home-section__title { font-size: 18px; }
    body .lsba-sec .a-item h4 > a, body .article-item h4 > a { font-size: 15px; }
    body .ds-content, body .ds-content p, body .ds-content li { font-size: 16px; line-height: 1.8; }

    /* Related posts: compact rows on phones */
    body #divPYRec { row-gap: 0; }
    body .dp-ra-item {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 10px 0;
        border: 0;
        border-bottom: 1px solid var(--cn-line);
        border-radius: 0;
        height: auto;
    }
    body .dp-ra-item > a { flex: none; width: 112px; border-radius: 6px; }
    body .dp-ra-item h4 { padding: 0; }
}
