/*
 * Design system tokens
 * Single source of truth for colors, spacing and radii.
 */
:root {
  --bg: #070b12;
  --surface: #0d1320;
  --surface-2: #111827;
  --surface-dark: #111827;
  --surface-dark-2: #0a0f18;
  --card: #0f1724;
  --text: #e5edf7;
  --text-inverse: #ffffff;
  --muted: #9aa4b2;
  --border: #1f2a3a;
  --border-dark: rgba(255, 255, 255, 0.08);
  --accent: #f7931a;
  --accent-strong: #ff9f2d;
  --accent-2: #60a5fa;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --header-bg: rgba(6, 10, 18, 0.9);
  --header-bg-scrolled: rgba(6, 10, 18, 0.98);
  --header-surface: rgba(255, 255, 255, 0.05);
  --drawer-bg: rgba(8, 13, 22, 0.98);
  --drawer-backdrop: rgba(2, 6, 23, 0.66);
  --header-height-desktop: 76px;
  --header-height-mobile: 64px;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --gap-1: 8px;
  --gap-2: 12px;
  --gap-3: 16px;
  --gap-4: 24px;
  --gap-5: 32px;
  --gap-6: 48px;

  --container: 1240px;
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 18px 44px rgba(0, 0, 0, 0.34);
  --shadow-lg: 0 28px 72px rgba(0, 0, 0, 0.42);

  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --content-width: 760px;
  --transition-fast: 160ms ease;
}

html {
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #ffffff;
  --surface: #f8fafc;
  --surface-2: #eef2f7;
  --surface-dark: #111827;
  --surface-dark-2: #0f131a;
  --card: #ffffff;
  --text: #111827;
  --text-inverse: #ffffff;
  --muted: #6b7280;
  --border: #e5e7eb;
  --border-dark: rgba(17, 24, 39, 0.08);
  --accent: #f7931a;
  --accent-strong: #e67e22;
  --accent-2: #0f172a;
  --header-bg: rgba(255, 255, 255, 0.88);
  --header-bg-scrolled: rgba(255, 255, 255, 0.96);
  --header-surface: rgba(15, 23, 42, 0.04);
  --drawer-bg: rgba(255, 255, 255, 0.98);
  --drawer-backdrop: rgba(15, 23, 42, 0.56);
  --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 44px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 28px 72px rgba(15, 23, 42, 0.18);

  color-scheme: light;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
}

a {
  color: inherit;
}

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

h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
.archive-title,
.entry-title,
.wp-block-heading,
.cm-section-title,
.cm-category-title,
.cm-hero-title,
.cm-hero-item-title,
.cm-hero-related__item-title,
.cm-trending-title,
.cm-card-title {
  color: var(--text);
}

a {
  color: inherit;
}

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

.entry-title a,
.archive-title a,
.page-title a {
  color: inherit;
  text-decoration: none;
}

.entry-title a:hover,
.archive-title a:hover,
.page-title a:hover {
  color: var(--accent);
}

.entry-content,
.wp-block-post-content,
.cm-content,
.cm-home,
.cm-header,
.cm-footer {
  color: var(--text);
}

body.page .content-entry,
body.page .content-entry article,
body.page .content-entry .the_title,
body.page .content-entry .the_title h1,
body.page .content-entry .the_content,
body.page .content-entry .the_content p,
body.page .content-entry .the_content li,
body.page .content-entry .the_content h1,
body.page .content-entry .the_content h2,
body.page .content-entry .the_content h3,
body.page .content-entry .the_content h4,
body.page .content-entry .the_content h5,
body.page .content-entry .the_content h6,
body.page .content-entry .the_content strong,
body.page .content-entry .the_content em,
body.page .content-entry .the_content blockquote,
body.page .content-entry .the_content figcaption,
body.page .content-entry .the_content table,
body.page .content-entry .the_content td,
body.page .content-entry .the_content th {
  color: var(--text) !important;
  opacity: 1 !important;
  -webkit-text-fill-color: var(--text);
}

body.page .content-entry .the_title h1 {
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  line-height: 1.08;
  margin-bottom: 18px;
  text-wrap: balance;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text);
}

body.page .content-entry .the_content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

body.page .content-entry .the_content a:hover {
  color: var(--accent-strong);
}

body.page .content-entry .the_content .wp-block-button__link {
  color: var(--text-inverse);
  text-decoration: none;
}

body.page .content-entry .the_content blockquote {
  border-left: 4px solid var(--accent);
  border-right: 0;
  padding: 18px 22px;
  background: var(--surface-dark-2);
  border-radius: var(--radius-md);
}

body.page .content-entry .the_content * {
  color: inherit;
}

