/* ============================================================
   CortexNews — main.css v2.0
   Professional news theme: G1 / CNN Brasil / Guardian aesthetic
   ============================================================ */

/* ── Layout Utilities ──────────────────────────────────────── */
.cn-container {
  max-width: var(--cn-container);
  margin-inline: auto;
  padding-inline: 20px;
}

.cn-layout {
  display: grid;
  grid-template-columns: 1fr var(--cn-sidebar-w);
  gap: 32px;
  align-items: start;
}

.cn-layout--article {
  grid-template-columns: 860px 1fr;
  gap: 40px;
}

.cn-layout__main  { min-width: 0; }
.cn-layout__sidebar { min-width: 0; position: sticky; top: 80px; }

@media (max-width: 1024px) {
  .cn-layout,
  .cn-layout--article { grid-template-columns: 1fr; }
  .cn-layout__sidebar { position: static; }
}

.cn-section { padding-block: var(--cn-section-gap); }

/* ── Body / Global ─────────────────────────────────────────── */
body {
  font-family: var(--cn-font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--cn-text);
  background: var(--cn-bg);
}

.cn-site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.cn-site-main    { flex: 1; }

/* ── Topbar ────────────────────────────────────────────────── */
.cn-topbar {
  background: var(--cn-topbar-bg);
  color: var(--cn-header-text);
  font-size: 12px;
  padding-block: 6px;
}

.cn-topbar__inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cn-topbar__date { opacity: .8; flex: 1; }

.cn-topbar__social { display: flex; gap: 10px; align-items: center; }

.cn-topbar__social-link {
  color: var(--cn-header-text);
  opacity: .7;
  transition: opacity .2s;
  display: flex;
  align-items: center;
}
.cn-topbar__social-link:hover { opacity: 1; }

.cn-topbar__admin {
  color: var(--cn-header-text);
  background: rgba(255,255,255,.1);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.cn-topbar__admin:hover { background: rgba(255,255,255,.2); }

/* ── Header ─────────────────────────────────────────────────── */
.cn-header {
  background: var(--cn-header-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  transition: box-shadow .3s;
}

.cn-header--scrolled { box-shadow: 0 4px 16px rgba(0,0,0,.3); }

.cn-header__main { border-bottom: 1px solid rgba(255,255,255,.08); }

.cn-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-block: 12px;
}

/* Logo */
.cn-logo { display: flex; align-items: center; flex-shrink: 0; }
.cn-logo img { max-height: 50px; width: auto; }
.cn-logo--text {
  font-family: var(--cn-font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--cn-header-text);
  letter-spacing: -.5px;
}
.cn-logo--text:hover { opacity: .9; }

/* Header banner area */
.cn-header__banner { flex: 1; display: flex; justify-content: center; }

/* Header actions */
.cn-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cn-search-toggle,
.cn-darkmode-toggle,
.cn-mobile-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--cn-header-text);
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: background .2s;
}
.cn-search-toggle:hover,
.cn-darkmode-toggle:hover,
.cn-mobile-toggle:hover { background: rgba(255,255,255,.12); }

.cn-mobile-toggle { display: none; }

@media (max-width: 768px) {
  .cn-mobile-toggle  { display: flex; }
  .cn-header__banner { display: none; }
}

