:root {
  --mc-accent: #d51f57;
  --mc-secondary: #0f766e;
  --mc-bg: #ffffff;
  --mc-surface: #f6f7f8;
  --mc-surface-strong: #111318;
  --mc-text: #16181d;
  --mc-muted: #69707d;
  --mc-border: #e5e7eb;
  --mc-link: #111318;
  --mc-max: 1180px;
  --mc-radius: 8px;
  --mc-shadow: 0 16px 40px rgba(17, 19, 24, 0.08);
  --mc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
}

.is-dark {
  --mc-bg: #0f1115;
  --mc-surface: #181b22;
  --mc-surface-strong: #f4f5f7;
  --mc-text: #f4f5f7;
  --mc-muted: #a7adba;
  --mc-border: #2a2f3a;
  --mc-link: #ffffff;
  --mc-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--mc-bg);
  color: var(--mc-text);
  font-family: var(--mc-font);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--mc-link);
  text-decoration: none;
}

a:hover {
  color: var(--mc-accent);
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
.button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--mc-accent) 55%, transparent);
  outline-offset: 3px;
}

.container {
  width: min(100% - 32px, var(--mc-max));
  margin-inline: auto;
}

.narrow-content {
  width: min(100% - 32px, 820px);
}

.screen-reader-text {
  position: absolute;
  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 {
  width: auto;
  height: auto;
  clip: auto;
  padding: 10px 14px;
  margin: 8px;
  background: var(--mc-accent);
  color: #fff;
  z-index: 1000;
}

.site-header {
  background: var(--mc-bg);
  border-bottom: 1px solid var(--mc-border);
  z-index: 20;
}

.has-sticky-header .site-header {
  position: sticky;
  top: 0;
}

.topbar {
  background: var(--mc-surface-strong);
  color: var(--mc-bg);
  font-size: 0.84rem;
}

.topbar a {
  color: inherit;
}

.topbar-inner,
.branding-row,
.nav-inner,
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.topbar-inner {
  min-height: 36px;
}

.branding-row {
  padding: 26px 0;
}

.site-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
}

.site-description {
  margin: 8px 0 0;
  color: var(--mc-muted);
}

.custom-logo {
  max-height: 80px;
  width: auto;
}

.site-navigation {
  border-top: 1px solid var(--mc-border);
}

.nav-inner {
  min-height: 58px;
}

.primary-menu,
.footer-menu {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.primary-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 58px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.84rem;
}

.nav-actions,
.social-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-links a {
  font-size: 0.82rem;
  font-weight: 700;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius);
  background: var(--mc-bg);
  color: var(--mc-text);
}

.icon-button svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.menu-toggle {
  display: none;
}

.search-panel {
  border-top: 1px solid var(--mc-border);
  background: var(--mc-surface);
}

.search-panel-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
}

.search-form {
  display: flex;
  gap: 10px;
  width: 100%;
}

.search-form label {
  flex: 1;
}

.search-field {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius);
  background: var(--mc-bg);
  color: var(--mc-text);
  padding: 0 14px;
}

.button,
.search-submit {
  min-height: 46px;
  border: 0;
  border-radius: var(--mc-radius);
  background: var(--mc-accent);
  color: #fff;
  font-weight: 800;
  padding: 0 18px;
}

.home-section {
  padding: 42px 0;
}

.density-compact .home-section {
  padding: 28px 0;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--mc-border);
}

.section-header h2 {
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--mc-accent);
  font-size: clamp(1.25rem, 3vw, 2rem);
  line-height: 1.1;
}

.section-header a {
  margin-bottom: 12px;
  color: var(--mc-accent);
  font-weight: 800;
}

.hero-section {
  padding-top: 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr;
  gap: 18px;
}

.hero-card {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border-radius: var(--mc-radius);
  background: var(--mc-surface);
}

.hero-main {
  grid-row: span 2;
  min-height: 520px;
}

.hero-media,
.post-card-media,
.post-list-media {
  display: block;
  background: var(--mc-surface);
  overflow: hidden;
}

.hero-media img,
.post-card-media img,
.post-list-media img,
.article-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 15%, rgba(0, 0, 0, 0.78));
}

.hero-content {
  position: absolute;
  inset: auto 0 0;
  padding: 22px;
  color: #fff;
}

.hero-content a,
.hero-content .post-meta {
  color: inherit;
}

.hero-content h2 {
  margin: 8px 0;
  font-size: clamp(1.15rem, 2.5vw, 2.8rem);
  line-height: 1.02;
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.86);
}

.category-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--mc-accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.category-badge:hover {
  color: #fff;
  filter: brightness(0.95);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--mc-muted);
  font-size: 0.86rem;
}

.post-meta a {
  color: inherit;
  font-weight: 700;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.four-col {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.post-card {
  background: var(--mc-bg);
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius);
  overflow: hidden;
}

.post-card-media {
  aspect-ratio: 16 / 10;
}

.post-card-body {
  padding: 18px;
}

.post-card-title,
.post-card h3 {
  margin: 10px 0 8px;
  font-size: 1.2rem;
  line-height: 1.18;
}

.post-card p,
.post-list-item p {
  color: var(--mc-muted);
  margin: 10px 0 0;
}

.post-list {
  display: grid;
  gap: 22px;
}

.post-list-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--mc-border);
}

.post-list-media {
  aspect-ratio: 16 / 11;
  border-radius: var(--mc-radius);
}

.post-list-body h2,
.post-list-body h3 {
  margin: 9px 0;
  line-height: 1.15;
}

.trending-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.trending-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  min-height: 136px;
  padding: 18px;
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius);
  background: var(--mc-surface);
}

