:root {
  --bg: #f4f4f4;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --text: #171717;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #ff6a00;
  --accent-dark: #de5b00;
  --radius: 14px;
  --container: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
.container { width: min(var(--container), calc(100% - 28px)); margin: 0 auto; }
.narrow-container { width: min(760px, calc(100% - 28px)); margin: 0 auto; }
.site-main { padding: 84px 0 42px; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}
.site-header__bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 72px;
}
.site-title,
.site-branding .custom-logo-link { display: inline-flex; align-items: center; }
.site-title {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.site-branding img { max-height: 48px; width: auto; }
.main-nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.main-nav a {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}
.header-search { min-width: 210px; }
.search-form { display: flex; align-items: center; gap: 8px; }
.search-field {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
}
.search-submit,
.button-primary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.search-submit:hover,
.button-primary:hover { background: var(--accent-dark); color: #fff; }
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
}
.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
}
.content-layout--single { align-items: start; }
.content-layout--fullwidth { grid-template-columns: minmax(0, 1fr); }
.content-area,
.sidebar,
.single-article,
.archive-hero,
.widget-strip,
.empty-state,
.comments-area,
.story-card,
.hero-story,
.related-posts,
.post-navigation,
.footer-widget-col,
.popular-strip,
.topic-block,
.ad-slot {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.content-area { min-width: 0; }
.content-area--fullwidth { width: 100%; }
.top-strip { margin-bottom: 12px; }
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.section-label::before {
  content: '';
  width: 22px;
  height: 2px;
  background: currentColor;
}
.section-heading { margin-bottom: 18px; }
.section-heading--compact h2 { font-size: 1.5rem; }
.section-heading h2 {
  margin: 8px 0 0;
  font-size: 1.9rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.hero-story {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.92fr);
  overflow: hidden;
  margin-bottom: 20px;
}
.hero-story__media,
.hero-story__media img { height: 100%; }
.hero-story__media img { width: 100%; object-fit: cover; }
.hero-story__body { padding: 28px; }
.hero-story__title,
.archive-title,
.single-title {
  margin: 12px 0 14px;
  letter-spacing: -0.04em;
  line-height: 1.08;
}
.hero-story__title { font-size: clamp(2rem, 3.6vw, 3rem); }
.hero-story__excerpt,
.archive-description,
.story-card__excerpt,
.single-meta { color: var(--muted); }
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.story-grid--archive { margin-top: 20px; }
.story-grid--home { margin-top: 0; }
.story-grid--home-columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.story-grid--home-columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.story-grid--archive { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.story-grid--topic,
.story-grid--related { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.story-card { overflow: hidden; }
.story-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-soft);
}
.story-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.story-card:hover .story-card__media img { transform: scale(1.03); }
.story-card__placeholder,
.no-thumb {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 220px;
  padding: 24px;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  background: linear-gradient(135deg, #f0f2f5, #e3e8ef);
}
.story-card__body { padding: 18px 18px 20px; }
.entry-category {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 106, 0, 0.09);
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.story-card__title { margin: 12px 0 10px; font-size: 1.25rem; line-height: 1.25; }
.archive-hero,
.single-article,
.related-posts,
.comments-area,
.empty-state,
.widget-strip,
.popular-strip,
.topic-block,
.ad-slot { padding: 24px; }
.archive-title { font-size: clamp(2rem, 4vw, 3rem); }
.single-header { margin-bottom: 22px; }
.single-title { font-size: clamp(2.1rem, 4vw, 3.15rem); }
.single-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}
.single-cover {
  margin: 22px 0 0;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
}
.single-cover img { width: 100%; }
.single-content {
  font-size: 1.07rem;
  line-height: 1.82;
}
.single-content h2,
.single-content h3,
.single-content h4 { line-height: 1.2; margin: 30px 0 14px; }
.single-content p,
.single-content ul,
.single-content ol,
.single-content blockquote { margin: 0 0 20px; }
.single-content blockquote {
  padding: 20px 22px;
  border-left: 4px solid var(--accent);
  background: var(--surface-soft);
}
.page-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 34px 0 12px;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}
.page-links a {
  display: inline-flex;
  flex: 1 1 auto;
}
.page-links__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 66px;
  min-width: 280px;
  padding: 0 34px;
  border-radius: 8px;
  border: 1px solid #e46f14;
  background: linear-gradient(180deg, #ff8c2a 0%, #f47a17 100%);
  color: #ffffff;
  font-size: 1.04rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(228, 111, 20, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.page-links a:hover .page-links__button,
.page-links a:focus .page-links__button {
  transform: translateY(-1px);
  border-color: #cc5f0b;
  background: linear-gradient(180deg, #f47a17 0%, #dd6608 100%);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(204, 95, 11, 0.22);
}
.page-links__button--prev::before {
  content: '❮';
  margin-right: 12px;
  font-size: 1.1em;
}
.page-links__button--next::after {
  content: '❯';
  margin-left: 12px;
  font-size: 1.1em;
}
.post-share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.post-share a {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-soft);
  font-weight: 700;
}
.related-posts { margin-top: 24px; }
.post-navigation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  margin-top: 24px;
}
.post-navigation .nav-links { display: contents; }
.post-navigation .nav-previous,
.post-navigation .nav-next { padding: 20px 22px; }
.post-navigation .nav-next { border-left: 1px solid var(--line); }
.nav-subtitle {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.nav-title { display: block; margin-top: 8px; font-weight: 700; }
.widget-strip { margin-bottom: 18px; }
.ad-slot {
  margin: 20px 0;
  background: #fbfbfb;
}
.ad-slot__label {
  display: inline-flex;
  margin-bottom: 14px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.ad-slot .widget-title { display: none; }
.ad-slot iframe,
.ad-slot ins,
.ad-slot img,
.ad-slot script { max-width: 100%; }
.popular-strip__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.mini-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.mini-card:nth-child(-n+2) { border-top: 0; padding-top: 0; }
.mini-card__index {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--accent-dark);
  font-weight: 800;
}
.mini-card__title {
  margin: 10px 0 0;
  font-size: 1.02rem;
  line-height: 1.3;
}
.topic-sections { margin-top: 26px; }
.topic-block + .topic-block { margin-top: 20px; }
.topic-block__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.topic-block__header h3 {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}
.topic-block__link {
  font-weight: 700;
  color: var(--accent-dark);
}
.sidebar {
  padding: 22px;
  align-self: start;
  position: sticky;
  top: 92px;
}
.widget + .widget,
.widget--sidebar-feed { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.widget-title { margin: 0 0 14px; font-size: 1rem; letter-spacing: -0.02em; }
.story-grid--sidebar {
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 0;
}
.story-card--sidebar {
  overflow: hidden;
  border-radius: 16px;
}
.story-card--sidebar .story-card__media {
  aspect-ratio: 16 / 9;
}
.story-card--sidebar .story-card__body {
  padding: 16px;
}
.story-card--sidebar .story-card__title {
  margin: 10px 0 8px;
  font-size: 1.05rem;
  line-height: 1.3;
}
.story-card--sidebar .story-card__excerpt {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}
.story-card--sidebar .story-card__placeholder {
  min-height: 170px;
}
.pagination { margin: 28px 0 0; }
.pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pagination a,
.pagination span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 700;
}
.pagination .current {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}
.comments-area { margin-top: 24px; }
.comment-list { padding-left: 18px; }
.site-footer { padding: 18px 0 32px; }
.footer-widgets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}
.footer-widget-col { padding: 22px; min-height: 100%; }
.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  color: var(--muted);
}
.site-footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.empty-state { text-align: center; padding: 48px 24px; }
.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;
}
@media (max-width: 1080px) {
  .content-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
@media (max-width: 900px) {
  .site-header__bar { grid-template-columns: auto auto; }
  .menu-toggle { display: inline-block; justify-self: end; }
  .main-nav,
  .header-search { display: none; }
  .main-nav.is-open {
    display: block;
    grid-column: 1 / -1;
    padding-bottom: 14px;
  }
  .main-nav ul { justify-content: flex-start; }
  .header-search { grid-column: 1 / -1; }
  .hero-story,
  .story-grid,
  .story-grid--topic,
  .story-grid--related,
  .popular-strip__grid,
  .footer-widgets,
  .post-navigation { grid-template-columns: 1fr; }
  .post-navigation .nav-next { border-left: 0; border-top: 1px solid var(--line); }
  .mini-card:nth-child(2) { border-top: 1px solid var(--line); padding-top: 16px; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 20px, var(--container)); }
  .site-main { padding-top: 78px; }
  .site-header__bar { min-height: 62px; gap: 12px; }
  .site-branding img { max-height: 40px; }
  .site-title { font-size: 1.35rem; }
  .hero-story__body,
  .archive-hero,
  .single-article,
  .related-posts,
  .comments-area,
  .widget-strip,
  .sidebar,
  .footer-widget-col,
  .popular-strip,
  .topic-block,
  .ad-slot { padding: 18px; }
  .single-title { font-size: 1.95rem; }
  .archive-title { font-size: 2rem; }
  .story-card__title { font-size: 1.16rem; }
  .single-content { font-size: 1rem; }
  .site-footer__bottom,
  .topic-block__header { flex-direction: column; align-items: flex-start; }
}