/* Search bar */
.cn-search-bar {
  background: var(--cn-topbar-bg);
  padding-block: 12px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.cn-search-bar .search-form { display: flex; gap: 8px; }
.cn-search-bar input[type="search"] {
  flex: 1;
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  font-size: 15px;
  background: var(--cn-white);
  color: var(--cn-text);
}
.cn-search-bar input[type="submit"] {
  padding: 8px 20px;
  background: var(--aame-blue);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

/* ── Navigation ─────────────────────────────────────────────── */
.cn-nav {
  background: var(--cn-header-bg);
  border-top: 1px solid rgba(255,255,255,.06);
}

.cn-nav .cn-container { position: relative; }

.cn-nav__list {
  display: flex;
  list-style: none;
  gap: 2px;
}

.cn-nav__item { position: relative; }

.cn-nav__link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  color: rgba(255,255,255,.85);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.cn-nav__link:hover,
.cn-nav__item.current-menu-item > .cn-nav__link {
  color: var(--cn-white);
  background: rgba(255,255,255,.08);
}
.cn-nav__arrow { font-size: 10px; opacity: .7; }

/* Dropdown */
.cn-nav__dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--cn-white);
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
  border-radius: 0 0 8px 8px;
  list-style: none;
  z-index: 200;
  padding: 4px 0;
}
.cn-nav__item.has-dropdown:hover > .cn-nav__dropdown { display: block; }
.cn-nav__dropdown .cn-nav__link {
  color: var(--cn-text);
  background: transparent;
  font-size: 13px;
  padding: 8px 16px;
}
.cn-nav__dropdown .cn-nav__link:hover {
  color: var(--aame-blue);
  background: var(--aame-blue-light);
}

@media (max-width: 768px) {
  .cn-nav { display: none; }
  .cn-nav.is-open {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    z-index: 99;
  }
  .cn-nav__list { flex-direction: column; }
  .cn-nav__dropdown { position: static; box-shadow: none; border-top: 1px solid var(--cn-divider); }
  .cn-nav__item.has-dropdown:hover > .cn-nav__dropdown { display: block; }
}

/* ── Breaking News Bar ──────────────────────────────────────── */
.cn-breaking-bar {
  background: var(--cn-breaking-bg);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
}

.cn-breaking-bar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 7px;
}

.cn-breaking-bar__label {
  background: rgba(0,0,0,.2);
  padding: 2px 10px;
  border-radius: 3px;
  font-size: 11px;
  letter-spacing: 1px;
  white-space: nowrap;
  flex-shrink: 0;
}

.cn-breaking-bar__ticker { flex: 1; overflow: hidden; }
.cn-breaking-bar__item   { display: block; }

@keyframes cn-ticker-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cn-ticker-in { animation: cn-ticker-in .4s ease; }

/* ── Section Headings ───────────────────────────────────────── */
.cn-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  border-bottom: 3px solid var(--accent, var(--cn-section-border));
  padding-bottom: 10px;
}