body.page .content-entry .the_content .wp-block-button__link,
body.page .content-entry .the_content .button,
body.page .content-entry .the_content button,
body.page .content-entry .the_content input[type="submit"] {
  color: var(--text-inverse) !important;
  -webkit-text-fill-color: var(--text-inverse);
}

.cm-page-shell,
.cm-archive-page {
  padding-top: 8px;
}

.cm-page-shell .page-container,
.cm-archive-page .page-container {
  margin-top: 0;
}

.cm-page-shell .content-entry,
.cm-archive-page .content-entry {
  color: var(--text);
}

.cm-page-shell .page-header,
.cm-archive-page .page-header {
  margin-bottom: 28px;
}

.cm-page-shell .page-title,
.cm-archive-page .page-title {
  color: var(--text) !important;
}

.cm-content-none {
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-dark);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.cm-special-page {
  --special-hero-bg: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(10, 15, 24, 0.92));
}

.cm-special-hero {
  margin-bottom: 24px;
  padding: 30px 28px 28px;
  border: 1px solid var(--border-dark);
  border-radius: 26px;
  background: var(--special-hero-bg);
  box-shadow: var(--shadow-md);
  max-width: 100%;
}

.cm-special-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(247, 147, 26, 0.14);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.cm-special-hero__title {
  margin: 0 0 12px;
  font-size: clamp(1.95rem, 3.8vw, 3.35rem);
  line-height: 1.06;
  color: var(--text-inverse);
}

.cm-special-hero__intro {
  max-width: 66ch;
  margin: 0 0 14px;
  color: rgba(229, 237, 247, 0.88);
  font-size: 1.06rem;
  line-height: 1.7;
}

.cm-special-hero__meta {
  color: rgba(229, 237, 247, 0.72);
  font-size: 0.9rem;
}

.cm-special-page__content {
  margin: 0 0 30px;
  max-width: 100%;
}

.cm-special-page__content .the_content {
  font-size: 1.03rem;
  line-height: 1.8;
  max-width: 100%;
  margin: 0;
}

.cm-special-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 0;
}

.cm-special-aside--stacked {
  padding-top: 0;
}

.cm-special-aside__lead {
  padding: 22px 22px 20px;
  border: 1px solid var(--border-dark);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.cm-special-aside__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.cm-special-aside__card {
  padding: 20px;
  border: 1px solid var(--border-dark);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.cm-special-aside__card--accent {
  background: linear-gradient(180deg, rgba(247, 147, 26, 0.14), rgba(15, 23, 42, 0.94));
}

.cm-special-aside__label {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cm-special-aside__text {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

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

.cm-archive-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 100%;
  border: 1px solid var(--border-dark);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.cm-archive-card:hover {
  transform: translateY(-3px);
  border-color: rgba(247, 147, 26, 0.34);
  box-shadow: var(--shadow-md);
}

.cm-archive-card__thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-dark-2);
}

.cm-archive-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cm-archive-card__thumb-placeholder {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(247, 147, 26, 0.2), rgba(96, 165, 250, 0.12)),
    var(--surface-dark-2);
}

.cm-archive-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
}

