:root {
  --accent: #1597c7;
  --accent-strong: color-mix(in srgb, var(--accent) 78%, #052c3b);
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --warning: #f5b900;
  --danger: #dc2f3f;
  --success: #10986d;
  --bg: #f3f6f8;
  --surface: #fff;
  --surface-2: #f8fafc;
  --surface-3: #eef3f6;
  --ink: #142235;
  --text: #26384a;
  --muted: #6b7c8f;
  --border: #dbe4ea;
  --border-strong: #c9d6de;
  --shadow-sm: 0 1px 2px rgba(18, 34, 53, .05), 0 5px 16px rgba(18, 34, 53, .04);
  --shadow-md: 0 14px 34px rgba(18, 34, 53, .10);
  --radius-sm: 8px;
  --radius: 13px;
  --radius-lg: 20px;
  --font-sans: "Vazirmatn", "IRANSansX", "Segoe UI", Tahoma, Arial, sans-serif;
  --container: 1320px;
  --font-step: 0px;
  --header-offset: 54px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0e1621;
  --surface: #151f2c;
  --surface-2: #1b2735;
  --surface-3: #202f3f;
  --ink: #f0f6fa;
  --text: #d8e3eb;
  --muted: #93a6b5;
  --border: #2d3e4e;
  --border-strong: #3b5062;
  --accent-soft: color-mix(in srgb, var(--accent) 18%, transparent);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .16), 0 8px 24px rgba(0, 0, 0, .16);
  --shadow-md: 0 18px 44px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

html[data-font-scale="0"] { --font-step: -2px; }
html[data-font-scale="1"] { --font-step: -1px; }
html[data-font-scale="2"] { --font-step: 0px; }
html[data-font-scale="3"] { --font-step: 1px; }
html[data-font-scale="4"] { --font-step: 2px; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: calc(16px + var(--font-step)); }
body {
  margin: 0;
  direction: rtl;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .2s ease, color .2s ease;
}
body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
iframe { max-width: 100%; }
a { color: var(--accent-strong); text-decoration: none; transition: color .16s ease, background-color .16s ease, border-color .16s ease; }
a:hover { color: var(--accent); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 3px; }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }

h1, h2, h3, h4, h5, h6 { margin: 0 0 .75rem; color: var(--ink); line-height: 1.55; font-weight: 800; }
p { margin: 0 0 1rem; }
ul, ol { padding-right: 1.3rem; }
hr { border: 0; border-top: 1px solid var(--border); }

.container { width: min(calc(100% - 32px), var(--container)); margin-inline: auto; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.site-main { min-height: 56vh; }
.page-shell { padding-block: 24px 48px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { position: fixed !important; top: 10px; right: 10px; z-index: 9999; width: auto; height: auto; padding: 12px 16px; clip: auto; background: var(--surface); color: var(--ink); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); }
.icon { width: 1.15em; height: 1.15em; flex: 0 0 auto; vertical-align: -.16em; }

/* Tooltips */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 150;
  bottom: calc(100% + 9px);
  right: 50%;
  transform: translate(50%, 5px);
  width: max-content;
  max-width: 220px;
  padding: 6px 9px;
  border-radius: 7px;
  background: #0d1824;
  color: #fff;
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
  box-shadow: 0 7px 18px rgba(0,0,0,.18);
}
[data-tooltip]::before {
  content: "";
  position: absolute;
  z-index: 151;
  bottom: calc(100% + 4px);
  right: 50%;
  transform: translateX(50%);
  border: 5px solid transparent;
  border-top-color: #0d1824;
  opacity: 0;
  visibility: hidden;
}
[data-tooltip]:hover::after, [data-tooltip]:focus-visible::after, [data-tooltip]:hover::before, [data-tooltip]:focus-visible::before { opacity: 1; visibility: visible; }
[data-tooltip]:hover::after, [data-tooltip]:focus-visible::after { transform: translate(50%, 0); }

/* Buttons */
.icon-button, .tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  cursor: pointer;
  transition: transform .14s ease, background-color .14s ease, color .14s ease, border-color .14s ease;
}
.icon-button:hover, .tool-button:hover { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 38%, var(--border)); color: var(--accent-strong); }
.icon-button:active, .tool-button:active { transform: translateY(1px); }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 750;
  cursor: pointer;
}
.button:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.button--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button--primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }

/* Header */
.site-header { position: relative; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar { background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: .78rem; color: var(--muted); }
.topbar__inner { min-height: 38px; display: flex; align-items: center; gap: 18px; }
.topbar__date { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-weight: 650; }
.topbar__notice { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; color: var(--text); }
.topbar__tools { margin-right: auto; display: flex; align-items: center; gap: 4px; }
.topbar__tools .tool-button { width: 28px; min-width: 28px; height: 28px; padding: 0; border-color: transparent; background: transparent; }
.topbar__zoom-label { font-size: .72rem; margin-inline: 2px; }
.icon-sun { display: none; }
html[data-theme="dark"] .icon-moon { display: none; }
html[data-theme="dark"] .icon-sun { display: block; }

.masthead { background: var(--surface); }
.masthead__inner { min-height: 94px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 28px; }
.site-branding { min-width: 250px; }
.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo { width: auto; max-width: 250px; max-height: 68px; }
.brand-mark { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.brand-mark:hover { color: var(--ink); }
.brand-mark__symbol { position: relative; display: flex; align-items: end; gap: 3px; width: 54px; height: 48px; padding: 4px; border-radius: 13px; background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 72%, #63d9ff)); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.brand-mark__symbol::after { content: ""; position: absolute; left: -12px; right: -12px; top: 24px; height: 6px; transform: rotate(-12deg); background: var(--warning); box-shadow: 0 0 0 2px rgba(255,255,255,.18); }
.brand-mark__symbol span { position: relative; z-index: 1; display: block; width: 9px; border-radius: 4px 4px 1px 1px; background: rgba(255,255,255,.9); }
.brand-mark__symbol span:nth-child(1) { height: 20px; }
.brand-mark__symbol span:nth-child(2) { height: 34px; }
.brand-mark__symbol span:nth-child(3) { height: 27px; }
.brand-mark__text { display: grid; line-height: 1.35; }
.brand-mark__text strong { font-size: 1.6rem; font-weight: 900; letter-spacing: -.04em; }
.brand-mark__text small { color: var(--muted); font-size: .68rem; margin-top: 2px; max-width: 185px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.utility-nav { display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; }
.utility-nav a { padding: 9px 12px; border-radius: 9px; color: var(--text); font-size: .86rem; font-weight: 700; white-space: nowrap; }
.utility-nav a:hover { background: var(--accent-soft); color: var(--accent-strong); }
.live-link { display: inline-flex; align-items: center; gap: 7px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 0 rgba(220,47,63,.38); animation: livePulse 1.8s infinite; flex: 0 0 auto; }
@keyframes livePulse { 70% { box-shadow: 0 0 0 7px rgba(220,47,63,0); } 100% { box-shadow: 0 0 0 0 rgba(220,47,63,0); } }
.search-open { width: 43px; height: 43px; border-radius: 12px; }
.mobile-menu-toggle { display: none; }

.category-nav-wrap { position: sticky; top: 0; z-index: 70; background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.category-nav { overflow-x: auto; scrollbar-width: none; }
.category-nav::-webkit-scrollbar { display: none; }
.category-nav__menu { display: flex; align-items: center; list-style: none; padding: 0; margin: 0; min-width: max-content; }
.category-nav__menu > li { position: relative; margin: 0; }
.category-nav__menu > li > a { display: block; padding: 13px 12px 12px; color: var(--ink); font-size: .88rem; font-weight: 760; border-bottom: 2px solid transparent; }
.category-nav__menu > li > a:hover, .category-nav__menu > li.current-menu-item > a, .category-nav__menu > li.current-category-ancestor > a { color: var(--accent-strong); border-bottom-color: var(--accent); background: var(--accent-soft); }
.category-nav__menu .sub-menu { display: none; position: absolute; top: 100%; right: 0; min-width: 210px; list-style: none; padding: 8px; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow-md); }
.category-nav__menu li:hover > .sub-menu, .category-nav__menu li:focus-within > .sub-menu { display: block; }
.category-nav__menu .sub-menu a { display: block; padding: 8px 10px; border-radius: 7px; color: var(--text); }
.category-nav__menu .sub-menu a:hover { background: var(--accent-soft); color: var(--accent-strong); }

.hot-tags { min-height: 44px; display: flex; align-items: center; gap: 12px; font-size: .78rem; border-bottom: 1px solid var(--border); }
.hot-tags__label { color: var(--muted); font-weight: 750; white-space: nowrap; }
.hot-tags__scroller { display: flex; align-items: center; gap: 9px; overflow-x: auto; scrollbar-width: none; padding-block: 7px; }
.hot-tags__scroller::-webkit-scrollbar { display: none; }
.hot-tags a { color: var(--muted); white-space: nowrap; padding: 4px 7px; border-radius: 7px; }
.hot-tags a:hover { background: var(--surface-3); color: var(--accent-strong); }

.breaking-strip { color: #fff; background: linear-gradient(90deg, #bc1d32, #d52f43 55%, #ba1831); overflow: hidden; }
.breaking-strip__inner { min-height: 42px; display: flex; align-items: center; gap: 14px; }
.breaking-strip__label { display: inline-flex; align-items: center; gap: 7px; font-weight: 900; white-space: nowrap; }
.breaking-strip__track { display: flex; align-items: center; gap: 30px; overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.breaking-strip__track a { position: relative; color: #fff; white-space: nowrap; font-size: .84rem; }
.breaking-strip__track a::after { content: ""; position: absolute; left: -16px; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.7); }

/* Drawers and search */
.mobile-drawer, .search-overlay { position: fixed; inset: 0; z-index: 300; visibility: hidden; opacity: 0; transition: opacity .18s ease, visibility .18s ease; }
.mobile-drawer.is-open, .search-overlay.is-open { visibility: visible; opacity: 1; }
.mobile-drawer__backdrop, .search-overlay__backdrop { position: absolute; inset: 0; background: rgba(5, 13, 22, .62); backdrop-filter: blur(4px); }
.mobile-drawer__panel { position: absolute; top: 0; bottom: 0; right: 0; width: min(86vw, 370px); padding: 24px; overflow-y: auto; background: var(--surface); transform: translateX(104%); transition: transform .24s ease; box-shadow: var(--shadow-md); }
.mobile-drawer.is-open .mobile-drawer__panel { transform: translateX(0); }
.mobile-drawer__close { margin-right: auto; margin-bottom: 18px; }
.mobile-primary-menu, .mobile-category-menu { list-style: none; padding: 0; margin: 0; }
.mobile-primary-menu a, .mobile-category-menu a { display: block; padding: 10px 4px; border-bottom: 1px solid var(--border); color: var(--ink); font-weight: 700; }
.mobile-category-menu .sub-menu { list-style: none; padding-right: 16px; }
.mobile-category-menu .sub-menu a { font-weight: 550; color: var(--text); }

.search-dialog { position: relative; width: min(calc(100% - 32px), 720px); max-height: min(82vh, 760px); margin: 8vh auto; padding: 22px; overflow: hidden auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 28px 80px rgba(0,0,0,.3); transform: translateY(-10px) scale(.985); transition: transform .2s ease; }
.search-overlay.is-open .search-dialog { transform: translateY(0) scale(1); }
.search-dialog__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.search-dialog__header h2 { margin: 0; font-size: 1.25rem; }
.live-search-form__field { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface-2); }
.live-search-form__field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.live-search-form__field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.live-search-results { margin-top: 14px; display: grid; gap: 3px; }
.search-result { display: grid; gap: 3px; padding: 11px 12px; border-radius: 9px; border-bottom: 1px solid var(--border); }
.search-result:hover { background: var(--accent-soft); }
.search-result__title { color: var(--ink); font-weight: 750; line-height: 1.65; }
.search-result__meta { color: var(--muted); font-size: .75rem; }

/* Lead area */
.ad-slot { margin-block: 20px; min-height: 90px; overflow: hidden; }
.ad-slot .widget { margin: 0; }
.lead-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(340px, .75fr); gap: 16px; padding-block: 22px; }
.lead-story { display: grid; grid-template-columns: minmax(260px, .92fr) minmax(0, 1.15fr); min-height: 330px; overflow: hidden; }
.lead-story__media { background: var(--surface-3); min-height: 100%; }
.lead-story__media img { width: 100%; height: 100%; object-fit: cover; }
.lead-story__content { display: flex; flex-direction: column; padding: clamp(20px, 3vw, 34px); }
.lead-story__content h1 { font-size: clamp(1.4rem, 2.3vw, 2.15rem); letter-spacing: -.025em; margin: 12px 0 14px; }
.lead-story__content h1 a { color: var(--ink); }
.lead-story__content h1 a:hover { color: var(--accent-strong); }
.lead-story__content > p { color: var(--muted); line-height: 1.95; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 5px; color: var(--accent-strong); font-size: .76rem; font-weight: 850; }
.breaking-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 7px; border-radius: 6px; background: var(--danger); color: #fff; font-size: .68rem; line-height: 1.35; font-weight: 900; }
.lead-story__footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: .76rem; }
.lead-story__footer > span { display: inline-flex; align-items: center; gap: 5px; }
.post-actions { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.post-actions .icon-button { min-width: 32px; height: 32px; padding: 0 7px; border-color: transparent; background: transparent; color: var(--muted); font-size: .75rem; }
.post-actions .icon-button:hover { border-color: var(--border); background: var(--surface-2); color: var(--accent-strong); }
.post-actions .js-like.is-liked { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.post-actions .js-like.is-liked .icon { fill: currentColor; }
.lead-stack { display: grid; grid-template-rows: repeat(4, 1fr); gap: 10px; }
.lead-brief { position: relative; padding: 15px 16px 12px; overflow: hidden; }
.lead-brief::before { content: ""; position: absolute; right: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 4px 0 0 4px; background: var(--accent); opacity: .75; }
.lead-brief__meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .68rem; }
.lead-brief h2 { margin: 5px 0 3px; font-size: .94rem; line-height: 1.75; }
.lead-brief h2 a { color: var(--ink); }
.lead-brief .post-actions { position: absolute; left: 8px; bottom: 5px; opacity: 0; transition: opacity .15s ease; }
.lead-brief:hover .post-actions, .lead-brief:focus-within .post-actions { opacity: 1; }

/* Main content */
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.content-layout__main { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; min-width: 0; }
.page-shell > .content-layout .content-layout__main { grid-template-columns: minmax(0, 1fr); }
.content-layout__aside { min-width: 0; }
.news-section { overflow: hidden; }
.section-header { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 17px 11px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.section-header h2 { position: relative; margin: 0; padding-right: 12px; font-size: 1.04rem; }
.section-header h2::before { content: ""; position: absolute; right: 0; top: .27em; bottom: .27em; width: 4px; border-radius: 4px; background: var(--accent); }
.section-header > a { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: .7rem; white-space: nowrap; }
.section-header > a:hover { color: var(--accent-strong); }
.news-list { display: grid; }
.news-row { display: flex; align-items: flex-start; gap: 11px; min-width: 0; padding: 13px 15px; border-bottom: 1px solid var(--border); transition: background-color .14s ease; }
.news-row:last-child { border-bottom: 0; }
.news-row:hover { background: var(--surface-2); }
.news-row__thumb { width: 108px; aspect-ratio: 1.45; overflow: hidden; border-radius: 8px; background: var(--surface-3); flex: 0 0 auto; }
.news-row__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.news-row:hover .news-row__thumb img { transform: scale(1.035); }
.news-row__body { min-width: 0; flex: 1; }
.news-row__title-line { display: flex; align-items: flex-start; gap: 6px; }
.news-row__title { flex: 1; margin: 0; font-size: .9rem; line-height: 1.78; font-weight: 760; }
.news-row__title a { color: var(--ink); }
.news-row__title a:hover { color: var(--accent-strong); }
.news-row__excerpt { margin: 5px 0 0; color: var(--muted); font-size: .79rem; line-height: 1.85; }
.news-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 6px; color: var(--muted); font-size: .67rem; }
.news-row__meta > span { display: inline-flex; align-items: center; gap: 4px; }
.news-row__meta .source-name { color: var(--accent-strong); font-weight: 750; }
.news-row > .post-actions { align-self: center; }
.is-compact .news-row { padding-block: 9px; }
.is-compact .news-row__title { font-size: .84rem; }
.is-compact .news-row__meta { margin-top: 3px; }

/* Sidebar */
.widget { margin: 0 0 16px; padding: 16px; }
.widget-title, .widget-title-row h2 { margin: 0; font-size: 1rem; }
.widget-title { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.widget-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sticky-widget { position: sticky; top: calc(var(--header-offset) + 14px); }
.mini-news-list { display: grid; }
.mini-news-list a { display: grid; gap: 3px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.mini-news-list a:last-child { border-bottom: 0; }
.mini-news-list span { color: var(--ink); font-size: .8rem; font-weight: 700; line-height: 1.75; }
.mini-news-list small { color: var(--muted); font-size: .64rem; }
.ranked-list { list-style: none; counter-reset: ranked; padding: 0; margin: 0; }
.ranked-list li { counter-increment: ranked; position: relative; display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 9px 29px 9px 0; border-bottom: 1px solid var(--border); }
.ranked-list li:last-child { border-bottom: 0; }
.ranked-list li::before { content: counter(ranked); position: absolute; right: 0; top: 10px; display: grid; place-items: center; width: 21px; height: 21px; border-radius: 6px; background: var(--surface-3); color: var(--muted); font-size: .66rem; font-weight: 850; }
.ranked-list a { color: var(--ink); font-size: .77rem; font-weight: 680; line-height: 1.7; }
.ranked-list li > span { color: var(--muted); font-size: .62rem; }
.newsletter-box { background: linear-gradient(145deg, var(--surface), var(--accent-soft)); }
.newsletter-box p { color: var(--muted); font-size: .78rem; }

/* Archives */
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 15px; color: var(--muted); font-size: .73rem; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent-strong); }
.breadcrumbs__sep { opacity: .55; }
.archive-card { overflow: hidden; }
.page-header { padding: 22px 22px 18px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.page-header h1 { margin: 0; font-size: clamp(1.35rem, 2.4vw, 2rem); }
.archive-description { margin-top: 8px; color: var(--muted); font-size: .83rem; }
.archive-description p { margin: 0; }
.navigation.pagination { padding: 18px; border-top: 1px solid var(--border); }
.nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.page-numbers { display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-size: .8rem; }
.page-numbers.current, .page-numbers:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.category-popular { margin-bottom: 18px; overflow: hidden; }
.category-popular__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.category-popular__grid article { padding: 16px; border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.category-popular__grid article:nth-child(3n) { border-left: 0; }
.category-popular__grid article:nth-last-child(-n+3) { border-bottom: 0; }
.category-popular__grid article > span { color: var(--danger); font-size: .65rem; font-weight: 800; }
.category-popular__grid h3 { margin: 5px 0; font-size: .84rem; line-height: 1.72; }
.category-popular__grid h3 a { color: var(--ink); }
.category-popular__grid small { color: var(--muted); font-size: .62rem; }
.ranked-news__item { display: grid; grid-template-columns: 52px minmax(0, 1fr); border-bottom: 1px solid var(--border); }
.ranked-news__item:last-child { border-bottom: 0; }
.ranked-news__item .news-row { border-bottom: 0; }
.ranked-news__rank { display: grid; place-items: center; border-left: 1px solid var(--border); color: var(--accent-strong); font-size: 1.1rem; font-weight: 900; background: var(--surface-2); }

/* Single */
.single-news { width: min(calc(100% - 32px), 1040px); }
.single-card { overflow: hidden; }
.single-header { padding: clamp(22px, 4vw, 44px); border-bottom: 1px solid var(--border); }
.single-header__flags { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.category-chip { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 9px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-strong); font-size: .7rem; font-weight: 800; }
.single-header h1 { margin-bottom: 14px; font-size: clamp(1.65rem, 3.4vw, 2.75rem); line-height: 1.55; letter-spacing: -.028em; }
.single-deck { max-width: 820px; color: var(--muted); font-size: 1.04rem; line-height: 1.95; }
.single-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 16px; margin-top: 20px; color: var(--muted); font-size: .74rem; }
.single-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.single-meta .source-name { color: var(--accent-strong); font-weight: 800; }
.single-meta .post-actions { margin-right: auto; }
.single-featured { margin: 0; padding: 0; background: var(--surface-3); }
.single-featured img { width: 100%; max-height: 680px; object-fit: cover; }
.single-featured figcaption { padding: 8px 20px; color: var(--muted); font-size: .72rem; border-top: 1px solid var(--border); }
.entry-content { padding: clamp(22px, 4vw, 46px); color: var(--text); font-size: 1.02rem; line-height: 2.05; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content h2 { margin-top: 2.2rem; font-size: 1.5rem; }
.entry-content h3 { margin-top: 1.8rem; font-size: 1.25rem; }
.entry-content a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.entry-content blockquote { margin: 1.8rem 0; padding: 18px 22px; border-right: 4px solid var(--accent); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink); }
.entry-content table { width: 100%; border-collapse: collapse; margin-block: 1.5rem; font-size: .88rem; }
.entry-content th, .entry-content td { padding: 10px; border: 1px solid var(--border); text-align: right; }
.entry-content th { background: var(--surface-2); color: var(--ink); }
.entry-content pre { overflow: auto; direction: ltr; text-align: left; padding: 16px; border-radius: var(--radius-sm); background: #0e1723; color: #e6edf3; }
.source-panel { margin: 0 clamp(18px, 4vw, 46px) clamp(22px, 4vw, 46px); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.source-panel__header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px; background: var(--surface-2); }
.source-panel__header h2 { margin: 0; font-size: 1.12rem; }
.source-frame-notice { padding: 9px 14px; background: color-mix(in srgb, var(--warning) 13%, var(--surface)); color: var(--text); font-size: .72rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.source-frame { width: 100%; height: 72vh; min-height: 520px; border: 0; background: #fff; }
.single-footer { padding: 0 clamp(22px, 4vw, 46px) clamp(26px, 4vw, 46px); }
.tag-list { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding-top: 20px; border-top: 1px solid var(--border); }
.tag-list > span { color: var(--muted); font-size: .75rem; }
.tag-list a { padding: 5px 9px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border); font-size: .7rem; }
.post-navigation { margin-top: 22px; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.post-navigation .nav-previous, .post-navigation .nav-next { min-width: 0; }
.post-navigation a { display: grid; height: 100%; padding: 14px; border: 1px solid var(--border); border-radius: 10px; }
.post-navigation a:hover { background: var(--surface-2); border-color: var(--accent); }
.post-navigation span { color: var(--muted); font-size: .68rem; }
.post-navigation strong { color: var(--ink); font-size: .82rem; line-height: 1.7; }
.related-news { margin-top: 18px; overflow: hidden; }

/* Live page */
.live-console { overflow: hidden; }
.live-console__header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding: 24px; border-bottom: 1px solid var(--border); background: linear-gradient(145deg, var(--surface), var(--accent-soft)); }
.live-console__header h1 { font-size: clamp(1.45rem, 3vw, 2.2rem); }
.live-console__header p:not(.eyebrow) { color: var(--muted); font-size: .84rem; }
.live-console__status { display: grid; justify-items: end; gap: 8px; }
.live-console__status small { color: var(--muted); font-size: .68rem; }
.live-filters { display: flex; gap: 7px; padding: 13px 16px; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.filter-chip { flex: 0 0 auto; padding: 6px 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer; font-size: .72rem; font-weight: 700; }
.filter-chip:hover, .filter-chip.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.live-progress { height: 3px; background: var(--surface-3); overflow: hidden; }
.live-progress span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .1s linear; }
.live-feed.is-loading { opacity: .55; pointer-events: none; }
.live-feed .news-row:first-child { animation: newItem .5s ease; }
@keyframes newItem { from { background: color-mix(in srgb, var(--accent) 20%, var(--surface)); transform: translateY(-6px); } to { background: transparent; transform: none; } }

/* Pages, forms, comments */
.standard-page { overflow: hidden; }
.error-page { max-width: 720px; margin: 40px auto; padding: 50px 28px; text-align: center; }
.error-page__code { display: block; color: var(--accent); font-size: clamp(4rem, 12vw, 8rem); font-weight: 950; line-height: 1; opacity: .24; }
.error-page p { color: var(--muted); }
.error-page .search-form { max-width: 520px; margin: 20px auto; }
.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; }
.search-field, input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="password"], textarea, select { width: 100%; min-height: 43px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); color: var(--ink); }
textarea { min-height: 140px; resize: vertical; }
.search-submit, input[type="submit"], button[type="submit"] { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 43px; padding: 8px 15px; border: 1px solid var(--accent); border-radius: 9px; background: var(--accent); color: #fff; font-weight: 750; cursor: pointer; }
.search-submit:hover, input[type="submit"]:hover, button[type="submit"]:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.comments-area { margin-top: 18px; padding: 24px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment-body { padding: 16px 0; border-bottom: 1px solid var(--border); }
.comment-author { display: flex; align-items: center; gap: 9px; }
.comment-author .avatar { border-radius: 50%; }
.comment-metadata { color: var(--muted); font-size: .7rem; }
.comment-content { margin-top: 10px; }

/* Footer */
.site-footer { margin-top: 40px; background: #111c28; color: #c4d0d9; border-top: 4px solid var(--accent); }
.footer-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 42px; padding-block: 46px; }
.brand-mark--footer { color: #fff; }
.brand-mark--footer:hover { color: #fff; }
.brand-mark--footer .brand-mark__text small { color: #93a6b5; }
.footer-brand p { max-width: 560px; margin-top: 18px; color: #91a3b2; font-size: .78rem; line-height: 1.9; }
.footer-column h2, .site-footer .widget-title { color: #fff; font-size: .95rem; border-color: rgba(255,255,255,.12); }
.footer-column .widget { padding: 0; border: 0; background: transparent; box-shadow: none; }
.footer-menu, .footer-list, .site-footer .menu { list-style: none; padding: 0; margin: 0; }
.footer-menu li, .footer-list li, .site-footer .menu li { border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-menu a, .footer-list a, .site-footer .menu a { display: flex; align-items: center; gap: 7px; padding: 8px 0; color: #bdcad4; font-size: .78rem; }
.footer-menu a:hover, .footer-list a:hover, .site-footer .menu a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom__inner { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #7f93a3; font-size: .7rem; }
.footer-bottom p { margin: 0; }
.back-to-top { position: fixed; left: 22px; bottom: 22px; z-index: 90; width: 42px; height: 42px; border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--border)); border-radius: 12px; background: var(--accent); color: #fff; box-shadow: var(--shadow-md); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .18s ease, visibility .18s ease, transform .18s ease; }
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.toast { position: fixed; z-index: 500; left: 50%; bottom: 28px; transform: translate(-50%, 15px); min-width: 170px; max-width: calc(100% - 32px); padding: 10px 14px; border-radius: 9px; background: #101b27; color: #fff; text-align: center; font-size: .75rem; box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transition: opacity .18s ease, visibility .18s ease, transform .18s ease; }
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.empty-state { padding: 28px; color: var(--muted); text-align: center; }

/* WordPress alignment */
.alignwide { width: min(1120px, calc(100vw - 32px)); max-width: none; margin-right: 50%; transform: translateX(50%); }
.alignfull { width: 100vw; max-width: none; margin-right: 50%; transform: translateX(50%); }
.wp-caption, .gallery-caption { color: var(--muted); font-size: .75rem; }
.sticky { position: relative; }
.bypostauthor { position: relative; }

/* Responsive */
@media (max-width: 1160px) {
  .masthead__inner { grid-template-columns: auto 1fr auto auto; gap: 16px; }
  .mobile-menu-toggle { display: inline-flex; }
  .utility-nav { display: none; }
  .content-layout { grid-template-columns: minmax(0, 1fr) 290px; }
  .content-layout__main { grid-template-columns: 1fr; }
  .lead-grid { grid-template-columns: minmax(0, 1.4fr) minmax(300px, .75fr); }
}

@media (max-width: 900px) {
  .topbar__notice { display: none; }
  .lead-grid { grid-template-columns: 1fr; }
  .lead-stack { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .content-layout { grid-template-columns: 1fr; }
  .content-layout__aside { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .content-layout__aside .widget { margin: 0; }
  .sticky-widget { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .category-popular__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-popular__grid article:nth-child(3n) { border-left: 1px solid var(--border); }
  .category-popular__grid article:nth-child(2n) { border-left: 0; }
  .category-popular__grid article:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }
  .category-popular__grid article:nth-last-child(-n+2) { border-bottom: 0; }
}

@media (max-width: 680px) {
  :root { --header-offset: 48px; }
  .container { width: min(calc(100% - 20px), var(--container)); }
  .topbar__inner { min-height: 34px; }
  .topbar__date span:not(:first-child) { display: none; }
  .topbar__zoom-label { display: none; }
  .masthead__inner { min-height: 72px; grid-template-columns: auto 1fr auto; gap: 10px; }
  .site-branding { min-width: 0; }
  .brand-mark { gap: 8px; }
  .brand-mark__symbol { width: 40px; height: 38px; border-radius: 10px; }
  .brand-mark__symbol::after { top: 19px; height: 5px; }
  .brand-mark__symbol span { width: 7px; }
  .brand-mark__symbol span:nth-child(1) { height: 15px; }
  .brand-mark__symbol span:nth-child(2) { height: 26px; }
  .brand-mark__symbol span:nth-child(3) { height: 20px; }
  .brand-mark__text strong { font-size: 1.18rem; }
  .brand-mark__text small { display: none; }
  .custom-logo { max-width: 170px; max-height: 54px; }
  .search-open { width: 38px; height: 38px; }
  .category-nav__menu > li > a { padding: 11px 9px 10px; font-size: .78rem; }
  .hot-tags { min-height: 40px; }
  .breaking-strip__track { gap: 24px; }
  .breaking-strip__label { font-size: .75rem; }
  .lead-grid { padding-block: 12px; }
  .lead-story { grid-template-columns: 1fr; }
  .lead-story__media { min-height: 210px; max-height: 310px; }
  .lead-story__content { padding: 18px; }
  .lead-story__content h1 { font-size: 1.35rem; }
  .lead-story__content > p { display: none; }
  .lead-stack { grid-template-columns: 1fr; }
  .lead-brief .post-actions { display: none; }
  .content-layout__aside { grid-template-columns: 1fr; }
  .section-header { min-height: 50px; padding-inline: 13px; }
  .news-row { padding-inline: 12px; }
  .news-row__thumb { width: 86px; }
  .news-row__excerpt { display: none; }
  .news-row > .post-actions { display: none; }
  .news-row__meta > span:nth-child(3) { display: none; }
  .page-shell { padding-block: 14px 32px; }
  .page-header { padding: 18px; }
  .category-popular__grid { grid-template-columns: 1fr; }
  .category-popular__grid article { border-left: 0 !important; border-bottom: 1px solid var(--border) !important; }
  .category-popular__grid article:last-child { border-bottom: 0 !important; }
  .single-news { width: min(calc(100% - 20px), 1040px); }
  .single-header { padding: 20px 17px; }
  .single-header h1 { font-size: 1.52rem; }
  .single-deck { font-size: .9rem; }
  .single-meta .post-actions { width: 100%; margin: 4px 0 0; }
  .entry-content { padding: 22px 17px; font-size: .96rem; }
  .source-panel { margin: 0 12px 20px; }
  .source-panel__header { align-items: stretch; flex-direction: column; }
  .source-frame { min-height: 440px; }
  .single-footer { padding: 0 17px 24px; }
  .post-navigation .nav-links { grid-template-columns: 1fr; }
  .live-console__header { flex-direction: column; padding: 18px; }
  .live-console__status { width: 100%; justify-items: stretch; }
  .live-console__status small { text-align: center; }
  .ranked-news__item { grid-template-columns: 40px minmax(0, 1fr); }
  .ranked-news__rank { font-size: .9rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding-block: 34px; }
  .footer-brand { grid-column: auto; }
  .footer-bottom__inner { flex-direction: column; justify-content: center; text-align: center; padding-block: 15px; }
  .back-to-top { left: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

@media print {
  .site-header, .site-footer, .back-to-top, .toast, .post-actions, .source-panel, .breadcrumbs, .comments-area, .related-news { display: none !important; }
  body { background: #fff; color: #000; }
  .single-news, .single-card { width: 100%; border: 0; box-shadow: none; }
  .entry-content, .single-header { padding-inline: 0; }
}

/* Theme options integration */
.site-header{background:var(--header-bg);color:var(--header-text)}
.has-sticky-header .site-header{position:sticky;top:0}
.admin-bar.has-sticky-header .site-header{top:32px}
.has-header-shadow .site-header{box-shadow:0 9px 28px rgba(14,31,44,.12)}
.topbar{background:var(--topbar-bg)}
.masthead{background:var(--header-bg)}
.masthead__inner{min-height:var(--masthead-height)}
.site-header .utility-nav a,.site-header .icon-button,.site-header .brand-mark{color:var(--header-text)}
.configured-logo-link{display:inline-flex;align-items:center;line-height:0}
.configured-logo{display:block;width:auto;height:auto;object-fit:contain}
.configured-logo--header{max-width:min(var(--header-logo-width),100%);max-height:calc(var(--masthead-height) - 22px)}
.configured-logo--footer{max-width:min(var(--footer-logo-width),100%);max-height:100px}
.site-footer{background:var(--footer-bg);color:var(--footer-text)}
.site-footer .footer-column h2,.site-footer .widget-title{color:var(--footer-heading)}
.site-footer.footer-columns-1 .footer-grid{grid-template-columns:1fr}
.site-footer.footer-columns-2 .footer-grid{grid-template-columns:1.35fr 1fr}
.footer-socials{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}
.footer-socials a{display:inline-flex;padding:6px 10px;border:1px solid rgba(255,255,255,.15);border-radius:8px;color:var(--footer-text);font-size:.75rem}
.footer-socials a:hover{border-color:rgba(255,255,255,.35);color:#fff}
@media(max-width:782px){.admin-bar.has-sticky-header .site-header{top:46px}}
@media(max-width:767px){.configured-logo--header{max-width:min(var(--mobile-logo-width),100%);max-height:54px}.masthead__inner{min-height:max(64px,calc(var(--masthead-height) * .76))}}
@media(max-width:767px){.site-footer.footer-columns-1 .footer-grid,.site-footer.footer-columns-2 .footer-grid,.site-footer.footer-columns-3 .footer-grid{grid-template-columns:1fr}}