.cn-section-head__title {
  font-family: var(--cn-font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cn-text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.cn-section-head__title a { color: inherit; }
.cn-section-head__title a:hover { color: var(--aame-blue); }
.cn-section-head__icon { font-size: 1.1rem; }

.cn-section-head__more {
  color: var(--aame-blue);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.cn-section-head__more:hover { text-decoration: underline; }

/* ── Cards ──────────────────────────────────────────────────── */
.cn-card {
  background: var(--cn-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--cn-card-shadow);
  transition: box-shadow .25s, transform .25s;
}
.cn-card:hover { box-shadow: var(--cn-card-hover); transform: translateY(-2px); }

.cn-card__img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.cn-card__img--placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

.cn-card__body  { padding: 14px 16px 16px; }

.cn-card__title {
  font-family: var(--cn-font-heading);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-block: 6px 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cn-card__title--small { font-size: .9rem; -webkit-line-clamp: 2; }
.cn-card__title a { color: var(--cn-text); }
.cn-card__title a:hover { color: var(--aame-blue); }

.cn-card__excerpt {
  font-size: .85rem;
  color: var(--cn-text-muted);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Grids ──────────────────────────────────────────────────── */
.cn-grid { display: grid; gap: 20px; }
.cn-grid--3 { grid-template-columns: repeat(3, 1fr); }
.cn-grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) { .cn-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px)  {
  .cn-grid--3,
  .cn-grid--4 { grid-template-columns: 1fr; }
}

/* ── Badge ──────────────────────────────────────────────────── */
.cn-badge {
  display: inline-block;
  background: var(--badge-color, var(--aame-blue));
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 6px;
  line-height: 1.5;
}
.cn-badge:hover { opacity: .85; }

/* ── Meta ───────────────────────────────────────────────────── */
.cn-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 12px;
  color: var(--cn-text-muted);
}
.cn-meta__author { font-weight: 600; }
.cn-meta__read   { opacity: .8; }
.cn-meta__date--small { font-size: 11px; color: var(--cn-text-muted); }

/* ── Hero Section ───────────────────────────────────────────── */
.cn-hero { background: var(--cn-white); padding-block: 0; }
.cn-hero > .cn-container { background: var(--cn-white); padding-block: 24px; }

.cn-hero__layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) { .cn-hero__layout { grid-template-columns: 1fr; } }

.cn-hero__main { position: relative; overflow: hidden; border-radius: var(--radius); }

.cn-hero__main-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.cn-hero__main-img--placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1e293b, #334155);
}

.cn-hero__main-body {
  padding: 16px;
  background: var(--cn-white);
}

.cn-hero__main-title {
  font-family: var(--cn-font-heading);
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  font-weight: 700;
  line-height: 1.25;
  margin-block: 8px 10px;
}
.cn-hero__main-title a { color: var(--cn-text); }
.cn-hero__main-title a:hover { color: var(--aame-blue); }

.cn-hero__excerpt {
  font-size: .9rem;
  color: var(--cn-text-muted);
  margin-bottom: 10px;
}

/* Secondary posts */
.cn-hero__secondary { display: flex; flex-direction: column; gap: 12px; }

.cn-hero__secondary-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  background: var(--cn-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--cn-card-shadow);
  padding: 8px;
  transition: box-shadow .2s;
}
.cn-hero__secondary-item:hover { box-shadow: var(--cn-card-hover); }

.cn-hero__secondary-img {
  width: 90px;
  height: 65px;
  object-fit: cover;
  border-radius: 4px;
}

.cn-hero__secondary-title {
  font-family: var(--cn-font-heading);
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cn-hero__secondary-title a { color: var(--cn-text); }
.cn-hero__secondary-title a:hover { color: var(--aame-blue); }

/* ── Trending Strip ─────────────────────────────────────────── */
.cn-trending { background: var(--cn-white); }

.cn-trending__list {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.cn-trending__list::-webkit-scrollbar { display: none; }

.cn-trending__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 200px;
  max-width: 220px;
  flex-shrink: 0;
  scroll-snap-align: start;
  background: var(--cn-bg);
  border-radius: var(--radius);
  padding: 10px;
}

.cn-trending__num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--cn-divider);
  line-height: 1;
  flex-shrink: 0;
  font-family: var(--cn-font-heading);
}

.cn-trending__img {
  width: 60px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.cn-trending__title {
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cn-trending__title a { color: var(--cn-text); }
.cn-trending__title a:hover { color: var(--aame-blue); }

/* ── Category Layout ────────────────────────────────────────── */
.cn-section--category { background: var(--cn-white); }

.cn-cat-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) { .cn-cat-layout { grid-template-columns: 1fr; } }

.cn-cat-feature { overflow: hidden; border-radius: var(--radius); }
.cn-cat-feature__img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}
.cn-cat-feature__img--placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  border-radius: var(--radius) var(--radius) 0 0;
}
.cn-cat-feature__body { padding: 12px; background: var(--cn-white); }
.cn-cat-feature__title {
  font-family: var(--cn-font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-block: 8px 8px;
}
.cn-cat-feature__title a { color: var(--cn-text); }
.cn-cat-feature__title a:hover { color: var(--aame-blue); }
.cn-cat-feature__excerpt { font-size: .85rem; color: var(--cn-text-muted); margin-bottom: 8px; }

.cn-cat-grid { display: flex; flex-direction: column; gap: 12px; }

/* ── Most Read ──────────────────────────────────────────────── */
.cn-section--most-read { background: var(--cn-bg); }

.cn-most-read__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cn-most-read__item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cn-white);
  padding: 12px;
  border-radius: var(--radius);
  box-shadow: var(--cn-card-shadow);
}