.cm-archive-card__category {
  align-self: flex-start;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.cm-archive-card__category:hover {
  color: var(--accent-strong);
}

.cm-archive-card__title {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.24;
}

.cm-archive-card__title a {
  color: var(--text) !important;
  text-decoration: none;
}

.cm-archive-card__title a:hover {
  color: var(--accent) !important;
}

.cm-archive-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.cm-archive-card__meta-sep {
  opacity: 0.55;
}

.cm-archive-card__excerpt {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.68;
}

@media (max-width: 991px) {
  .cm-special-hero {
    padding: 22px;
  }

  .cm-archive-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .cm-special-hero {
    padding: 18px;
    border-radius: 20px;
  }

  .cm-special-hero__title {
    font-size: 2rem;
  }

  .cm-special-aside__card {
    padding: 18px;
  }

  .cm-special-aside__lead {
    padding: 18px;
  }

  .cm-special-aside__grid {
    grid-template-columns: 1fr;
  }
}

.archive .page-header,
.category .page-header,
.tag .page-header,
.tax .page-header,
.archive-header,
.archive-description,
.term-description {
  color: var(--text);
}

.archive .page-header,
.category .page-header,
.tag .page-header,
.tax .page-header,
.archive-header {
  margin-bottom: 28px;
}

.archive .page-header .page-title,
.archive .page-header .archive-title,
.category .page-header .page-title,
.tag .page-header .page-title,
.tax .page-header .page-title,
.archive-title,
.page-title {
  color: var(--text);
  text-wrap: balance;
}

.archive .page-header .page-title,
.category .page-header .page-title,
.tag .page-header .page-title,
.tax .page-header .page-title {
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.12;
  margin-bottom: 12px;
}

.archive .page-header .archive-description,
.archive .page-header .term-description,
.category .page-header .archive-description,
.category .page-header .term-description,
.tag .page-header .archive-description,
.tag .page-header .term-description,
.tax .page-header .archive-description,
.tax .page-header .term-description,
.archive-description,
.term-description {
  max-width: 68ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.archive .page-header .archive-description a,
.archive .page-header .term-description a,
.category .page-header .archive-description a,
.category .page-header .term-description a,
.tag .page-header .archive-description a,
.tag .page-header .term-description a,
.tax .page-header .archive-description a,
.tax .page-header .term-description a,
.archive-description a,
.term-description a {
  color: var(--accent);
  text-decoration: none;
}

.archive .page-header .archive-description a:hover,
.archive .page-header .term-description a:hover,
.category .page-header .archive-description a:hover,
.category .page-header .term-description a:hover,
.tag .page-header .archive-description a:hover,
.tag .page-header .term-description a:hover,
.tax .page-header .archive-description a:hover,
.tax .page-header .term-description a:hover,
.archive-description a:hover,
.term-description a:hover {
  text-decoration: underline;
}

.archive .entry-title,
.category .entry-title,
.tag .entry-title,
.tax .entry-title,
.archive .entry-title a,
.category .entry-title a,
.tag .entry-title a,
.tax .entry-title a,
.archive .cm-card-title,
.category .cm-card-title,
.tag .cm-card-title,
.tax .cm-card-title,
.archive .cm-card-title a,
.category .cm-card-title a,
.tag .cm-card-title a,
.tax .cm-card-title a,
.archive .cm-post-title,
.category .cm-post-title,
.tag .cm-post-title,
.tax .cm-post-title,
.archive .cm-post-title a,
.category .cm-post-title a,
.tag .cm-post-title a,
.tax .cm-post-title a {
  color: var(--text) !important;
}

.archive .entry-title a:hover,
.category .entry-title a:hover,
.tag .entry-title a:hover,
.tax .entry-title a:hover,
.archive .cm-card-title a:hover,
.category .cm-card-title a:hover,
.tag .cm-card-title a:hover,
.tax .cm-card-title a:hover,
.archive .cm-post-title a:hover,
.category .cm-post-title a:hover,
.tag .cm-post-title a:hover,
.tax .cm-post-title a:hover {
  color: var(--accent) !important;
}

.archive .section-title h1,
.category .section-title h1,
.tag .section-title h1,
.tax .section-title h1,
.archive-container .section-title h1,
.archive .section-title h1 a,
.category .section-title h1 a,
.tag .section-title h1 a,
.tax .section-title h1 a,
.archive-container .section-title h1 a {
  color: var(--text) !important;
  opacity: 1 !important;
  -webkit-text-fill-color: var(--text) !important;
  text-shadow: none !important;
}

.archive .grid-post-holder .post_title h2,
.category .grid-post-holder .post_title h2,
.tag .grid-post-holder .post_title h2,
.tax .grid-post-holder .post_title h2,
.archive .grid-post-holder .post_title h2 a,
.category .grid-post-holder .post_title h2 a,
.tag .grid-post-holder .post_title h2 a,
.tax .grid-post-holder .post_title h2 a,
.archive .grid-post-holder .card_content .post_title h2,
.category .grid-post-holder .card_content .post_title h2,
.tag .grid-post-holder .card_content .post_title h2,
.tax .grid-post-holder .card_content .post_title h2,
.archive .grid-post-holder .card_content .post_title h2 a,
.category .grid-post-holder .card_content .post_title h2 a,
.tag .grid-post-holder .card_content .post_title h2 a,
.tax .grid-post-holder .card_content .post_title h2 a {
  color: var(--text) !important;
}

.archive .grid-post-holder .post_title h2 a:hover,
.category .grid-post-holder .post_title h2 a:hover,
.tag .grid-post-holder .post_title h2 a:hover,
.tax .grid-post-holder .post_title h2 a:hover,
.archive .grid-post-holder .card_content .post_title h2 a:hover,
.category .grid-post-holder .card_content .post_title h2 a:hover,
.tag .grid-post-holder .card_content .post_title h2 a:hover,
.tax .grid-post-holder .card_content .post_title h2 a:hover {
  color: var(--accent) !important;
}

.cm-muted,
.entry-meta,
.cm-card-meta,
.cm-post-mini-meta,
.cm-hero-meta,
.cm-hero-dek,
.cm-card-excerpt,
.cm-hero-related__category {
  color: var(--muted);
}