.widget-strip--home-bottom { margin-top: 24px; }
.pagination .prev, .pagination .next { padding-inline: 18px; }
@media (max-width: 1180px) {
  .story-grid--home-columns-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .story-grid--home-columns-3,
  .story-grid--home-columns-4,
  .story-grid--archive { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .story-grid--home-columns-3,
  .story-grid--home-columns-4,
  .story-grid--archive { grid-template-columns: 1fr; }
}


.single-more-articles { margin: 34px 0 10px; }
.archive-hero--single-more { margin-bottom: 22px; }
.single-more-shell { position: relative; }
.single-more-actions { display: grid; place-items: center; gap: 14px; padding: 26px 0 12px; }
.single-more-status { margin: 0; min-height: 1.6em; color: var(--muted); font-weight: 600; text-align: center; }
.single-more-sentinel { width: 100%; height: 1px; }
.single-more-shell.is-loading .js-load-more { opacity: 0.72; pointer-events: none; }
@media (max-width: 640px) {
  .single-more-articles { margin-top: 24px; }
}

@media (max-width: 640px) {
  .page-links { justify-content: stretch; }
  .page-links a { width: 100%; }
  .page-links__button { width: 100%; min-width: 0; min-height: 58px; }
}


.story-grid__full {
  grid-column: 1 / -1;
}
.ad-slot {
  position: relative;
  min-height: 120px;
}
.ad-slot--grid,
.ad-slot--archive {
  margin-top: 20px;
}
.ad-slot--grid {
  min-height: 180px;
}
.ad-slot--single {
  min-height: 180px;
}
.ad-slot--inline-post {
  margin: 28px 0;
}
.ad-slot--sidebar {
  min-height: 150px;
}
.ad-slot ins {
  display: block !important;
}
@media (max-width: 1024px) {
  .story-grid__full {
    grid-column: 1 / -1;
  }
}