.cn-most-read__rank {
  font-size: 2rem;
  font-weight: 800;
  color: var(--cn-divider);
  min-width: 32px;
  text-align: center;
  font-family: var(--cn-font-heading);
}

.cn-most-read__img {
  width: 80px;
  height: 55px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.cn-most-read__title {
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.35;
}
.cn-most-read__title a { color: var(--cn-text); }
.cn-most-read__title a:hover { color: var(--aame-blue); }

/* ── Latest Feed ────────────────────────────────────────────── */
.cn-latest { display: flex; flex-direction: column; gap: 16px; }

.cn-latest__item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px;
  background: var(--cn-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--cn-card-shadow);
  padding: 12px;
  transition: box-shadow .2s;
}
.cn-latest__item:hover { box-shadow: var(--cn-card-hover); }

@media (max-width: 480px) { .cn-latest__item { grid-template-columns: 100px 1fr; } }

.cn-latest__img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
}

.cn-latest__title {
  font-family: var(--cn-font-heading);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-block: 4px 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cn-latest__title a { color: var(--cn-text); }
.cn-latest__title a:hover { color: var(--aame-blue); }

.cn-latest__excerpt {
  font-size: .82rem;
  color: var(--cn-text-muted);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Ad Slots ───────────────────────────────────────────────── */
.aame-ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  background: #f8f9fa;
  border: 1px dashed #dee2e6;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.aame-ad-slot--billboard { min-height: 250px; }
.aame-ad-slot--sticky_sidebar { min-height: 600px; max-height: 600px; }
.aame-ad-slot--rectangle { min-height: 250px; max-width: 300px; }
.aame-ad-slot--leaderboard { min-height: 90px; }
.aame-ad-slot--anchor {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  min-height: 50px;
  z-index: 50;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -2px 8px rgba(0,0,0,.08);
}

.aame-ad-slot__label {
  position: absolute;
  top: 4px; right: 6px;
  font-size: 9px;
  color: #adb5bd;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.cn-ad-row {
  background: var(--cn-bg);
  padding-block: 16px;
  text-align: center;
}

.cn-footer-ad { padding-block: 16px; text-align: center; }

.cn-sidebar-sticky-wrap { display: flex; flex-direction: column; gap: 20px; margin-bottom: 24px; }

/* ── Article Page ───────────────────────────────────────────── */
.cn-article { background: var(--cn-white); border-radius: var(--radius); padding: 32px; box-shadow: var(--cn-card-shadow); }

.cn-breadcrumb {
  font-size: 12px;
  color: var(--cn-text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.cn-breadcrumb a { color: var(--aame-blue); }
.cn-breadcrumb a:hover { text-decoration: underline; }

.cn-article__title {
  font-family: var(--cn-font-heading);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-block: 10px 14px;
  color: var(--cn-text);
}

.cn-article__subtitle {
  font-size: 1.05rem;
  color: var(--cn-text-muted);
  font-style: italic;
  margin-bottom: 16px;
  line-height: 1.5;
}

.cn-article__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--cn-divider);
}

.cn-article__avatar { border-radius: 50%; flex-shrink: 0; }
.cn-article__meta-body { flex: 1; min-width: 0; }
.cn-article__author { font-size: .9rem; }

.cn-article__figure { margin-block: 20px; }
.cn-article__thumbnail { width: 100%; max-height: 500px; object-fit: cover; border-radius: var(--radius); }
.cn-article__caption { font-size: .8rem; color: var(--cn-text-muted); margin-top: 6px; text-align: center; }

.cn-article__ad-top { margin-block: 20px; text-align: center; }

/* Article body content */
.cn-article__body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--cn-text);
}

.cn-article__body h2,
.cn-article__body h3 {
  font-family: var(--cn-font-heading);
  font-weight: 700;
  margin-block: 28px 12px;
}
.cn-article__body h2 { font-size: 1.5rem; }
.cn-article__body h3 { font-size: 1.2rem; }

