/* Locally hosted typography */
@font-face {
    font-family: "Open Sans Local";
    src: url("../fonts/OpenSans-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Open Sans Local";
    src: url("../fonts/OpenSans-Semibold.ttf") format("truetype");
    font-style: normal;
    font-weight: 600;
    font-display: swap;
}
@font-face {
    font-family: "Open Sans Local";
    src: url("../fonts/OpenSans-Bold.ttf") format("truetype");
    font-style: normal;
    font-weight: 700 900;
    font-display: swap;
}
@font-face {
    font-family: "PT Serif Local";
    src: url("../fonts/PTSerif-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "PT Serif Local";
    src: url("../fonts/PTSerif-Bold.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

:root {
    --accent: #1D5EF4;
    --accent-dark: #174BC5;
    --ink: #20242a;
    --muted: #7a828b;
    --line: #e8ebee;
    --surface: #ffffff;
    --page: #f4f6f7;
    --radius: 14px;
    --container: 1200px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--page); font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 1.55; }
a { color: inherit; text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; }
.container { width: min(var(--container), calc(100% - 40px)); margin: 0 auto; }
.topline { background: #20242a; color: #dce0e3; font-size: 12px; }
.topline-inner, .topline-left, .topline-links { display: flex; align-items: center; }
.topline-inner { min-height: 34px; justify-content: space-between; gap: 20px; }
.topline-left, .topline-links { gap: 20px; }
.topline-date { color: #fff; font-weight: 700; }
.topline-links a { color: #dce0e3; }
.site-header { position: relative; z-index: 100; background: #fff; }
.brand-row {
    min-height: 94px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}
.navbar-brand {
    display: flex;
    align-items: center;
    flex: 0 0 230px;
    width: 230px;
}
.navbar-brand img {
    display: block;
    width: 100%;
    max-width: 230px;
    height: 55px;
    object-fit: contain;
}
.header-banner {
    display: block;
    flex: 0 0 320px;
    width: 320px;
    height: 50px;
    min-height: 50px;
}
.header-tools {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; background: var(--accent); color: #fff; font-size: 30px; line-height: 1; font-weight: 800; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy strong { font-size: 21px; letter-spacing: -.6px; font-weight: 800; }
.brand-copy small { margin-top: 5px; color: var(--muted); font-size: 11px; letter-spacing: 1.1px; text-transform: uppercase; }
.header-tools { display: flex; align-items: center; gap: 16px; }
.search-form { display: flex; width: 245px; height: 42px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fafbfc; }
.search-form input { width: 100%; min-width: 0; padding: 0 12px; border: 0; outline: 0; background: transparent; font: inherit; font-size: 13px; }
.search-form button { width: 44px; flex: 0 0 44px; border: 0; background: transparent; cursor: pointer; }
.search-icon { display: inline-block; width: 15px; height: 15px; border: 2px solid #555e67; border-radius: 50%; position: relative; }
.search-icon:after { content: ''; position: absolute; width: 7px; height: 2px; background: #555e67; right: -5px; bottom: -3px; transform: rotate(45deg); }
.submit-news, .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
.submit-news:hover, .button:hover { color: #fff; background: var(--accent-dark); }
.submit-news span { font-size: 18px; line-height: 1; }
.nav-wrap { position: sticky; top: 0; z-index: 100; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: 0 4px 14px rgba(25, 35, 45, .04); }
.nav-inner { min-height: 54px; display: flex; align-items: center; }
.main-nav { width: 100%; }
.main-nav > ul { display: flex; align-items: stretch; gap: 0; padding: 0; margin: 0; list-style: none; }
.main-nav li { position: relative; }
.main-nav > ul > li > a { display: flex; align-items: center; min-height: 54px; padding: 0 15px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.main-nav > ul > li:first-child > a { padding-left: 0; }
.main-nav > ul > li:hover > a, .main-nav > ul > li:focus-within > a { color: var(--accent); }
.has-submenu { display: flex; align-items: center; }
.submenu-toggle { width: 22px; height: 30px; padding: 0; border: 0; background: transparent; color: #7a828b; cursor: pointer; }
.submenu { display: none; position: absolute; top: 100%; left: 0; min-width: 205px; padding: 8px; margin: 0; list-style: none; border: 1px solid var(--line); border-radius: 0 0 10px 10px; background: #fff; box-shadow: 0 12px 28px rgba(25, 35, 45, .12); }
.has-submenu:hover > .submenu, .has-submenu:focus-within > .submenu, .has-submenu.is-open > .submenu { display: block; }
.submenu a { display: block; padding: 9px 11px; border-radius: 6px; font-size: 13px; }
.submenu a:hover { background: #eef3ff; }
.mobile-menu-toggle { display: none; }
.site-main { padding-top: 26px; padding-bottom: 60px; }
.lead-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; margin-bottom: 34px; }
.lead-secondary { display: grid; grid-template-rows: 1fr 1fr; gap: 16px; min-height: 420px; }
.lead-card { position: relative; min-height: 202px; overflow: hidden; border-radius: var(--radius); background: #343a40; }
.lead-card-main { min-height: 420px; }
.lead-image { position: absolute; inset: 0; display: block; }
.lead-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.lead-card:hover .lead-image img { transform: scale(1.035); }
.lead-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.02) 20%, rgba(0,0,0,.78) 100%); }
.lead-content { position: absolute; left: 28px; right: 28px; bottom: 25px; z-index: 2; color: #fff; }
.lead-content h1 { max-width: 760px; margin: 12px 0 12px; font-size: clamp(25px, 3.1vw, 39px); line-height: 1.13; letter-spacing: -.8px; }
.lead-card-small .lead-content { left: 20px; right: 20px; bottom: 18px; }
.lead-card-small .lead-content h2 { margin: 8px 0; font-size: 20px; line-height: 1.2; }
.category-label { display: inline-block; padding: 4px 8px; border-radius: 5px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.news-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 11px; }
.lead-content .news-meta { color: rgba(255,255,255,.78); }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 28px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 13px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0; font-size: 23px; line-height: 1.2; letter-spacing: -.5px; }
.section-heading > a { color: var(--accent); font-size: 12px; font-weight: 700; white-space: nowrap; }
.news-feed { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.news-card, .topic-card, .sidebar-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.news-card-image, .topic-image { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; background: #e8ecef; }
.news-card-image img, .topic-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.news-card:hover img, .topic-card:hover img { transform: scale(1.04); }
.news-card-image .category-label { position: absolute; left: 12px; bottom: 12px; }
.news-card-body, .topic-body { padding: 15px 16px 17px; }
.news-card h3, .topic-card h3 { margin: 8px 0; font-size: 17px; line-height: 1.3; }
.news-card p { margin: 0; color: #68717b; font-size: 13px; line-height: 1.5; }
.feed-more { padding: 25px 0 10px; text-align: center; }
.button-outline { border: 1px solid #d9dfe4; background: #fff; color: var(--ink); }
.button-outline:hover { border-color: var(--accent); background: var(--accent); color: #fff; }
.sidebar { display: grid; gap: 18px; }
.sidebar-card { padding: 18px; }
.sidebar-card .section-heading { margin-bottom: 8px; }
.sidebar-card .section-heading h2 { font-size: 19px; }
.popular-item { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.popular-item:last-child { border-bottom: 0; }
.popular-number { color: #d5dbe0; font-size: 22px; font-weight: 800; line-height: 1.1; }
.popular-item h3 { margin: 0 0 5px; font-size: 13px; line-height: 1.35; }
.sidebar-banner { padding: 22px; border-radius: var(--radius); background: #242a31; color: #fff; }
.sidebar-banner .eyebrow { color: #9bb8ff; font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.sidebar-banner h2 { margin: 9px 0; font-size: 23px; line-height: 1.15; }
.sidebar-banner p { margin: 0; color: #c4cbd1; font-size: 13px; }
.topic-section { margin-top: 42px; }
.topic-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.topic-card h3 { font-size: 15px; }
.inner-layout { margin-top: 12px; }
.fullstory, .static-page, .system-message, .search-page { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.article-heading h1 { margin: 12px 0 16px; font-size: clamp(28px, 4vw, 42px); line-height: 1.13; letter-spacing: -1px; }
.article-subtitle { color: #68717b; font-size: 18px; }
.article-cover { margin: 22px 0; overflow: hidden; border-radius: 12px; }
.article-cover img { width: 100%; height: auto; }
.article-text { font-size: 17px; line-height: 1.8; }
.article-text img { max-width: 100%; height: auto; border-radius: 10px; }
.article-text a { color: var(--accent); text-decoration: underline; }
.article-footer { display: flex; align-items: center; gap: 16px; padding-top: 22px; margin-top: 30px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 700; }
.article-share { display: flex; gap: 8px; }
.article-share a { padding: 6px 10px; border-radius: 6px; background: #f1f3f5; font-size: 12px; }
.pagination { display: flex; justify-content: center; gap: 6px; padding: 28px 0; }
.pagination a, .pagination span { min-width: 34px; padding: 7px 10px; border-radius: 6px; background: #fff; text-align: center; }
.pagination .current, .pagination span { background: var(--accent); color: #fff; }
.site-footer { background: #20242a; color: #fff; }
.footer-main { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 40px; padding-top: 38px; padding-bottom: 34px; }
.brand-footer .brand-copy small { color: #aeb6bd; }
.footer-description { align-self: center; margin: 0; color: #c0c6cb; font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid #3b4249; }
.footer-links a { color: #d5dade; font-size: 12px; }
.footer-bottom { padding: 13px 0; background: #171a1f; color: #9da5ac; font-size: 11px; }
.system-message h1, .static-page h1, .search-page h1 { margin-top: 0; }
.comment-item { padding: 15px; margin: 12px 0; border-radius: 9px; background: #f5f6f7; }
.comment-author { font-weight: 700; }
.comment-date { color: var(--muted); font-size: 11px; }
.comment-form { margin-top: 20px; }
@media (max-width: 900px) {
    .container { width: min(var(--container), calc(100% - 28px)); }
    .brand-row { gap: 16px; }
    .navbar-brand { flex-basis: 200px; width: 200px; }
    .navbar-brand img { max-width: 200px; }
    .header-banner { flex-basis: 280px; width: 280px; }
    .header-tools { gap: 9px; }
    .search-form { width: 200px; }
    .main-nav > ul > li > a { padding: 0 9px; font-size: 12px; }
    .content-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 18px; }
    .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .topline-links, .topline-city { display: none; }
    .brand-row { min-height: 76px; gap: 12px; }
    .navbar-brand { flex: 0 1 190px; width: 190px; }
    .navbar-brand img { max-width: 190px; height: 48px; }
    .header-banner { display: none; }
    .brand-mark { width: 42px; height: 42px; font-size: 26px; }
    .brand-copy strong { font-size: 17px; }
    .header-tools { margin-left: auto; }
    .search-form { width: 42px; border: 0; background: #f3f5f6; }
    .search-form input { display: none; }
    .search-form button { width: 42px; flex-basis: 42px; }
    .submit-news { display: none; }
    .nav-inner { min-height: 48px; }
    .mobile-menu-toggle { display: inline-flex; align-items: center; gap: 5px; padding: 8px 0; border: 0; background: transparent; color: var(--ink); font-size: 13px; font-weight: 700; }
    .mobile-menu-toggle span { display: block; width: 16px; height: 2px; background: var(--ink); }
    .mobile-menu-toggle b { margin-left: 5px; }
    .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 8px 14px 15px; border-bottom: 1px solid var(--line); background: #fff; box-shadow: 0 12px 20px rgba(20,30,40,.1); }
    .nav-wrap.menu-open .main-nav { display: block; }
    .main-nav > ul { display: block; }
    .main-nav > ul > li { display: flex; flex-wrap: wrap; border-bottom: 1px solid #f0f1f2; }
    .main-nav > ul > li > a { min-height: 42px; flex: 1; padding: 0 5px; font-size: 14px; }
    .main-nav > ul > li:first-child > a { padding-left: 5px; }
    .submenu-toggle { width: 42px; height: 42px; }
    .submenu { position: static; width: 100%; border: 0; border-radius: 0; box-shadow: none; padding: 0 0 8px 15px; }
    .has-submenu.is-open > .submenu { display: block; }
    .site-main { padding-top: 16px; }
    .lead-grid { grid-template-columns: 1fr; gap: 12px; }
    .lead-card-main { min-height: 310px; }
    .lead-secondary { min-height: auto; grid-template-columns: 1fr 1fr; grid-template-rows: auto; gap: 12px; }
    .lead-card-small { min-height: 170px; }
    .lead-content { left: 17px; right: 17px; bottom: 17px; }
    .lead-content h1 { font-size: 25px; }
    .lead-card-small .lead-content { left: 12px; right: 12px; bottom: 12px; }
    .lead-card-small .lead-content h2 { font-size: 15px; }
    .content-layout { grid-template-columns: 1fr; }
    .sidebar { grid-template-columns: 1fr; }
    .news-feed { grid-template-columns: 1fr; gap: 13px; }
    .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .topic-body { padding: 11px; }
    .topic-card h3 { font-size: 13px; }
    .fullstory, .static-page, .system-message, .search-page { padding: 18px; }
    .article-text { font-size: 16px; }
    .footer-main { grid-template-columns: 1fr; gap: 15px; }
    .footer-links { grid-column: auto; gap: 12px; }
}
@media (max-width: 390px) {
    .lead-secondary { grid-template-columns: 1fr; }
    .lead-card-small { min-height: 185px; }
    .topic-grid { grid-template-columns: 1fr; }
}

/* IRK.Today-inspired homepage additions */
:root { --accent: #1D5EF4; --accent-dark: #174BC5; --page: #ffffff; --line: #e6e9ef; --radius: 15px; }
body { background: #fff; }
.lead-grid-single { display: block; margin-bottom: 16px; }
.lead-grid-single .lead-card-main { min-height: 430px; }
.under-lead-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 0 0 38px; }
.under-lead-grid .lead-card-small { min-height: 225px; }
.nav-wrap { position: sticky; top: 0; z-index: 500; }
.nav-wrap.is-scrolled { box-shadow: 0 5px 22px rgba(30,42,70,.12); }
/* Pulse side drawer */
.pulse-open { position: fixed; z-index: 700; left: 0; top: 42%; padding: 14px 10px; border: 0; border-radius: 0 9px 9px 0; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 1px; writing-mode: vertical-rl; transform: rotate(180deg); cursor: pointer; box-shadow: 0 5px 18px rgba(40,80,180,.22); }
.pulse-backdrop { position: fixed; z-index: 799; inset: 0; background: rgba(24,30,42,.35); opacity: 0; visibility: hidden; transition: .25s ease; }
.pulse-drawer { position: fixed; z-index: 800; top: 0; bottom: 0; left: 0; width: min(400px, 100vw); overflow-y: auto; background: #fff; box-shadow: 14px 0 40px rgba(20,30,50,.16); transform: translateX(-105%); transition: transform .28s ease; }
.pulse-drawer.is-open { transform: translateX(0); }
.pulse-backdrop.is-open { opacity: 1; visibility: visible; }
.pulse-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 20px 26px; border-bottom: 1px solid var(--line); background: #fff; }
.pulse-head strong { font-size: 27px; line-height: 1.2; }
.pulse-close { width: 42px; height: 42px; border: 1px solid #dfe3e9; border-radius: 10px; background: #fff; color: #667080; font-size: 30px; line-height: 1; cursor: pointer; }
.pulse-tabs { display: flex; gap: 8px; padding: 22px 26px 14px; }
.pulse-tabs button { padding: 12px 18px; border: 0; border-radius: 16px; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.pulse-tabs button.is-active { background: #eaf0ff; color: var(--accent); }
.pulse-panel { display: none; padding: 0 26px 28px; }
.pulse-panel.is-active { display: block; }
.pulse-item { position: relative; padding: 15px 0 19px 42px; border-left: 3px solid #e2e5eb; margin-left: 8px; }
.pulse-item:before { content: ''; position: absolute; left: -9px; top: 24px; width: 15px; height: 15px; border: 2px solid #fff; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pulse-item:first-child:before { width: 23px; height: 23px; left: -13px; top: 20px; background: #fff; border: 5px solid var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pulse-time { display: block; margin-bottom: 5px; color: #788293; font-size: 13px; font-weight: 700; }
.pulse-item > a { display: block; color: #252a33; font-size: 17px; line-height: 1.4; }
.pulse-item > a:hover { color: var(--accent); }
.pulse-more { display: inline-block; margin: 12px 0 10px 42px; color: var(--accent); font-weight: 700; }
.pulse-note { margin: 12px 0 18px 42px; color: #667080; }
@media (max-width: 700px) {
    .lead-grid-single .lead-card-main { min-height: 320px; }
    .under-lead-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 26px; }
    .under-lead-grid .lead-card-small { min-height: 155px; }
    .under-lead-grid .lead-card-small .lead-content h2 { font-size: 15px; }
    .pulse-open { top: auto; bottom: 28%; padding: 12px 8px; }
    .pulse-head { padding: 17px 18px; }
    .pulse-tabs { padding: 17px 16px 12px; gap: 3px; }
    .pulse-tabs button { padding: 10px 12px; font-size: 14px; }
    .pulse-panel { padding: 0 17px 24px; }
    .pulse-item > a { font-size: 16px; }
}


/* Homepage lead + right news column */
.homepage-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
    gap: 12px;
    align-items: stretch;
    margin-bottom: 38px;
}
.homepage-lead-column { min-width: 0; }
.homepage-lead-column .lead-grid-single { margin-bottom: 12px; }
.homepage-lead-column .lead-grid-single .lead-card-main { min-height: 430px; }
.homepage-lead-column .under-lead-grid { margin-bottom: 0; gap: 12px; }
.homepage-lead-column .under-lead-grid .lead-card-small { min-height: 205px; }
.homepage-right-column {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 14px;
    padding: 0 0 0 2px;
}
.right-news-list {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}
.right-news-item { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.right-news-item:last-child { border-bottom: 0; }
.right-news-image { display: block; overflow: hidden; margin: 0 0 9px; border-radius: 9px; aspect-ratio: 16 / 7; background: #edf0f4; }
.right-news-image img { width: 100%; height: 100%; object-fit: cover; }
.right-news-content .category-label { padding: 3px 7px; background: #eaf0ff; color: var(--accent); font-size: 10px; }
.right-news-content h3 { margin: 7px 0 8px; font-size: 15px; line-height: 1.32; }
.right-news-content .news-meta { font-size: 11px; }
.homepage-ad-slot {
    display: flex;
    min-height: 105px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 18px;
    border: 1px dashed #cbd4e5;
    border-radius: var(--radius);
    background: #f3f6ff;
    color: #7a8497;
    text-align: center;
}
.homepage-ad-slot span { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.homepage-ad-slot strong { color: #39445a; font-size: 14px; }
.homepage-ad-slot small { font-size: 11px; }
/* Sticky navigation: now a direct child of body, not constrained by header height */
.nav-wrap { position: sticky; top: 0; z-index: 600; }
.nav-wrap.is-scrolled { box-shadow: 0 5px 22px rgba(30,42,70,.14); }
@media (max-width: 900px) {
    .homepage-top-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, .85fr); gap: 12px; }
    .homepage-lead-column .lead-grid-single .lead-card-main { min-height: 360px; }
    .homepage-lead-column .under-lead-grid .lead-card-small { min-height: 170px; }
    .right-news-item { padding: 10px 12px; }
    .right-news-content h3 { font-size: 13px; }
}
@media (max-width: 700px) {
    .homepage-top-grid { grid-template-columns: 1fr; }
    .homepage-lead-column .lead-grid-single .lead-card-main { min-height: 320px; }
    .homepage-lead-column .under-lead-grid .lead-card-small { min-height: 155px; }
    .homepage-right-column { padding: 0; }
    .right-news-image { aspect-ratio: 16 / 8; }
    .right-news-content h3 { font-size: 15px; }
    .homepage-ad-slot { min-height: 90px; }
}


/* Sticky brand header + navigation */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 650;
    background: #fff;
}

.sticky-header .site-header {
    position: relative;
    z-index: 1;
}

.sticky-header .nav-wrap {
    position: relative;
    top: auto;
    z-index: 2;
}

.sticky-header.is-scrolled {
    box-shadow: 0 5px 22px rgba(30, 42, 70, .14);
}

/* Pulse drawer: fixed 400px desktop panel, full viewport height */
.pulse-drawer {
    width: 400px;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.pulse-head {
    min-height: 100px;
}

@media (max-width: 420px) {
    .pulse-drawer {
        width: 100vw;
    }
}

/* Pulse drawer: fixed 400px panel with independently scrolling news list */
.pulse-drawer {
    width: 400px;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.pulse-head,
.pulse-tabs {
    flex: 0 0 auto;
}
.pulse-panel {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}
.pulse-panel.is-active {
    display: block;
}
.pulse-time {
    white-space: nowrap;
}
.pulse-item > a {
    overflow-wrap: anywhere;
}
@media (max-width: 700px) {
    .pulse-drawer {
        width: 100vw;
        max-width: 100vw;
    }
}


/* v7: строгие прямые углы для блока «Популярное» и полной новости.
   Остальные элементы дизайна и скругления не затрагиваются. */
.sidebar-card {
    border-radius: 0;
}

.fullstory {
    border-radius: 0;
}

.fullstory .article-cover {
    border-radius: 0;
}

.fullstory .article-text img {
    border-radius: 0;
}


/* v8: Fotorama photo gallery in full article */
.article-gallery {
    margin: 34px 0;
}
.article-gallery-title {
    margin: 0 0 16px;
    color: var(--ink);
    font-size: 23px;
    line-height: 1.25;
}
.article-gallery .fotorama {
    max-width: 100%;
    background: #171a1f;
}
.article-gallery .fotorama__stage,
.article-gallery .fotorama__nav,
.article-gallery .fotorama__thumb,
.article-gallery .fotorama__img {
    border-radius: 0 !important;
}
.article-gallery .fotorama__nav-wrap {
    padding-top: 8px;
}
@media (max-width: 700px) {
    .article-gallery {
        margin: 26px 0;
    }
    .article-gallery-title {
        font-size: 20px;
    }
}


/* v9: typography inspired by the supplied DLE reference screenshots */
body,
button,
input,
textarea,
select {
    font-family: "Open Sans Local", Arial, sans-serif;
}

.article-heading h1,
.article-text h1,
.article-text h2,
.article-text h3 {
    font-family: "PT Serif Local", Georgia, serif;
}

.article-heading h1 {
    font-weight: 700;
    letter-spacing: -0.45px;
}

.article-subtitle {
    font-family: "Open Sans Local", Arial, sans-serif;
    font-weight: 400;
}

.section-heading h2,
.news-card h3,
.topic-card h3,
.popular-item h3,
.lead-content h1,
.lead-content h2 {
    font-family: "Open Sans Local", Arial, sans-serif;
}


/* v10: DLE conditional placeholder when the full article has no image */
.article-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    margin: 22px 0;
    overflow: hidden;
    background: #f1f2f3;
    border: 1px solid #e3e5e7;
    border-radius: 0;
}

.no-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 30px 20px;
    color: #9299a1;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.no-photo-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border: 2px solid #c7ccd1;
    border-radius: 50%;
    color: #aeb5bc;
    font-size: 30px;
    line-height: 1;
}

@media (max-width: 700px) {
    .article-cover-placeholder {
        min-height: 190px;
    }
}


/* v13: quote blocks in DLE full-story output */
.article-text blockquote,
.article-text .quote,
.article-text .bbquote,
.article-text .quote-block {
    display: block;
    margin: 28px 0;
    padding: 24px 26px;
    border: 0;
    border-left: 5px solid #ed315b;
    background: #f1f2f4;
    color: #303342;
    font-size: 20px;
    font-style: italic;
    font-weight: 600;
    line-height: 1.8;
}
.article-text blockquote p,
.article-text .quote p,
.article-text .bbquote p,
.article-text .quote-block p {
    margin: 0;
}
.article-text blockquote p + p,
.article-text .quote p + p,
.article-text .bbquote p + p,
.article-text .quote-block p + p {
    margin-top: 12px;
}
/* DLE may wrap the quote label separately from its body */
.article-text .title_quote {
    margin: 0 0 8px;
    color: #303342;
    font-size: 0;
    line-height: 0;
}
.article-text .title_quote + div,
.article-text .quote > div:last-child {
    font-style: italic;
}

/* v13: related-news slider */
.related-news {
    margin: 38px 0 12px;
    padding: 22px 0;
}
.related-news-title {
    margin: 0 0 18px;
    color: var(--ink);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .3px;
}
.related-news-slider {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 190px;
    padding: 20px 24px;
    overflow: hidden;
    border-radius: 12px;
    background: #f1f2f4;
}
.related-news-viewport {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}
.related-news-track {
    display: flex;
    align-items: stretch;
    transition: transform .35s ease;
    will-change: transform;
}
.related-news-item {
    display: flex;
    flex: 0 0 50%;
    min-width: 0;
    min-height: 150px;
    align-items: center;
    justify-content: center;
    padding: 0 28px;
    border-right: 4px solid #dedfe2;
    box-sizing: border-box;
}
.related-news-item:last-child {
    border-right: 0;
}
.related-news-item a {
    display: block;
    width: 100%;
    color: var(--ink);
    font-size: 21px;
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
    text-decoration: none;
}
.related-news-item a:hover {
    color: var(--accent);
}
.related-news-prev,
.related-news-next {
    display: grid;
    flex: 0 0 48px;
    place-items: center;
    width: 48px;
    height: 60px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: #dedfe2;
    color: #62666d;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
}
.related-news-next {
    background: var(--accent);
    color: #fff;
}
.related-news-prev:disabled,
.related-news-next:disabled {
    opacity: .45;
    cursor: default;
}
@media (max-width: 700px) {
    .article-text blockquote,
    .article-text .quote,
    .article-text .bbquote,
    .article-text .quote-block {
        margin: 22px 0;
        padding: 17px 18px;
        font-size: 16px;
        line-height: 1.65;
    }
    .related-news {
        margin-top: 28px;
    }
    .related-news-title {
        font-size: 17px;
    }
    .related-news-slider {
        gap: 8px;
        min-height: 160px;
        padding: 12px 8px;
        border-radius: 8px;
    }
    .related-news-prev,
    .related-news-next {
        flex-basis: 36px;
        width: 36px;
        height: 46px;
        border-radius: 8px;
        font-size: 28px;
    }
    .related-news-item {
        flex-basis: 100%;
        min-height: 130px;
        padding: 0 12px;
        border-right: 0;
    }
    .related-news-item a {
        font-size: 17px;
    }
}


/* v15: keep images and adjacent text on the same line in static pages */
.static-page img {
    display: inline-block;
    max-width: 100%;
    height: auto;
    margin-right: 8px;
    vertical-align: middle;
}


/* v17: two-column editorial grid for category archive pages */
.category-news-feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 34px 28px;
}
.category-news-feed .news-card {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.category-news-feed .news-card-image {
    aspect-ratio: 16 / 9;
    border-radius: 9px;
}
.category-news-feed .news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.category-news-feed .news-card-body {
    padding: 14px 0 0;
}
.category-news-feed .news-meta,
.category-news-feed .news-card-body > p {
    display: none;
}
.category-news-feed .news-card h3 {
    margin: 0;
    color: var(--ink);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}
.category-news-feed .news-card h3 a {
    color: inherit;
}
.category-news-feed .news-card h3 a:hover {
    color: var(--accent);
}
@media (max-width: 700px) {
    .category-news-feed {
        grid-template-columns: 1fr;
        gap: 26px;
    }
    .category-news-feed .news-card h3 {
        font-size: 19px;
    }
}

/* Точечные правки: скругление блока боковой колонки и снятие рамки полной новости */
.sidebar-card {
    border-radius: 16px;
}

.fullstory {
    border: 0;
    border-radius: 0;
    background: transparent;
}


/* v18: fullstory without outer frame; rounded Popular sidebar card */
.fullstory {
    border: 0 !important;
    border-radius: 0;
    background: transparent;
}

.sidebar-card {
    border-radius: var(--radius);
    overflow: hidden;
}


/* v20: header banner slot between logo and navigation tools */
.header-banner-slot {
    display: block;
    width: min(790px, 100%);
    max-width: 790px;
    height: 90px;
    margin: 0 auto;
}

/* v20: menu arrows below each menu title, centered */
@media (min-width: 701px) {
    .main-nav > ul > li.has-submenu {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding-bottom: 5px;
    }

    .main-nav > ul > li.has-submenu > a {
        min-height: 40px;
        padding-bottom: 0;
    }

    .main-nav > ul > li.has-submenu > .submenu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 14px;
        margin: -1px 0 0;
        padding: 0;
        line-height: 1;
    }

    .main-nav > ul > li.has-submenu > .submenu {
        top: 100%;
    }
}

/* v20: centered currency, weather and advertising row above the two lead stories */
.lead-tools-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin: 0 0 14px;
    text-align: center;
}

.lead-tools-modules {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px 28px;
    width: 100%;
    text-align: center;
}

.lead-tools-currency,
.lead-tools-weather {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    text-align: center;
}

.lead-tools-ad {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 90px;
    text-align: center;
}

.lead-tools-ad > div {
    max-width: 100%;
}

/* v20: square image corners on homepage only; keep hover zoom and transitions */
.homepage-top-grid .lead-card,
.homepage-top-grid .lead-image,
.homepage-top-grid .right-news-image,
body:has(.homepage-top-grid) .news-card-image,
body:has(.homepage-top-grid) .topic-image {
    border-radius: 0 !important;
}

body:has(.homepage-top-grid) .news-card,
body:has(.homepage-top-grid) .topic-card {
    overflow: visible;
}

body:has(.homepage-top-grid) .news-card-image,
body:has(.homepage-top-grid) .topic-image {
    overflow: hidden;
}

/* v20: full story without outer frame; rounded and filled right column */
.fullstory {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.fullstory + .sidebar,
.content-layout:has(.fullstory) > .sidebar {
    position: sticky;
    top: 250px;
    align-self: start;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 3px 14px rgba(25, 35, 45, .04);
}

.content-layout:has(.fullstory) > .sidebar .sidebar-card {
    border-radius: var(--radius);
    overflow: hidden;
}

@media (max-width: 700px) {
    .header-banner-slot {
        width: 100%;
        height: 90px;
    }

    .lead-tools-row {
        gap: 10px;
        margin-bottom: 12px;
    }

    .lead-tools-ad {
        min-height: 90px;
        overflow: hidden;
    }

    .content-layout:has(.fullstory) > .sidebar {
        position: static;
        top: auto;
        padding: 12px;
    }
}


/* v21: replace submenu arrows with a short red underline */
.main-nav > ul > li.has-submenu > .submenu-toggle {
    display: none !important;
}

.main-nav > ul > li.has-submenu > a {
    position: relative;
}

.main-nav > ul > li.has-submenu > a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 7px;
    width: 28px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    transform: translateX(-50%);
}

/* v21: one frame only around the sidebar card; keep the column sticky */
.content-layout:has(.fullstory) > .sidebar,
.fullstory + .sidebar {
    position: sticky;
    top: 165px;
    align-self: start;
    height: max-content;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.content-layout:has(.fullstory) > .sidebar .sidebar-card,
.fullstory + .sidebar .sidebar-card {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
    box-shadow: 0 3px 14px rgba(25, 35, 45, .04);
}

@media (max-width: 700px) {
    .main-nav > ul > li.has-submenu > a::after {
        left: 5px;
        bottom: 5px;
        transform: none;
    }

    .content-layout:has(.fullstory) > .sidebar,
    .fullstory + .sidebar {
        position: static;
        top: auto;
        padding: 0;
    }
}


/* Dni.news identity and homepage pulse timeline */
.navbar-brand img {
    display: block;
    width: min(230px, 42vw);
    height: auto;
}

.pulse-feed {
    display: flex;
    flex-direction: column;
}

.pulse-item {
    display: grid;
    grid-template-columns: 112px 22px minmax(0, 1fr);
    column-gap: 14px;
    align-items: start;
    position: relative;
    padding: 0 0 24px;
    margin: 0;
    border: 0;
}

.pulse-time {
    display: block;
    padding-top: 2px;
    margin: 0;
    color: #747b86;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

.pulse-timeline-mark {
    position: relative;
    display: block;
    width: 22px;
    min-height: 100%;
}

.pulse-timeline-mark::before {
    content: "";
    position: absolute;
    top: 9px;
    bottom: -24px;
    left: 10px;
    width: 1px;
    background: #dce4f3;
}

.pulse-timeline-mark::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    width: 11px;
    height: 11px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.pulse-item:last-child .pulse-timeline-mark::before {
    display: none;
}

.pulse-content {
    min-width: 0;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--line);
}

.pulse-item:last-child .pulse-content {
    border-bottom: 0;
}

.pulse-title {
    display: block;
    color: #252a33;
    font-size: 17px;
    line-height: 1.45;
    font-weight: 600;
}

.pulse-title:hover {
    color: var(--accent);
}

.pulse-photo {
    max-width: 520px;
    margin-top: 12px;
    overflow: hidden;
    border-radius: 9px;
    background: #f0f2f5;
}

.pulse-photo img {
    display: block;
    width: 100%;
    max-height: 300px;
    object-fit: cover;
}

#dniLoadMore {
    min-width: 190px;
    cursor: pointer;
}

#dniLoadMore:disabled {
    opacity: .65;
    cursor: wait;
}

@media (max-width: 700px) {
    .pulse-item {
        grid-template-columns: 82px 18px minmax(0, 1fr);
        column-gap: 9px;
        padding-bottom: 18px;
    }

    .pulse-time {
        font-size: 11px;
    }

    .pulse-timeline-mark {
        width: 18px;
    }

    .pulse-timeline-mark::before {
        left: 8px;
        bottom: -18px;
    }

    .pulse-timeline-mark::after {
        left: 3px;
        width: 10px;
        height: 10px;
    }

    .pulse-title {
        font-size: 15px;
    }

    .pulse-content {
        padding-bottom: 14px;
    }
}


/* DNI: remove legacy duplicate timeline dots; keep the new timeline marker */
.pulse-item::before {
    display: none !important;
}
/* ДНИ: лёгкое скругление главной фотографии */
.content-section.contentimg-section .mini-news-thumb:first-child {
    border-radius: 8px;
    overflow: hidden;
}

/* DNI: вернуть лёгкое скругление фотографии главной новости */
.homepage-top-grid .lead-card,
.homepage-top-grid .lead-image {
    border-radius: 8px !important;
    overflow: hidden;
}

/* DNI: автоматическая бесконечная загрузка полной новости */
.dni-infinite-trigger {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 22px 12px 10px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.dni-infinite-retry[hidden] {
    display: none !important;
}


/* DNI: закругление фотографии главной новости на главной странице */
.homepage-top-grid .lead-card-main,
.homepage-top-grid .lead-card-main .lead-image {
    border-radius: 10px !important;
    overflow: hidden;
}