.trend-rank {
  color: var(--mc-accent);
  font-size: 2rem;
  line-height: 1;
  font-weight: 900;
}

.trending-item h3 {
  margin: 8px 0 0;
  line-height: 1.16;
}

.category-block-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
}

.video-section {
  background: var(--mc-surface-strong);
  color: var(--mc-bg);
}

.video-section a,
.video-section .post-meta,
.video-section .post-card p {
  color: inherit;
}

.video-section .post-card {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.newsletter-panel {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  align-items: center;
  padding: 34px;
  border-radius: var(--mc-radius);
  background: var(--mc-surface);
  box-shadow: var(--mc-shadow);
}

.eyebrow {
  color: var(--mc-accent);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.newsletter-panel h2 {
  margin: 4px 0 8px;
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  line-height: 1.05;
}

.content-sidebar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 42px;
  padding: 42px 0;
}

.archive-header {
  margin-bottom: 28px;
}

.archive-header h1,
.page-header h1,
.article-header h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 4.1rem);
  line-height: 1.02;
}

.archive-description,
.entry-content,
.article-content {
  color: var(--mc-text);
}

.sidebar {
  display: grid;
  align-content: start;
  gap: 20px;
}

.widget {
  padding: 20px;
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius);
  background: var(--mc-surface);
}

.widget-title {
  margin: 0 0 12px;
  font-size: 1rem;
  text-transform: uppercase;
}

.breadcrumbs {
  width: min(100% - 32px, var(--mc-max));
  margin: 24px auto 0;
  color: var(--mc-muted);
  font-size: 0.88rem;
}

.breadcrumbs a {
  color: var(--mc-muted);
}

.article-header {
  padding: 34px 0 22px;
}

.article-featured-image {
  margin-top: 18px;
}

.article-featured-image img {
  aspect-ratio: 16 / 8;
  border-radius: var(--mc-radius);
}

.article-featured-image figcaption {
  margin-top: 8px;
  color: var(--mc-muted);
  font-size: 0.86rem;
}

.article-layout {
  display: grid;
  grid-template-columns: 140px minmax(0, 760px) 1fr;
  gap: 28px;
  padding: 34px 0;
}

.article-content {
  grid-column: 2;
  font-size: 1.08rem;
}

.article-content > *:first-child {
  margin-top: 0;
}

.article-content a {
  color: var(--mc-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content h2,
.article-content h3 {
  line-height: 1.15;
  margin-top: 1.6em;
}

.article-content blockquote {
  margin: 28px 0;
  padding: 8px 0 8px 24px;
  border-left: 4px solid var(--mc-accent);
  color: var(--mc-muted);
  font-size: 1.25rem;
}

.share-links {
  position: sticky;
  top: 128px;
  display: grid;
  gap: 10px;
  font-size: 0.88rem;
}

.share-links span {
  font-weight: 900;
}

.share-links a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius);
  font-weight: 800;
}

.article-footer {
  padding-bottom: 48px;
}

.author-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius);
  background: var(--mc-surface);
}

.author-box img {
  border-radius: 50%;
}

.author-box span {
  color: var(--mc-muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
}

.author-box h2 {
  margin: 0;
}

.related-posts,
.comments-area {
  margin-top: 34px;
}

.comment-list {
  padding-left: 20px;
}

.ad-slot {
  display: grid;
  place-items: center;
  min-height: 90px;
  padding: 12px;
  border: 1px dashed var(--mc-border);
  background: var(--mc-surface);
  color: var(--mc-muted);
  text-align: center;
}

.ad-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ad-slot-header {
  min-width: min(100%, 480px);
}

.ad-slot-footer {
  margin: 36px auto 0;
  width: min(100% - 32px, var(--mc-max));
}

.tag-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.tag-links a {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--mc-surface);
  text-decoration: none;
  color: var(--mc-text);
}

.post-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 180px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--mc-accent) 20%, transparent), transparent),
    var(--mc-surface);
  color: var(--mc-accent);
  font-weight: 900;
}

.page-content,
.not-found {
  padding: 42px 0;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 42px 0;
}

.site-footer {
  margin-top: 42px;
  border-top: 1px solid var(--mc-border);
  background: var(--mc-surface);
}

.footer-bottom {
  padding: 24px 0;
  border-top: 1px solid var(--mc-border);
  align-items: flex-start;
}

.footer-bottom p {
  margin: 6px 0 0;
  color: var(--mc-muted);
}

.nav-links,
.page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.nav-links a,
.nav-links span,
.page-links a,
.page-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius);
}