.cn-article__body p { margin-bottom: 18px; }
.cn-article__body a { color: var(--aame-blue); text-decoration: underline; }
.cn-article__body blockquote {
  border-left: 4px solid var(--aame-blue);
  padding: 12px 20px;
  background: var(--aame-blue-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-block: 20px;
  font-style: italic;
  color: var(--aame-dark);
}
.cn-article__body ul,
.cn-article__body ol { padding-left: 24px; margin-bottom: 18px; }
.cn-article__body li { margin-bottom: 6px; }
.cn-article__body img { border-radius: var(--radius); margin-block: 16px; }

/* Content zones */
.cn-content-zone { position: relative; }

/* Article footer */
.cn-article__footer { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--cn-divider); }

.cn-article__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 20px;
}
.cn-article__tags-label { font-size: .82rem; font-weight: 600; color: var(--cn-text-muted); }
.cn-tag {
  display: inline-block;
  background: var(--aame-blue-light);
  color: var(--aame-blue);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
}
.cn-tag:hover { background: var(--aame-blue); color: #fff; }

/* Author box */
.cn-author-box {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--cn-bg);
  border-radius: var(--radius);
  margin-block: 24px;
}
.cn-author-box__avatar { border-radius: 50%; flex-shrink: 0; }
.cn-author-box__label  { font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; color: var(--cn-text-muted); display: block; }
.cn-author-box__name   { font-size: 1rem; font-weight: 700; display: block; margin-bottom: 4px; }
.cn-author-box__bio    { font-size: .85rem; color: var(--cn-text-muted); }

/* Post nav */
.cn-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 28px;
}
.cn-post-nav__item {
  background: var(--cn-bg);
  border: 1px solid var(--cn-divider);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cn-post-nav__item--next { text-align: right; }
.cn-post-nav__dir  { font-size: .75rem; color: var(--cn-text-muted); }
.cn-post-nav__title { font-size: .88rem; font-weight: 600; color: var(--cn-text); }
.cn-post-nav__item:hover { background: var(--aame-blue-light); border-color: var(--aame-blue); }

/* Share */
.cn-share { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-block: 16px; }
.cn-share__label { font-size: .82rem; font-weight: 600; }
.cn-share__buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.cn-share__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity .2s, transform .1s;
}
.cn-share__btn:hover { opacity: .85; transform: translateY(-1px); }
.cn-share__btn--facebook  { background: #1877F2; color: #fff; }
.cn-share__btn--twitter   { background: #000; color: #fff; }
.cn-share__btn--whatsapp  { background: #25D366; color: #fff; }
.cn-share__btn--copy      { background: var(--cn-bg); color: var(--cn-text); border: 1px solid var(--cn-divider); }

/* Related articles */
.cn-related { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--cn-divider); }

/* ── Archive header ─────────────────────────────────────────── */
.cn-archive-header { padding: 32px 0 24px; }
.cn-archive-header__title {
  font-family: var(--cn-font-heading);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.cn-archive-header__desc { color: var(--cn-text-muted); }

/* ── 404 ────────────────────────────────────────────────────── */
.cn-404 { padding-block: 80px; text-align: center; }
.cn-404__inner { max-width: 480px; margin-inline: auto; }
.cn-404__code  { font-size: 6rem; font-weight: 800; color: var(--cn-divider); line-height: 1; font-family: var(--cn-font-heading); }
.cn-404__title { font-size: 1.6rem; font-weight: 700; margin-block: 8px 12px; }
.cn-404__desc  { color: var(--cn-text-muted); margin-bottom: 20px; }
.cn-404__search { margin-top: 24px; }

/* ── Buttons ────────────────────────────────────────────────── */
.cn-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  border: none;
  transition: opacity .2s;
}
.cn-btn:hover { opacity: .88; }
.cn-btn--primary { background: var(--aame-blue); color: #fff; }

/* ── Pagination ─────────────────────────────────────────────── */
.cn-pagination {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}
.cn-pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.cn-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding-inline: 8px;
  border-radius: var(--radius);
  border: 1px solid var(--cn-divider);
  font-size: .88rem;
  font-weight: 600;
  background: var(--cn-white);
  color: var(--cn-text);
  transition: background .15s;
}
.cn-pagination .page-numbers.current { background: var(--aame-blue); color: #fff; border-color: var(--aame-blue); }
.cn-pagination .page-numbers:hover:not(.current) { background: var(--aame-blue-light); }

/* ── Footer ─────────────────────────────────────────────────── */
.cn-footer {
  background: var(--cn-header-bg);
  color: var(--cn-header-text);
  padding-block: 40px 20px;
  margin-top: auto;
}

.cn-footer__widgets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 24px;
}

@media (max-width: 768px) { .cn-footer__widgets { grid-template-columns: 1fr; } }

.cn-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.cn-footer__copy { font-size: 13px; opacity: .7; }
.cn-footer__copy a { opacity: 1; }
.cn-footer__copy a:hover { text-decoration: underline; }

.cn-footer__nav-list {
  display: flex;
  gap: 16px;
  list-style: none;
  flex-wrap: wrap;
}
.cn-footer__nav-list a {
  font-size: 12px;
  opacity: .7;
}
.cn-footer__nav-list a:hover { opacity: 1; text-decoration: underline; }

/* Footer widgets styling */
.cn-footer .widget__title {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: rgba(255,255,255,.6);
  margin-bottom: 14px;
}
.cn-footer .widget { font-size: .88rem; opacity: .8; }
.cn-footer .widget a { color: var(--cn-header-text); }
.cn-footer .widget a:hover { opacity: 1; text-decoration: underline; }

/* ── Sidebar ────────────────────────────────────────────────── */
.cn-sidebar .widget {
  background: var(--cn-white);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: var(--cn-card-shadow);
}
.cn-sidebar .widget__title {
  font-size: .9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--cn-text-muted);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--aame-blue);
  margin-bottom: 12px;
}

/* ── No results ─────────────────────────────────────────────── */
.cn-no-results { padding: 32px; text-align: center; background: var(--cn-white); border-radius: var(--radius); }

/* ── Dark Mode ──────────────────────────────────────────────── */
html.dark {
  --cn-bg:          #0F172A;
  --cn-white:       #1E293B;
  --cn-text:        #F1F5F9;
  --cn-text-muted:  #94A3B8;
  --cn-divider:     #334155;
  --cn-card-shadow: 0 2px 8px rgba(0,0,0,.3);
  --aame-blue-light:#1e3a5f;
}
html.dark .cn-header,
html.dark .cn-footer { background: #020617; }

/* ── AAME Debug Mode ────────────────────────────────────────── */
.aame-debug-mode [data-aame-ad] { outline: 3px solid #F59E0B !important; }
.aame-debug-mode [data-cortex-block-id] { outline: 2px dashed #1A56DB !important; position: relative; }
.aame-debug-overlay {
  position: absolute;
  top: 0; left: 0;
  z-index: 9999;
  background: rgba(0,0,0,.85);
  color: #fff;
  font: 11px/1.4 monospace;
  padding: 4px 8px;
  pointer-events: none;
}
.aame-debug-overlay--ad { background: rgba(245,158,11,.9); color: #000; }
.aame-debug-overlay--block { background: rgba(26,86,219,.9); }

/* ── Accessibility ──────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--aame-blue); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ── Print ──────────────────────────────────────────────────── */
@media print {
  .cn-header, .cn-footer, .cn-breaking-bar,
  .aame-ad-slot, .cn-share, .cn-related { display: none !important; }
  .cn-article { box-shadow: none; padding: 0; }
  .cn-layout { grid-template-columns: 1fr; }
  .cn-layout__sidebar { display: none; }
}