@media (max-width: 1024px) {
  .hero-grid,
  .three-col,
  .four-col,
  .trending-list,
  .category-block-grid,
  .content-sidebar-layout,
  .article-layout,
  .newsletter-panel {
    grid-template-columns: 1fr 1fr;
  }

  .hero-main {
    grid-column: span 2;
    min-height: 440px;
  }

  .article-content,
  .article-aside {
    grid-column: 1 / -1;
  }

  .share-links {
    position: static;
    display: flex;
    flex-wrap: wrap;
  }

  .sidebar {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .container,
  .narrow-content {
    width: min(100% - 24px, var(--mc-max));
  }

  .topbar-inner,
  .branding-row,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .ad-slot-header {
    width: 100%;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .primary-menu {
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% + 1px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
    background: var(--mc-bg);
    box-shadow: var(--mc-shadow);
  }

  .site-navigation {
    position: relative;
  }

  .primary-menu.is-open {
    display: flex;
  }

  .primary-menu a {
    min-height: 44px;
  }

  .hero-grid,
  .post-grid,
  .three-col,
  .four-col,
  .trending-list,
  .category-block-grid,
  .content-sidebar-layout,
  .article-layout,
  .newsletter-panel,
  .footer-widgets {
    grid-template-columns: 1fr;
  }

  .hero-main {
    grid-column: auto;
    min-height: 410px;
  }

  .hero-card {
    min-height: 300px;
  }

  .post-list-item {
    grid-template-columns: 1fr;
  }

  .post-list-media {
    aspect-ratio: 16 / 10;
  }

  .article-featured-image img {
    aspect-ratio: 16 / 10;
  }

  .search-form {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}


.demo-ad {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(100%, 320px);
  min-height: 54px;
  padding: 10px 18px;
  border-radius: var(--mc-radius);
  background: color-mix(in srgb, var(--mc-accent) 12%, var(--mc-bg));
  color: var(--mc-text);
  font-weight: 900;
}

/* Header refinement: single-line logo, menu, and tools. */
.topbar,
.branding-row,
.nav-inner {
  display: none;
}

.main-header-row {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 112px;
  padding: 16px 0;
}

.main-header-row .site-branding {
  flex: 0 0 auto;
  min-width: 220px;
}

.main-header-row .custom-logo {
  max-height: 86px;
  width: auto;
}

.main-header-row .site-title {
  font-size: clamp(2rem, 3vw, 3.25rem);
}

.main-header-row .site-description {
  display: none;
}

.main-header-row .site-navigation {
  flex: 1 1 auto;
  min-width: 0;
  border-top: 0;
}

.main-header-row .primary-menu {
  justify-content: center;
  gap: 30px;
}

.main-header-row .primary-menu > li {
  position: relative;
}

.main-header-row .primary-menu > li > a {
  min-height: 80px;
  font-size: 1rem;
  line-height: 1.1;
  letter-spacing: 0;
  white-space: nowrap;
}

.main-header-row .nav-actions {
  flex: 0 0 auto;
  margin-left: auto;
}

.main-header-row .icon-button {
  width: 48px;
  height: 48px;
}

.primary-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  display: none;
  min-width: 280px;
  margin: 0;
  padding: 12px;
  list-style: none;
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius);
  background: var(--mc-bg);
  box-shadow: var(--mc-shadow);
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
  display: grid;
  gap: 4px;
}

.primary-menu .sub-menu a {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 0 14px;
  border-radius: calc(var(--mc-radius) - 2px);
  font-size: 1rem;
  line-height: 1.2;
  text-transform: none;
}

.primary-menu .sub-menu a:hover,
.primary-menu .sub-menu a:focus {
  background: var(--mc-surface);
}

@media (max-width: 1100px) {
  .main-header-row {
    gap: 18px;
  }

  .main-header-row .primary-menu {
    gap: 18px;
  }

  .main-header-row .primary-menu > li > a {
    font-size: 0.92rem;
  }
}

@media (max-width: 760px) {
  .main-header-row {
    min-height: 86px;
    gap: 12px;
  }

  .main-header-row .site-branding {
    min-width: 0;
    flex: 1 1 auto;
  }

  .main-header-row .custom-logo {
    max-height: 58px;
  }

  .main-header-row .site-navigation {
    order: 4;
    flex: 0 0 100%;
  }

  .main-header-row .nav-actions {
    margin-left: 0;
  }

  .main-header-row .menu-toggle {
    display: inline-grid;
  }

  .main-header-row .primary-menu {
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% + 1px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
    background: var(--mc-bg);
    box-shadow: var(--mc-shadow);
  }

  .main-header-row .primary-menu.is-open {
    display: flex;
  }

  .main-header-row .primary-menu > li > a,
  .primary-menu .sub-menu a {
    min-height: 54px;
    font-size: 1.05rem;
    padding: 0 14px;
  }

  .primary-menu .sub-menu {
    position: static;
    display: grid;
    min-width: 0;
    margin: 0 0 8px 12px;
    box-shadow: none;
  }
}

/* Premium latest/archive list layout. */
.latest-list-section {
  background: #f3f4f6;
  padding: 54px 0;
}

.is-dark .latest-list-section {
  background: #12151b;
}

.latest-list-container {
  width: min(100% - 32px, 980px);
}

.premium-post-list {
  gap: 34px;
}

.premium-list-card {
  display: grid;
  grid-template-columns: minmax(260px, 46%) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 30px;
  border: 1px solid rgba(17, 19, 24, 0.06);
  border-radius: 8px;
  background: var(--mc-bg);
  box-shadow: 0 18px 46px rgba(17, 19, 24, 0.07);
}

.is-dark .premium-list-card {
  border-color: var(--mc-border);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
}

.premium-list-card .post-list-media {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(17, 19, 24, 0.06);
}

.premium-list-card .post-list-body h2 {
  margin: 14px 0 12px;
  font-size: clamp(1.35rem, 2.3vw, 1.95rem);
  line-height: 1.18;
}

.post-list-excerpt {
  margin: 0;
  color: var(--mc-muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.read-more-link {
  color: var(--mc-text);
  font-weight: 900;
  white-space: nowrap;
}

.post-list-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 24px;
  color: var(--mc-muted);
  font-size: 0.92rem;
}

.post-list-footer a {
  color: var(--mc-text);
  font-weight: 700;
}

/* Premium single article layout. */
.single-article {
  background: linear-gradient(180deg, var(--mc-surface) 0, var(--mc-bg) 330px);
}

.single-article .breadcrumbs {
  margin-top: 0;
  padding-top: 22px;
}

.single-article .article-header {
  width: min(100% - 32px, 980px);
  padding: 48px 0 28px;
}

.single-article .article-header h1 {
  max-width: 940px;
  margin-top: 14px;
  font-size: clamp(2.4rem, 5.4vw, 5rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.single-article .article-header .post-meta {
  margin-top: 18px;
  color: var(--mc-muted);
  font-size: 0.98rem;
}

.single-article .article-featured-image {
  width: min(100% - 32px, 980px);
}

.single-article .article-featured-image img {
  aspect-ratio: 16 / 8.5;
  box-shadow: 0 18px 50px rgba(17, 19, 24, 0.12);
}

.single-article .article-layout {
  width: min(100% - 32px, 980px);
  grid-template-columns: 140px minmax(0, 760px);
  justify-content: center;
  gap: 28px;
  padding-top: 42px;
}

.single-article .article-content {
  grid-column: 2;
  font-size: 1.12rem;
  line-height: 1.85;
}

.single-article .article-content p {
  margin: 0 0 1.35em;
}

.single-article .article-content h2 {
  margin: 1.7em 0 0.65em;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.single-article .article-content blockquote {
  border-left: 0;
  border-radius: 8px;
  background: var(--mc-surface);
  padding: 24px 28px;
  color: var(--mc-text);
  font-weight: 700;
}

.single-article .share-links {
  gap: 11px;
}

.single-article .share-links span {
  font-size: 0.86rem;
  text-transform: uppercase;
}

.single-article .share-links a {
  min-height: 42px;
  background: var(--mc-bg);
  box-shadow: 0 8px 22px rgba(17, 19, 24, 0.05);
}

.single-article .article-footer {
  width: min(100% - 32px, 820px);
}

.single-article .navigation.post-navigation {
  margin-top: 28px;
}

.single-article .nav-links {
  justify-content: space-between;
}

.single-article .nav-links a {
  min-height: 48px;
  max-width: 48%;
  padding: 0 18px;
  background: var(--mc-bg);
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(17, 19, 24, 0.05);
}

.comments-area {
  padding: 28px;
  border: 1px solid var(--mc-border);
  border-radius: 8px;
  background: var(--mc-bg);
  box-shadow: 0 14px 42px rgba(17, 19, 24, 0.06);
}

.comments-title,
.comment-reply-title {
  margin-top: 0;
  font-size: 1.45rem;
}

.comment-form {
  display: grid;
  gap: 16px;
}

.comment-form p {
  margin: 0;
}

.comment-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--mc-border);
  border-radius: 8px;
  background: var(--mc-surface);
  color: var(--mc-text);
  padding: 12px 14px;
}

.comment-form textarea {
  min-height: 170px;
  resize: vertical;
}

.comment-form .submit {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--mc-accent);
  color: #fff;
  font-weight: 900;
  padding: 0 22px;
}

.comment-respond .logged-in-as,
.comment-notes {
  color: var(--mc-muted);
}

@media (max-width: 760px) {
  .premium-list-card {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 18px;
  }

  .premium-list-card .post-list-media {
    aspect-ratio: 16 / 10;
  }

  .single-article .article-header h1 {
    font-size: clamp(2rem, 12vw, 3.4rem);
  }

  .single-article .article-layout {
    grid-template-columns: 1fr;
  }

  .single-article .article-content,
  .single-article .article-aside {
    grid-column: 1;
  }

  .single-article .share-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .single-article .share-links span {
    grid-column: 1 / -1;
  }

  .single-article .nav-links a {
    max-width: 100%;
    width: 100%;
  }

  .comments-area {
    padding: 18px;
  }
}

/* Final homepage polish: compact header, stronger hero, premium latest posts. */
.site-header {
  background: var(--mc-bg);
  border-bottom: 1px solid var(--mc-border);
}

.site-header .main-header-row {
  display: grid;
  grid-template-columns: minmax(210px, 315px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  width: min(100% - 32px, 1180px);
  min-height: 88px;
  padding: 10px 0;
}

.site-header .site-branding {
  min-width: 0;
}

.site-header .custom-logo-link {
  display: inline-flex;
  align-items: center;
}

.site-header .custom-logo {
  display: block;
  max-width: 300px;
  max-height: 70px;
  object-fit: contain;
}

.site-header .site-navigation {
  min-width: 0;
  border: 0;
}

.site-header .primary-menu {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 2vw, 30px);
  min-width: 0;
}

.site-header .primary-menu > li > a {
  min-height: 64px;
  font-size: 0.96rem;
  font-weight: 900;
  letter-spacing: 0;
}

.site-header .nav-actions {
  display: inline-flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
}

.site-header .icon-button {
  width: 44px;
  height: 44px;
  background: var(--mc-surface);
}

.hero-section {
  padding: 34px 0 44px;
  background: linear-gradient(180deg, var(--mc-bg), color-mix(in srgb, var(--mc-surface) 72%, var(--mc-bg)));
}

.hero-grid {
  width: min(100% - 32px, 1180px);
  grid-template-columns: 1.15fr 0.8fr 0.8fr;
  gap: 18px;
}

.hero-card {
  border: 1px solid color-mix(in srgb, var(--mc-border) 70%, transparent);
  box-shadow: 0 18px 44px rgba(17, 19, 24, 0.12);
  background: #171a21;
}

.hero-main {
  min-height: 470px;
}

.hero-card:not(.hero-main) {
  min-height: 226px;
}

.hero-card .post-placeholder {
  min-height: 100%;
  background:
    radial-gradient(circle at 18% 18%, rgba(213, 31, 87, 0.45), transparent 34%),
    radial-gradient(circle at 80% 8%, rgba(15, 118, 110, 0.32), transparent 30%),
    linear-gradient(135deg, #2a101c, #171a21 50%, #07080b);
  color: rgba(255, 255, 255, 0.16);
  font-size: 2.6rem;
}

.hero-card:nth-child(2n) .post-placeholder {
  background:
    radial-gradient(circle at 78% 20%, rgba(213, 31, 87, 0.38), transparent 34%),
    linear-gradient(135deg, #151923, #2a101c 55%, #07080b);
}

.hero-card:nth-child(3n) .post-placeholder {
  background:
    radial-gradient(circle at 20% 85%, rgba(15, 118, 110, 0.36), transparent 34%),
    linear-gradient(135deg, #1a101f, #251b12 55%, #07080b);
}

.hero-media::after {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0, rgba(0, 0, 0, 0.28) 42%, rgba(0, 0, 0, 0.9) 100%);
}

.hero-content {
  padding: clamp(18px, 2.5vw, 30px);
}

.hero-content h2 {
  max-width: 720px;
  font-size: clamp(1.45rem, 3.1vw, 3rem);
  line-height: 1.04;
  text-wrap: balance;
}

.hero-card:not(.hero-main) .hero-content h2 {
  font-size: clamp(1.2rem, 2vw, 2rem);
}

.hero-content p {
  max-width: 600px;
  font-size: 1rem;
  line-height: 1.55;
}

.latest-list-section {
  padding: 58px 0 76px;
  background: #f5f6f8;
}

.latest-list-container {
  width: min(100% - 32px, 1080px);
}

.latest-list-section .section-header {
  margin-bottom: 24px;
  border-bottom-color: #d9dde5;
}

.latest-list-section .section-header h2 {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.latest-list-section .section-header a {
  color: var(--mc-accent);
  font-size: 0.95rem;
}

.latest-list-section .premium-post-list {
  display: grid;
  gap: 24px;
}

.latest-list-section .premium-list-card {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  padding: 22px;
  border: 1px solid rgba(17, 19, 24, 0.06);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(17, 19, 24, 0.06);
}

.latest-list-section .premium-list-card .post-list-media {
  aspect-ratio: 16 / 10.5;
  border-radius: 7px;
  box-shadow: none;
}

.latest-list-section .premium-list-card .post-placeholder {
  min-height: 100%;
  background:
    radial-gradient(circle at 78% 18%, rgba(213, 31, 87, 0.18), transparent 32%),
    linear-gradient(135deg, #f8dbe7, #f6eef3 55%, #ffffff);
  color: var(--mc-accent);
  font-size: 1rem;
}

.latest-list-section .premium-list-card .post-list-body h2 {
  margin: 12px 0 8px;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.2;
}

.latest-list-section .post-list-excerpt {
  max-width: 680px;
  color: #687284;
  font-size: 1rem;
  line-height: 1.62;
}

.latest-list-section .post-list-footer {
  margin-top: 18px;
  font-size: 0.92rem;
}

.is-dark .latest-list-section {
  background: #101318;
}

.is-dark .latest-list-section .premium-list-card {
  background: var(--mc-bg);
  border-color: var(--mc-border);
}

@media (max-width: 980px) {
  .site-header .main-header-row {
    grid-template-columns: 1fr auto;
  }

  .site-header .site-navigation {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .site-header .primary-menu {
    justify-content: flex-start;
  }

  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-main {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .site-header .main-header-row {
    display: flex;
    flex-wrap: wrap;
    min-height: 78px;
  }

  .site-header .custom-logo {
    max-width: 220px;
    max-height: 58px;
  }

  .site-header .site-navigation {
    flex-basis: 100%;
    order: 5;
  }

  .hero-grid,
  .latest-list-section .premium-list-card {
    grid-template-columns: 1fr;
  }

  .hero-main,
  .hero-card:not(.hero-main) {
    min-height: 360px;
  }

  .latest-list-section .premium-list-card {
    padding: 16px;
  }
}

/* Reference layout: hero mosaic and Latest Posts rows. */
.hero-mosaic-section {
  padding: 34px 0 54px;
  background: var(--mc-bg);
}

.hero-mosaic-grid {
  width: min(100% - 32px, 1180px);
  display: grid;
  grid-template-columns: 1.25fr 0.49fr 0.49fr;
  grid-template-rows: 255px 255px;
  gap: 2px;
}

.hero-mosaic-grid .hero-card {
  position: relative;
  min-height: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #111;
  box-shadow: none;
}

.hero-mosaic-grid .hero-main {
  grid-column: 1;
  grid-row: 1 / span 2;
  min-height: 0;
}

.hero-mosaic-grid .hero-card:nth-child(2) {
  grid-column: 2 / span 2;
  grid-row: 1;
}

.hero-mosaic-grid .hero-card:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

.hero-mosaic-grid .hero-card:nth-child(4) {
  grid-column: 3;
  grid-row: 2;
}

.hero-mosaic-grid .hero-media,
.hero-mosaic-grid .hero-media img,
.hero-mosaic-grid .post-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-mosaic-grid .hero-media img {
  object-fit: cover;
  transform: scale(1.01);
}

.hero-mosaic-grid .hero-media::after {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.03) 0%, rgba(0, 0, 0, 0.18) 36%, rgba(0, 0, 0, 0.88) 100%);
}

.hero-mosaic-grid .post-placeholder {
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.08), transparent 32%),
    linear-gradient(135deg, #2d1721 0%, #14171d 54%, #050506 100%);
  color: rgba(255, 255, 255, 0.12);
  font-size: 2.2rem;
}

.hero-mosaic-grid .hero-content {
  inset: auto 0 0;
  padding: 24px;
  color: #fff;
}

.hero-mosaic-grid .hero-main .hero-content {
  padding: 34px;
}

.hero-mosaic-grid .category-badge {
  min-height: 28px;
  padding: 0 11px;
  border-radius: 0;
  background: var(--mc-accent);
  font-size: 0.75rem;
}

.hero-mosaic-grid .hero-content h2 {
  margin: 12px 0 14px;
  max-width: 720px;
  color: #fff;
  font-size: clamp(1.55rem, 2.6vw, 2.45rem);
  line-height: 1.14;
  text-wrap: balance;
}

.hero-mosaic-grid .hero-card:not(.hero-main) .hero-content h2 {
  font-size: clamp(1.1rem, 1.65vw, 1.55rem);
  line-height: 1.16;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.latest-posts-section {
  padding: 42px 0 78px;
  background: var(--mc-bg);
}

.latest-posts-container {
  width: min(100% - 32px, 980px);
}

.latest-posts-heading {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.latest-posts-heading::after {
  content: "";
  height: 1px;
  background: var(--mc-border);
}

.latest-posts-heading h2 {
  grid-column: 1;
  margin: 0;
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 950;
}

.latest-posts-heading h2 span {
  color: #e31d3b;
}

.latest-posts-heading a {
  grid-column: 3;
  color: var(--mc-accent);
  font-size: 0.92rem;
  font-weight: 900;
}

.latest-posts-list {
  display: grid;
  gap: 0;
}

.latest-posts-list .premium-list-card {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 0 0 28px;
  margin-bottom: 28px;
  border: 0;
  border-bottom: 1px solid var(--mc-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.latest-posts-list .premium-list-card .post-list-media {
  aspect-ratio: 16 / 10.7;
  border-radius: 0;
  background: #f5dce7;
  box-shadow: none;
}

.latest-posts-list .premium-list-card .post-placeholder {
  min-height: 100%;
  background:
    radial-gradient(circle at 80% 20%, rgba(227, 29, 59, 0.18), transparent 28%),
    linear-gradient(135deg, #f4d4e1, #f8eef3 56%, #fff);
  color: var(--mc-accent);
  font-size: 1rem;
}

.latest-posts-list .category-badge {
  min-height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #e31d3b;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.14em;
}

.latest-posts-list .premium-list-card .post-list-body h2 {
  margin: 12px 0 16px;
  font-size: clamp(1.35rem, 2.1vw, 1.85rem);
  line-height: 1.2;
}

.latest-posts-list .post-list-excerpt {
  max-width: 520px;
  color: #4a5567;
  font-size: 1.02rem;
  line-height: 1.62;
}

.latest-posts-list .read-more-link {
  display: inline-block;
  margin-top: 12px;
  color: #e31d3b;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 6px;
}

.latest-posts-list .post-list-footer {
  margin-top: 18px;
  color: #5d6675;
}

@media (max-width: 900px) {
  .hero-mosaic-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 420px 240px 240px;
  }

  .hero-mosaic-grid .hero-main,
  .hero-mosaic-grid .hero-card:nth-child(2),
  .hero-mosaic-grid .hero-card:nth-child(3),
  .hero-mosaic-grid .hero-card:nth-child(4) {
    grid-column: auto;
    grid-row: auto;
  }

  .hero-mosaic-grid .hero-main,
  .hero-mosaic-grid .hero-card:nth-child(2) {
    grid-column: 1 / -1;
  }

  .latest-posts-list .premium-list-card {
    grid-template-columns: 300px minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .hero-mosaic-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .hero-mosaic-grid .hero-card,
  .hero-mosaic-grid .hero-main {
    min-height: 330px;
  }

  .hero-mosaic-grid .hero-main .hero-content,
  .hero-mosaic-grid .hero-content {
    padding: 22px;
  }

  .latest-posts-heading {
    grid-template-columns: auto 1fr;
  }

  .latest-posts-heading a {
    grid-column: 1 / -1;
  }

  .latest-posts-list .premium-list-card {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* Single article compact override: reduce oversized post titles and header spacing. */
.single-article {
  background: var(--mc-bg);
}

.single-article .breadcrumbs {
  width: min(100% - 32px, 1080px);
  margin-top: 0;
  padding: 16px 0;
  font-size: 0.9rem;
}

.single-article .article-header {
  width: min(100% - 32px, 1080px);
  padding: 34px 0 22px;
}

.single-article .article-header h1,
.archive-header h1,
.page-header h1 {
  max-width: 860px;
  margin: 12px 0 0;
  font-size: clamp(2.15rem, 4.1vw, 4rem) !important;
  line-height: 1.08;
  letter-spacing: 0;
}

.single-article .article-header .category-badge {
  min-height: 26px;
  padding: 0 10px;
  font-size: 0.72rem;
}

.single-article .article-header .post-meta {
  margin-top: 18px;
  font-size: 0.94rem;
}

.single-article .article-layout {
  width: min(100% - 32px, 1080px);
  grid-template-columns: 140px minmax(0, 760px);
  justify-content: start;
  padding-top: 26px;
}

.single-article .article-content {
  font-size: 1.05rem;
  line-height: 1.78;
}

.single-article .article-content > p:first-child {
  font-size: 1.08rem;
  line-height: 1.75;
}

@media (max-width: 760px) {
  .single-article .article-header {
    padding: 24px 0 16px;
  }

  .single-article .article-header h1,
  .archive-header h1,
  .page-header h1 {
    font-size: clamp(1.85rem, 9vw, 2.8rem) !important;
    line-height: 1.1;
  }

  .single-article .article-layout {
    grid-template-columns: 1fr;
    padding-top: 18px;
  }
}

/* Mobile-first completion and sidebar widgets. */
.mc-widget-posts {
  display: grid;
  gap: 16px;
}

.mc-widget-post {
  display: grid;
  gap: 10px;
}

.ranked-post {
  grid-template-columns: auto 1fr;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--mc-border);
}

.ranked-post:last-child,
.thumb-post:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.rank-number {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--mc-accent);
  color: #fff;
  font-weight: 950;
  line-height: 1;
}

.mc-widget-post h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.mc-widget-post span {
  display: inline-block;
  margin-top: 5px;
  color: var(--mc-muted);
  font-size: 0.84rem;
}

.thumb-post {
  grid-template-columns: 92px 1fr;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--mc-border);
}

.thumb-post-media {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  background: var(--mc-surface);
}

.thumb-post-media img,
.thumb-post-media .post-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 0;
}

.thumb-post .category-badge {
  min-height: 20px;
  padding: 0 7px;
  font-size: 0.64rem;
}

.mc-about-card,
.mc-newsletter-card,
.mc-ad-widget {
  display: grid;
  gap: 12px;
}

.mc-about-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 12px;
  background: var(--mc-accent);
  color: #fff;
  font-weight: 950;
}

.mc-about-card h2,
.mc-newsletter-card h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.15;
}

.mc-about-card p,
.mc-newsletter-card p {
  margin: 0;
  color: var(--mc-muted);
}

.mc-about-card a {
  color: var(--mc-accent);
  font-weight: 900;
}

.mc-social-widget {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mc-social-widget a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--mc-border);
  border-radius: 8px;
  background: var(--mc-bg);
  font-weight: 850;
}

.mc-newsletter-card {
  padding: 22px;
  border-radius: 8px;
  background: var(--mc-surface-strong);
  color: var(--mc-bg);
}

.mc-newsletter-card span,
.mc-ad-widget span {
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mc-newsletter-card p,
.mc-newsletter-card a {
  color: color-mix(in srgb, var(--mc-bg) 82%, transparent);
}

.mc-ad-widget {
  place-items: center;
  text-align: center;
}

/* Google-friendly responsive hardening. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.site-main,
.site-header,
.site-footer {
  max-width: 100%;
}

@media (max-width: 782px) {
  body {
    font-size: 16px;
    line-height: 1.6;
  }

  .container,
  .narrow-content,
  .latest-posts-container,
  .latest-list-container,
  .hero-mosaic-grid,
  .site-header .main-header-row,
  .single-article .article-header,
  .single-article .article-layout,
  .single-article .breadcrumbs,
  .single-article .article-footer {
    width: min(100% - 28px, 100%) !important;
  }

  .site-header {
    position: relative;
  }

  .site-header .main-header-row {
    display: grid !important;
    grid-template-columns: 1fr auto auto auto;
    gap: 10px;
    min-height: 0 !important;
    padding: 14px 0 !important;
  }

  .site-header .site-branding {
    grid-column: 1 / -1;
    text-align: center;
  }

  .site-header .custom-logo-link {
    justify-content: center;
  }

  .site-header .custom-logo {
    max-width: min(100%, 280px) !important;
    max-height: 70px !important;
  }

  .site-header .nav-actions {
    grid-column: 1 / -1;
    display: flex !important;
    justify-content: center;
    gap: 12px;
    margin: 6px 0 0 !important;
  }

  .site-header .menu-toggle {
    display: inline-grid !important;
    order: 0;
  }

  .site-header .icon-button {
    width: 54px !important;
    height: 54px !important;
    border-radius: 10px;
  }

  .site-header .site-navigation {
    grid-column: 1 / -1;
    grid-row: auto;
    position: static !important;
    width: 100%;
    order: 5;
  }

  .site-header .primary-menu {
    position: static !important;
    display: none !important;
    width: 100%;
    margin: 12px 0 0 !important;
    padding: 8px !important;
    border: 1px solid var(--mc-border);
    border-radius: 10px;
    background: var(--mc-bg);
    box-shadow: 0 12px 28px rgba(17, 19, 24, 0.12);
  }

  .site-header .primary-menu.is-open {
    display: grid !important;
    gap: 2px;
  }

  .site-header .primary-menu > li,
  .site-header .primary-menu li {
    position: relative;
    margin: 0 !important;
  }

  .site-header .primary-menu > li > a,
  .site-header .primary-menu a,
  .site-header .primary-menu .sub-menu a {
    display: flex !important;
    align-items: center;
    min-height: 46px !important;
    padding: 0 14px !important;
    border-radius: 8px;
    font-size: 1rem !important;
    line-height: 1.15 !important;
    white-space: normal !important;
  }

  .site-header .primary-menu a:hover,
  .site-header .primary-menu a:focus {
    background: var(--mc-surface);
  }

  .site-header .primary-menu .sub-menu {
    position: static !important;
    display: grid !important;
    min-width: 0 !important;
    margin: 0 0 6px 12px !important;
    padding: 4px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .search-panel-inner {
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 12px 0;
  }

  .search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
  }

  .search-field,
  .button,
  .search-submit {
    min-height: 46px;
  }

  .hero-mosaic-section {
    padding: 18px 0 28px !important;
  }

  .hero-mosaic-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .hero-mosaic-grid .hero-card,
  .hero-mosaic-grid .hero-main,
  .hero-mosaic-grid .hero-card:nth-child(2),
  .hero-mosaic-grid .hero-card:nth-child(3),
  .hero-mosaic-grid .hero-card:nth-child(4) {
    grid-column: auto !important;
    grid-row: auto !important;
    min-height: 250px !important;
    border-radius: 8px;
  }

  .hero-mosaic-grid .hero-main {
    min-height: 320px !important;
  }

  .hero-mosaic-grid .hero-main .hero-content,
  .hero-mosaic-grid .hero-content {
    padding: 18px !important;
  }

  .hero-mosaic-grid .hero-content h2,
  .hero-mosaic-grid .hero-card:not(.hero-main) .hero-content h2 {
    font-size: clamp(1.25rem, 6vw, 2rem) !important;
    line-height: 1.12 !important;
    margin: 10px 0 !important;
  }

  .hero-meta {
    font-size: 0.74rem;
  }

  .latest-posts-section {
    padding: 26px 0 44px !important;
  }

  .latest-posts-heading {
    grid-template-columns: auto 1fr auto !important;
    gap: 10px;
    margin-bottom: 18px;
  }

  .latest-posts-heading h2 {
    font-size: 1.25rem !important;
  }

  .latest-posts-heading a {
    grid-column: 3 !important;
    font-size: 0.82rem;
  }

  .latest-posts-list .premium-list-card,
  .premium-list-card {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    padding: 0 0 22px !important;
    margin-bottom: 22px !important;
  }

  .latest-posts-list .premium-list-card .post-list-media,
  .premium-list-card .post-list-media {
    aspect-ratio: 16 / 10 !important;
    width: 100%;
  }

  .latest-posts-list .premium-list-card .post-list-body h2,
  .premium-list-card .post-list-body h2 {
    font-size: clamp(1.18rem, 5.2vw, 1.55rem) !important;
    line-height: 1.2;
    margin: 9px 0;
  }

  .post-list-excerpt {
    font-size: 0.98rem;
  }

  .content-sidebar-layout {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 26px;
    padding: 28px 0;
  }

  .sidebar {
    grid-column: auto !important;
    gap: 16px;
  }

  .widget {
    padding: 16px;
  }

  .single-article .article-header h1,
  .archive-header h1,
  .page-header h1 {
    font-size: clamp(1.85rem, 9vw, 2.65rem) !important;
  }

  .single-article .article-aside,
  .single-article .article-content {
    grid-column: 1 !important;
  }

  .single-article .share-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .single-article .share-links span {
    grid-column: 1 / -1;
  }

  .footer-widgets,
  .footer-bottom {
    grid-template-columns: 1fr !important;
    flex-direction: column;
    gap: 18px;
  }

  .footer-menu {
    flex-wrap: wrap;
    gap: 12px;
  }
}

@media (max-width: 420px) {
  .site-header .custom-logo {
    max-width: 250px !important;
  }

  .site-header .icon-button {
    width: 50px !important;
    height: 50px !important;
  }

  .hero-mosaic-grid .hero-card,
  .hero-mosaic-grid .hero-main {
    min-height: 235px !important;
  }

  .hero-mosaic-grid .hero-main {
    min-height: 285px !important;
  }

  .latest-posts-heading {
    grid-template-columns: 1fr auto !important;
  }

  .latest-posts-heading::after {
    display: none;
  }
}

/* Built-in sidebar layouts and final compact mobile header. */
.home-sidebar-layout,
.single-sidebar-layout,
.page-sidebar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 36px;
  align-items: start;
}

.home-sidebar-layout {
  padding: 34px 0 72px;
}

.home-sidebar-layout .latest-posts-section {
  padding: 0;
}

.home-sidebar-layout .latest-posts-container {
  width: 100%;
}

.single-sidebar-layout {
  width: min(100% - 32px, 1180px);
  margin-inline: auto;
}

.single-sidebar-layout .single-article .article-header,
.single-sidebar-layout .single-article .article-layout,
.single-sidebar-layout .single-article .article-footer {
  width: 100%;
}

.single-sidebar-layout .single-article .article-layout {
  grid-template-columns: 120px minmax(0, 1fr);
}

.page-sidebar-layout {
  padding: 34px 0 72px;
}

.page-sidebar-layout .breadcrumbs {
  width: 100%;
  margin: 0 0 18px;
}

.mc-category-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.mc-category-list a {
  display: flex;
  justify-content: space-between;
  min-height: 38px;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--mc-bg);
  border: 1px solid var(--mc-border);
  font-weight: 800;
}

@media (max-width: 782px) {
  .site-header .main-header-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    justify-items: center;
    gap: 10px !important;
    padding: 12px 0 !important;
  }

  .site-header .site-branding {
    grid-column: 1 !important;
    width: 100%;
  }

  .site-header .custom-logo {
    max-width: 245px !important;
    max-height: 58px !important;
  }

  .site-header .nav-actions {
    grid-column: 1 !important;
    display: flex !important;
    gap: 10px !important;
    justify-content: center !important;
    margin: 0 !important;
    width: auto;
  }

  .site-header .icon-button {
    width: 46px !important;
    height: 46px !important;
    border-radius: 9px !important;
  }

  .site-header .site-navigation {
    grid-column: 1 !important;
    width: 100%;
  }

  .site-header .primary-menu {
    width: min(100%, 300px) !important;
    margin: 8px auto 0 !important;
    padding: 6px !important;
    border-radius: 10px !important;
  }

  .site-header .primary-menu > li > a,
  .site-header .primary-menu a,
  .site-header .primary-menu .sub-menu a {
    min-height: 40px !important;
    justify-content: center;
    padding: 0 10px !important;
    font-size: 0.94rem !important;
  }

  .home-sidebar-layout,
  .single-sidebar-layout,
  .page-sidebar-layout {
    grid-template-columns: 1fr !important;
    gap: 28px;
    width: min(100% - 28px, 100%) !important;
  }

  .single-sidebar-layout .single-article .article-layout {
    grid-template-columns: 1fr !important;
  }

  .single-sidebar-layout .single-article .article-aside,
  .single-sidebar-layout .single-article .article-content {
    grid-column: 1 !important;
  }

  .sidebar {
    width: 100%;
  }
}
