/**
 * Epikora main stylesheet — magazine / blog
 */

:root {
  --epikora-primary: #0f766e;
  --epikora-primary-soft: color-mix(in srgb, var(--epikora-primary) 12%, transparent);
  --epikora-primary-readable: var(--epikora-primary);
  --epikora-secondary: #0f172a;
  --epikora-container: 1180px;
  --epikora-bg: #fafbfc;
  --epikora-bg-elevated: #ffffff;
  --epikora-bg-muted: #f1f5f9;
  --epikora-text: #0f172a;
  --epikora-text-muted: #64748b;
  --epikora-border: #e2e8f0;
  --epikora-radius: 14px;
  --epikora-radius-sm: 10px;
  --epikora-space: 1rem;
  --epikora-font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  --epikora-font-display: Georgia, "Times New Roman", Times, serif;
  --epikora-header-h: 4rem;
  --epikora-ad-min: 90px;
  --epikora-shadow: 0 1px 2px rgb(15 23 42 / 4%), 0 8px 24px rgb(15 23 42 / 5%);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --epikora-bg: #0a0f18;
    --epikora-bg-elevated: #111827;
    --epikora-bg-muted: #0f172a;
    --epikora-text: #e5e7eb;
    --epikora-text-muted: #94a3b8;
    --epikora-border: #1e293b;
    --epikora-secondary: #f8fafc;
    --epikora-primary-readable: #5eead4;
    --epikora-primary-soft: color-mix(in srgb, var(--epikora-primary) 22%, transparent);
    --epikora-shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 28px rgb(0 0 0 / 25%);
    color-scheme: dark;
  }
}

html[data-theme="dark"] {
  --epikora-bg: #0a0f18;
  --epikora-bg-elevated: #111827;
  --epikora-bg-muted: #0f172a;
  --epikora-text: #e5e7eb;
  --epikora-text-muted: #94a3b8;
  --epikora-border: #1e293b;
  --epikora-secondary: #f8fafc;
  --epikora-primary-readable: #5eead4;
  --epikora-primary-soft: color-mix(in srgb, var(--epikora-primary) 22%, transparent);
  --epikora-shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 28px rgb(0 0 0 / 25%);
  color-scheme: dark;
}

html[data-theme="light"] {
  --epikora-bg: #fafbfc;
  --epikora-bg-elevated: #ffffff;
  --epikora-bg-muted: #f1f5f9;
  --epikora-text: #0f172a;
  --epikora-text-muted: #64748b;
  --epikora-border: #e2e8f0;
  --epikora-secondary: #0f172a;
  --epikora-primary-readable: var(--epikora-primary);
  --epikora-primary-soft: color-mix(in srgb, var(--epikora-primary) 12%, transparent);
  --epikora-shadow: 0 1px 2px rgb(15 23 42 / 4%), 0 8px 24px rgb(15 23 42 / 5%);
  color-scheme: light;
}

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

/* Stable gutter = no L↔R jump when scrollbar appears (header/footer containers). */
html {
  scrollbar-gutter: stable;
}

@supports not (scrollbar-gutter: stable) {
  html {
    overflow-y: scroll;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--epikora-font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--epikora-text);
  background: var(--epikora-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a {
  color: var(--epikora-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
a:hover { text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--epikora-primary);
  outline-offset: 2px;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.skip-link:focus {
  clip: auto;
  clip-path: none;
  height: auto;
  width: auto;
  left: var(--epikora-space);
  top: var(--epikora-space);
  z-index: 100000;
  background: var(--epikora-primary);
  color: #fff;
  padding: 0.75rem 1rem;
  text-decoration: none;
  border-radius: var(--epikora-radius-sm);
}

.container {
  width: min(100% - 2rem, var(--epikora-container));
  margin-inline: auto;
}

/* ——— Header ——— */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: auto;
  max-width: 100%;
  z-index: 1000;
  background: color-mix(in srgb, var(--epikora-bg-elevated) 94%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--epikora-border);
  overflow: visible;
}

@media (max-width: 767px) {
  .site-header {
    backdrop-filter: none;
    background: var(--epikora-bg-elevated);
  }
}

/* Sit flush under WP admin bar (fixed = no sticky start-gap) */
body.admin-bar .site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

/* Admin bar is not fixed below 600px */
@media screen and (max-width: 600px) {
  body.admin-bar .site-header {
    top: 0;
  }
}

/* Reserve space for fixed header (same on home + single) */
.site {
  padding-top: var(--epikora-header-h);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--epikora-header-h);
  padding-block: 0;
  box-sizing: border-box;
}

.site-branding {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.site-branding__desktop,
.site-branding__mobile {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.site-branding__link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--epikora-secondary);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.site-branding__link .site-title,
.site-title {
  font-family: var(--epikora-font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  display: inline-block;
}

.site-branding__mobile { display: none; }
.site-logo {
  display: block;
  width: auto;
  max-height: 42px;
  height: auto;
  object-fit: contain;
}
.site-logo--dark { display: none; }

html[data-theme="dark"] .site-logo--light { display: none; }
html[data-theme="dark"] .site-logo--dark { display: block; }

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .site-logo--light { display: none; }
  html:not([data-theme="light"]) .site-logo--dark { display: block; }
}

.nav-primary { display: none; }
.nav-primary__list {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-primary__list > li {
  display: flex;
  align-items: center;
}
.nav-primary__list a {
  color: var(--epikora-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  line-height: 1.2;
}
.nav-primary__list a:hover {
  color: var(--epikora-primary);
  border-bottom-color: var(--epikora-primary);
}

.nav-primary__list .menu-item-has-children {
  position: relative;
}
.nav-primary__list .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 14rem;
  margin: 0;
  padding: 0.45rem;
  list-style: none;
  background: var(--epikora-bg-elevated);
  border: 1px solid var(--epikora-border);
  border-radius: var(--epikora-radius-sm);
  box-shadow: var(--epikora-shadow);
  z-index: 120;
}
.nav-primary__list .menu-item-has-children:hover > .sub-menu,
.nav-primary__list .menu-item-has-children:focus-within > .sub-menu {
  display: block;
}
.nav-primary__list .sub-menu a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-bottom: 0;
  border-radius: 8px;
  font-weight: 600;
  white-space: nowrap;
}
.nav-primary__list .sub-menu a:hover {
  background: var(--epikora-bg-muted);
  color: var(--epikora-primary);
}

.mobile-menu__list .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0 0 0.35rem 0.85rem;
}
.mobile-menu__list .sub-menu a {
  font-weight: 500;
  font-size: 0.95rem;
  border-bottom-color: color-mix(in srgb, var(--epikora-border) 70%, transparent);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.icon-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--epikora-text);
  width: 2.5rem;
  height: 2.5rem;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  border-radius: 999px;
}
.icon-button:hover { background: var(--epikora-bg-muted); }
.icon-close { display: none; }
.icon-moon { display: none; }
html[data-theme="dark"] .icon-sun { display: none; }
html[data-theme="dark"] .icon-moon { display: inline; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .icon-sun { display: none; }
  html:not([data-theme="light"]) .icon-moon { display: inline; }
}

.mobile-menu {
  border-top: 1px solid var(--epikora-border);
  background: var(--epikora-bg-elevated);
  padding: 1rem 0 1.5rem;
}
.mobile-menu[hidden],
.search-overlay[hidden] { display: none !important; }
.mobile-menu__list { list-style: none; margin: 0; padding: 0 1rem; }
.mobile-menu__list a {
  display: block;
  padding: 0.85rem 0;
  color: var(--epikora-text);
  text-decoration: none;
  border-bottom: 1px solid var(--epikora-border);
  font-weight: 600;
}
body.menu-open .icon-menu { display: none; }
body.menu-open .icon-close { display: inline; }

.search-overlay {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  background: var(--epikora-bg-elevated);
  border-bottom: 1px solid var(--epikora-border);
  padding: 1rem 0;
  box-shadow: var(--epikora-shadow);
}
.search-overlay__inner {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.search-form { display: flex; gap: 0.5rem; flex: 1; position: relative; }
.search-form__input {
  flex: 1;
  min-height: 2.75rem;
  border: 1px solid var(--epikora-border);
  border-radius: var(--epikora-radius-sm);
  padding: 0.5rem 0.85rem;
  background: var(--epikora-bg);
  color: var(--epikora-text);
}
.epikora-hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.search-form__submit,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  border: 0;
  background: var(--epikora-primary);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.button:hover,
.search-form__submit:hover { filter: brightness(0.96); }
.button:active { transform: translateY(1px); }
.button--ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgb(255 255 255 / 55%);
}
.button--light {
  background: #fff;
  color: #0f172a;
}

html[data-theme="dark"] .button--light,
html:not([data-theme="light"]) .button--light {
  background: #fff;
  color: #0f172a;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .button--light {
    background: #fff;
    color: #0f172a;
  }
}

.button--soft {
  background: var(--epikora-primary-soft);
  color: var(--epikora-primary);
  border: 1px solid color-mix(in srgb, var(--epikora-primary) 25%, var(--epikora-border));
  min-height: 2.35rem;
  padding: 0.4rem 1rem;
  font-size: 0.875rem;
}

.button--soft:hover {
  background: var(--epikora-primary);
  color: #fff;
  border-color: var(--epikora-primary);
  filter: none;
}

.site-main { padding: 1.15rem 0 2rem; }
.site-main--home { padding-top: 1.5rem; padding-bottom: 1.25rem; }

.layout { display: grid; gap: 2rem; }

.page-header { margin-bottom: 1.75rem; }
.page-content.single-post .page-header {
  margin-bottom: 0.25rem;
}
.page-title {
  margin: 0 0 0.5rem;
  font-family: var(--epikora-font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--epikora-secondary);
}
.page-content .page-title.single-post__title {
  margin: 0.35rem 0 0.85rem;
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.section-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--epikora-primary);
}
.section-kicker--on-dark { color: rgb(255 255 255 / 80%); }

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.35rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--epikora-border);
}
.section-header h2 {
  margin: 0;
  font-family: var(--epikora-font-display);
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  letter-spacing: -0.02em;
}
.section-link {
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}

/* ——— Cards & media ——— */
.posts-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

/* Homepage feed: posts left + categories right */
.home-feed {
  display: grid;
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.home-feed--split {
  align-items: start;
}

.home-feed__posts,
.home-feed__aside {
  min-width: 0;
  align-self: start;
}

.archive-feed {
  display: grid;
  gap: 1.5rem;
  margin: 1.75rem 0 2.5rem;
}

.archive-feed--split {
  align-items: start;
}

.single-feed {
  display: grid;
  gap: 1.5rem;
}

.single-feed--split {
  align-items: start;
}

.single-feed__content {
  min-width: 0;
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.post-card--list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: var(--epikora-bg-elevated);
  border: 1px solid var(--epikora-border);
  border-radius: var(--epikora-radius);
  overflow: hidden;
  box-shadow: var(--epikora-shadow);
}

.post-card--list .post-card__media {
  aspect-ratio: 16 / 10;
  border-radius: 0;
}

.post-card--list .post-card__body {
  padding: 1rem 1.15rem 1.2rem;
}

.post-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem 0.75rem;
  margin-bottom: 0.45rem;
}

.post-card__top .post-card__cat,
.post-card__top .post-card__meta {
  margin: 0;
}

.post-card__top .post-card__meta {
  font-size: 0.8125rem;
  color: var(--epikora-text-muted);
  font-weight: 550;
  white-space: nowrap;
}

.post-card--list .post-card__title {
  font-size: 1.25rem;
}

.post-card__cta {
  margin: 0.85rem 0 0;
}

.post-card--list .post-card__cta .button {
  text-decoration: none;
}

.post-card--list:hover {
  transform: none;
  border-color: color-mix(in srgb, var(--epikora-primary) 35%, var(--epikora-border));
}

.home-cats-panel {
  background: var(--epikora-bg-elevated);
  border: 1px solid var(--epikora-border);
  border-radius: calc(var(--epikora-radius) + 2px);
  box-shadow: var(--epikora-shadow);
  overflow: hidden;
}

.home-feed__aside {
  display: grid;
  gap: 1rem;
  align-content: start;
  position: sticky;
  top: calc(var(--epikora-header-h) + 1rem);
}

body.admin-bar .home-feed__aside {
  top: calc(var(--epikora-header-h) + 32px + 0.75rem);
}

@media screen and (max-width: 782px) {
  body.admin-bar .home-feed__aside {
    top: calc(var(--epikora-header-h) + 46px + 0.75rem);
  }
}

@media screen and (max-width: 600px) {
  body.admin-bar .home-feed__aside {
    top: calc(var(--epikora-header-h) + 0.75rem);
  }
}

.home-cats-panel__head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.15rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--epikora-primary) 12%, transparent), transparent 70%),
    var(--epikora-bg-muted);
  border-bottom: 1px solid var(--epikora-border);
}

.home-cats-panel__icon {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  background: var(--epikora-primary);
  color: #fff;
  flex-shrink: 0;
}

.home-cats-panel__title {
  margin: 0;
  padding: 0;
  font-size: 1rem;
  font-family: var(--epikora-font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--epikora-secondary);
  background: transparent;
  border: 0;
  position: static;
}

.home-cats-panel__title::before {
  display: none;
}

.category-list {
  list-style: none;
  margin: 0;
  padding: 0.45rem;
}

.category-list li {
  border-bottom: 0;
  margin: 0;
}

.category-list a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.75rem;
  color: var(--epikora-text);
  text-decoration: none;
  font-weight: 650;
  font-size: 0.95rem;
  border-radius: 10px;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.category-list a:hover {
  color: var(--epikora-primary);
  background: var(--epikora-primary-soft);
}

.category-list__dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--epikora-primary);
  opacity: 0.55;
}

.category-list a:hover .category-list__dot {
  opacity: 1;
}

.category-list__name {
  min-width: 0;
  line-height: 1.3;
}

.category-list__count {
  min-width: 1.85rem;
  height: 1.85rem;
  display: inline-grid;
  place-items: center;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: var(--epikora-bg-muted);
  border: 1px solid var(--epikora-border);
  color: var(--epikora-text-muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.category-list a:hover .category-list__count {
  background: var(--epikora-bg-elevated);
  border-color: color-mix(in srgb, var(--epikora-primary) 35%, var(--epikora-border));
  color: var(--epikora-primary);
}

.popular-list {
  list-style: none;
  margin: 0;
  padding: 0.45rem;
  counter-reset: none;
}

.popular-list li {
  margin: 0;
}

.popular-list a {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.7rem;
  padding: 0.7rem 0.75rem;
  color: var(--epikora-text);
  text-decoration: none;
  font-weight: 650;
  font-size: 0.92rem;
  border-radius: 10px;
  transition: background 0.15s ease, color 0.15s ease;
}

.popular-list a:has(.popular-list__count) {
  grid-template-columns: auto 1fr auto;
}

.popular-list a:hover {
  color: var(--epikora-primary);
  background: var(--epikora-primary-soft);
}

.popular-list__rank {
  min-width: 1.7rem;
  height: 1.7rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--epikora-primary-soft);
  color: var(--epikora-primary);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.popular-list__name {
  min-width: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.popular-list__count {
  min-width: 1.85rem;
  height: 1.85rem;
  display: inline-grid;
  place-items: center;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: var(--epikora-bg-muted);
  border: 1px solid var(--epikora-border);
  color: var(--epikora-text-muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.popular-list a:hover .popular-list__count {
  background: var(--epikora-bg-elevated);
  border-color: color-mix(in srgb, var(--epikora-primary) 35%, var(--epikora-border));
  color: var(--epikora-primary);
}

.post-card {
  display: grid;
  gap: 0;
  background: var(--epikora-bg-elevated);
  border: 1px solid var(--epikora-border);
  border-radius: var(--epikora-radius);
  overflow: hidden;
  box-shadow: var(--epikora-shadow);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.post-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--epikora-primary) 35%, var(--epikora-border));
}
.post-card__media,
.spotlight__media,
.side-card__media {
  overflow: hidden;
  background: var(--epikora-bg-muted);
  aspect-ratio: 16 / 10;
  position: relative;
}
.post-card__media img,
.spotlight__media img,
.side-card__media img,
.post-thumbnail__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.post-card:hover .post-card__media img,
.side-card:hover .side-card__media img,
.spotlight:hover .spotlight__media img {
  transform: scale(1.03);
}

.media-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 100%;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.media-placeholder__mark {
  font-family: var(--epikora-font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  opacity: 0.92;
  padding: 1rem;
  text-align: center;
}
.media-placeholder--0 { background: linear-gradient(145deg, #0f766e 0%, #134e4a 55%, #0f172a 100%); }
.media-placeholder--1 { background: linear-gradient(145deg, #0369a1 0%, #0c4a6e 55%, #0f172a 100%); }
.media-placeholder--2 { background: linear-gradient(145deg, #b45309 0%, #7c2d12 55%, #1c1917 100%); }
.media-placeholder--3 { background: linear-gradient(145deg, #334155 0%, #1e293b 55%, #0f172a 100%); }
.media-placeholder--4 { background: linear-gradient(145deg, #0e7490 0%, #155e75 55%, #0f172a 100%); }

.post-card__body {
  display: grid;
  gap: 0.45rem;
  padding: 1rem 1.05rem 1.15rem;
}
.post-card__cat {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 800;
}
.post-card__cat a {
  color: var(--epikora-primary);
  text-decoration: none;
  background: var(--epikora-primary-soft);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}
.post-card__title {
  margin: 0;
  font-family: var(--epikora-font-display);
  font-size: 1.2rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.post-card__title a {
  color: var(--epikora-secondary);
  text-decoration: none;
}
.post-card__title a:hover { color: var(--epikora-primary); }
.post-card__excerpt {
  margin: 0;
  color: var(--epikora-text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}
.post-card__meta {
  margin: 0.15rem 0 0;
  color: var(--epikora-text-muted);
  font-size: 0.82rem;
  font-weight: 500;
}
.meta-sep { margin: 0 0.35rem; }

.post-card--ranked {
  position: relative;
}
.post-card__rank {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  background: var(--epikora-bg-elevated);
  color: var(--epikora-primary);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--epikora-border);
}

/* ——— Magazine hero ——— */
.home-featured { margin-bottom: 2.75rem; }

.magazine-hero {
  display: grid;
  gap: 1rem;
}

.spotlight {
  position: relative;
  border-radius: calc(var(--epikora-radius) + 2px);
  overflow: hidden;
  background: var(--epikora-secondary);
  box-shadow: var(--epikora-shadow);
  min-height: 22rem;
}
.spotlight__media {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  display: block;
}
.spotlight__media .media-placeholder,
.spotlight__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.spotlight__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(15 23 42 / 15%) 0%, rgb(15 23 42 / 78%) 100%);
  z-index: 1;
}
.spotlight__body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.65rem;
  min-height: 22rem;
  padding: 1.5rem 1.25rem;
  color: #fff;
}
.spotlight__body .post-card__cat a {
  background: rgb(255 255 255 / 16%);
  color: #fff;
}
.spotlight__title {
  margin: 0;
  font-family: var(--epikora-font-display);
  font-size: clamp(1.65rem, 4vw, 2.55rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  max-width: 18ch;
}
.spotlight__title a { color: #fff; text-decoration: none; }
.spotlight__excerpt {
  margin: 0;
  max-width: 42ch;
  color: rgb(255 255 255 / 82%);
  font-size: 0.98rem;
}
.spotlight__body .post-card__meta { color: rgb(255 255 255 / 72%); }
.spotlight__cta { margin: 0.35rem 0 0; }

.magazine-side {
  display: grid;
  gap: 0.65rem;
  align-content: stretch;
}
.side-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 0.85rem;
  align-items: center;
  padding: 0.75rem;
  background: var(--epikora-bg-elevated);
  border: 1px solid var(--epikora-border);
  border-radius: var(--epikora-radius);
  box-shadow: var(--epikora-shadow);
}
.side-card--news {
  position: relative;
  grid-template-columns: 88px 1fr;
  gap: 0.75rem;
  min-height: 5.25rem;
  padding: 0.65rem 0.75rem 0.65rem 0.65rem;
}
.side-card__rank {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  z-index: 2;
  width: 1.45rem;
  height: 1.45rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--epikora-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
}
.side-card__media {
  border-radius: var(--epikora-radius-sm);
  aspect-ratio: 1;
  overflow: hidden;
}
.side-card--news .side-card__media {
  aspect-ratio: 4 / 3;
}
.side-card--news .post-card__cat {
  margin-bottom: 0.15rem;
}
.side-card--news .post-card__cat a {
  font-size: 0.65rem;
  padding: 0.12rem 0.4rem;
}
.side-card__title {
  margin: 0.15rem 0;
  font-family: var(--epikora-font-display);
  font-size: 1.02rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.side-card__title a {
  color: var(--epikora-secondary);
  text-decoration: none;
}
.side-card__title a:hover { color: var(--epikora-primary); }
.side-card--news .post-card__meta {
  margin-top: 0.15rem;
  font-size: 0.78rem;
}

.home-latest,
.home-categories,
.home-popular {
  margin: 2.75rem 0;
}
.home-cta {
  margin: 2.25rem 0 0;
}

.home-featured {
  margin-top: 0.25rem;
}

.category-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr 1fr;
}
.category-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.35rem;
  min-height: 7.5rem;
  padding: 1.1rem;
  border-radius: var(--epikora-radius);
  text-decoration: none;
  color: #fff;
  border: 0;
  box-shadow: var(--epikora-shadow);
  transition: transform 0.18s ease;
}
.category-card:hover { transform: translateY(-2px); color: #fff; }
.category-card__name {
  font-family: var(--epikora-font-display);
  font-weight: 700;
  font-size: 1.2rem;
}
.category-card__count {
  opacity: 0.85;
  font-size: 0.85rem;
}
.category-card--0 { background: linear-gradient(145deg, #0f766e, #115e59); }
.category-card--1 { background: linear-gradient(145deg, #0369a1, #0c4a6e); }
.category-card--2 { background: linear-gradient(145deg, #b45309, #7c2d12); }
.category-card--3 { background: linear-gradient(145deg, #334155, #1e293b); }
.category-card--4 { background: linear-gradient(145deg, #0e7490, #155e75); }

.home-cta__inner {
  padding: clamp(2rem, 5vw, 3rem) 1.5rem;
  border-radius: calc(var(--epikora-radius) + 4px);
  background:
    radial-gradient(circle at 20% 20%, rgb(255 255 255 / 12%), transparent 40%),
    linear-gradient(135deg, #0f766e 0%, #134e4a 48%, #0f172a 100%);
  color: #fff;
  text-align: center;
  border: 0;
  box-shadow: var(--epikora-shadow);
}
.home-cta__inner h2 {
  margin: 0.25rem 0 0.65rem;
  font-family: var(--epikora-font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: #fff;
}
.home-cta__text {
  margin: 0 auto 1.25rem;
  max-width: 36rem;
  color: rgb(255 255 255 / 85%);
}
.home-cta__actions { margin: 0; }

/* ——— Single / content ——— */
.breadcrumb {
  display: inline-flex;
  max-width: 100%;
  margin: 0 0 1.15rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--epikora-text-muted);
  background: color-mix(in srgb, var(--epikora-bg-muted) 42%, var(--epikora-bg-elevated));
  border: 1px solid color-mix(in srgb, var(--epikora-border) 70%, transparent);
  border-radius: 999px;
}
.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.breadcrumb__item {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}
.breadcrumb__item:not(:last-child)::after {
  content: "";
  width: 0.34rem;
  height: 0.34rem;
  margin-left: 0.5rem;
  border-right: 2px solid color-mix(in srgb, var(--epikora-text) 45%, transparent);
  border-bottom: 2px solid color-mix(in srgb, var(--epikora-text) 45%, transparent);
  transform: rotate(-45deg);
  flex-shrink: 0;
}
.breadcrumb a {
  color: var(--epikora-secondary);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--epikora-primary);
}
.breadcrumb [aria-current="page"] {
  color: color-mix(in srgb, var(--epikora-text) 78%, var(--epikora-text-muted));
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(22rem, 55vw);
}
.breadcrumb--rankmath a,
.breadcrumb--yoast a {
  color: var(--epikora-secondary);
  font-weight: 600;
  text-decoration: none;
}
.breadcrumb--rankmath a:hover,
.breadcrumb--yoast a:hover {
  color: var(--epikora-primary);
}

.single-post__title {
  margin: 0.35rem 0 0.85rem;
  font-family: var(--epikora-font-display);
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--epikora-secondary);
  overflow-wrap: anywhere;
  hyphens: auto;
}
.single-post__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.4rem;
  margin: 0;
  padding: 0.65rem 0.75rem;
  background: color-mix(in srgb, var(--epikora-bg-muted) 42%, var(--epikora-bg-elevated));
  border: 1px solid color-mix(in srgb, var(--epikora-border) 70%, transparent);
  border-radius: var(--epikora-radius-sm);
  color: var(--epikora-text-muted);
  font-size: 0.875rem;
  font-weight: 550;
  line-height: 1.35;
}
.single-post__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: var(--epikora-bg-elevated);
  border: 1px solid color-mix(in srgb, var(--epikora-border) 75%, transparent);
  color: var(--epikora-text);
}
.single-post__author-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--epikora-primary) 45%, transparent);
  text-underline-offset: 0.12em;
}
.single-post__author-link:hover,
.single-post__author-link:focus-visible {
  color: var(--epikora-primary);
  text-decoration-color: var(--epikora-primary);
}
.single-post__meta-item--reading {
  background: var(--epikora-primary-soft);
  border-color: color-mix(in srgb, var(--epikora-primary) 22%, var(--epikora-border));
  color: var(--epikora-primary);
  font-weight: 700;
}
.single-post__cats { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 0.75rem; }
.chip {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--epikora-primary-soft);
  border: 0;
  color: var(--epikora-primary);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 700;
}
.single-post {
  background: var(--epikora-bg-elevated);
  border: 1px solid var(--epikora-border);
  border-radius: calc(var(--epikora-radius) + 4px);
  box-shadow: var(--epikora-shadow);
  padding: clamp(1.15rem, 2.8vw, 2rem) clamp(1.1rem, 3vw, 2.15rem) clamp(1.35rem, 3vw, 2.25rem);
}
.single-post__header {
  margin-bottom: 0.25rem;
}
.single-post__thumbnail {
  width: 100%;
  margin: 1.15rem 0 1.35rem;
  border-radius: var(--epikora-radius);
  overflow: hidden;
  background: var(--epikora-bg-muted);
  aspect-ratio: 2 / 1;
}
.single-post__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.single-post .author-box,
.single-post .epikora-toc,
.single-post .related-posts {
  box-shadow: none;
}
.single-post .post-navigation {
  margin-top: 1.25rem;
  padding-top: 0;
  border-top: none;
}

.single-post .share-buttons + .post-navigation {
  margin-top: 1.15rem;
}

.entry-content {
  max-width: none;
  font-size: 1.08rem;
}
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-family: var(--epikora-font-display);
  line-height: 1.25;
  color: var(--epikora-secondary);
  margin-top: 1.75em;
  letter-spacing: -0.02em;
}
.entry-content p,
.entry-content ul,
.entry-content ol { margin: 0 0 1.15em; }
.entry-content img { border-radius: var(--epikora-radius-sm); }
.entry-content blockquote {
  margin: 1.5em 0;
  padding: 0.25em 0 0.25em 1em;
  border-left: 3px solid var(--epikora-primary);
  color: var(--epikora-text-muted);
}
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}
.entry-content th,
.entry-content td {
  border: 1px solid var(--epikora-border);
  padding: 0.6rem 0.75rem;
  text-align: left;
}
.entry-content .wp-block-button__link {
  background: var(--epikora-primary);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
}

/* Built-in TOC */
.epikora-toc {
  margin: 1.5rem 0 1.75rem;
  border: 1px solid var(--epikora-border);
  border-radius: var(--epikora-radius);
  background: var(--epikora-bg-elevated);
  box-shadow: var(--epikora-shadow);
  overflow: hidden;
}

.epikora-toc__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.15rem;
  border: 0;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--epikora-primary) 10%, transparent), transparent 65%),
    var(--epikora-bg-muted);
  color: var(--epikora-secondary);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}

.epikora-toc__toggle-icon {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.epikora-toc.is-open .epikora-toc__toggle-icon {
  transform: rotate(-135deg);
}

.epikora-toc__list {
  list-style: none;
  margin: 0;
  padding: 0.55rem 0.65rem 0.75rem;
  border-top: 1px solid var(--epikora-border);
  counter-reset: epikora-toc;
}

.epikora-toc__item {
  margin: 0;
}

.epikora-toc__item a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  padding: 0.55rem 0.55rem;
  border-radius: 10px;
  color: var(--epikora-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
}

.epikora-toc__item a::before {
  counter-increment: epikora-toc;
  content: counter(epikora-toc);
  min-width: 1.5rem;
  height: 1.5rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--epikora-primary-soft);
  color: var(--epikora-primary);
  font-size: 0.72rem;
  font-weight: 800;
}

.epikora-toc__item--h3 a {
  padding-left: 1.35rem;
  font-weight: 550;
  font-size: 0.9rem;
  color: var(--epikora-text-muted);
}

.epikora-toc__item a:hover {
  background: var(--epikora-primary-soft);
  color: var(--epikora-primary);
}

html[data-theme="dark"] .epikora-toc__toggle {
  color: var(--epikora-secondary);
}

html[data-theme="dark"] .epikora-toc__item a {
  color: var(--epikora-text);
}

html[data-theme="dark"] .epikora-toc__item a:hover {
  color: #5eead4;
}

.ez-toc-container,
#ez-toc-container {
  background: var(--epikora-bg-elevated);
  border: 1px solid var(--epikora-border);
  border-radius: var(--epikora-radius);
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
  box-shadow: var(--epikora-shadow);
}
.intelly-related-posts,
.irp,
.wpp-list { margin: 1.25rem 0; }
.wpp-list li { margin-bottom: 0.75rem; }

.author-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.25rem;
  margin: 2rem 0;
  border: 1px solid var(--epikora-border);
  border-radius: var(--epikora-radius);
  background: var(--epikora-bg-elevated);
  box-shadow: var(--epikora-shadow);
}
.author-box__avatar { border-radius: 50%; }
.author-box__name { margin: 0 0 0.35rem; font-size: 1.1rem; }

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 1.75rem 0 0.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--epikora-border);
  border-radius: var(--epikora-radius);
  background: color-mix(in srgb, var(--epikora-bg-muted) 45%, var(--epikora-bg-elevated));
}

.share-buttons__label {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--epikora-text-muted);
}

.share-buttons__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.share-buttons__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.35rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--epikora-border);
  border-radius: 999px;
  background: var(--epikora-bg-elevated);
  color: var(--epikora-text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}

.share-buttons__btn svg {
  flex-shrink: 0;
}

.share-buttons__btn:hover,
.share-buttons__btn:focus-visible {
  border-color: color-mix(in srgb, var(--epikora-primary) 40%, var(--epikora-border));
  color: var(--epikora-primary);
}

.share-buttons__btn.is-copied {
  border-color: var(--epikora-primary);
  color: var(--epikora-primary);
}

@media (max-width: 480px) {
  .share-buttons__name {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .share-buttons__btn {
    justify-content: center;
    width: 2.5rem;
    padding: 0;
  }
}

.related-posts { margin: 2.5rem 0; }
.post-navigation .nav-links {
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
}
.post-navigation a {
  display: block;
  padding: 1rem;
  border: 1px solid var(--epikora-border);
  border-radius: var(--epikora-radius);
  text-decoration: none;
  color: inherit;
  background: var(--epikora-bg-elevated);
}
.nav-subtitle {
  display: block;
  font-size: 0.8rem;
  color: var(--epikora-text-muted);
  margin-bottom: 0.25rem;
}

.comments-area { margin-top: 2.5rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-body {
  padding: 1rem 0;
  border-bottom: 1px solid var(--epikora-border);
}
.comment-form label { display: block; margin-bottom: 0.35rem; font-weight: 600; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--epikora-border);
  border-radius: var(--epikora-radius-sm);
  padding: 0.65rem 0.75rem;
  background: var(--epikora-bg-elevated);
  color: var(--epikora-text);
}

.navigation.pagination {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--epikora-border);
}

.navigation.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0;
}

.navigation.pagination a,
.navigation.pagination span {
  display: inline-flex;
  min-width: 2.5rem;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--epikora-border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--epikora-text);
  padding: 0 0.85rem;
  background: var(--epikora-bg-elevated);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
}

.navigation.pagination a:hover,
.navigation.pagination a:focus-visible {
  border-color: color-mix(in srgb, var(--epikora-primary) 45%, var(--epikora-border));
  color: var(--epikora-primary);
}

.navigation.pagination .current {
  background: var(--epikora-primary);
  border-color: var(--epikora-primary);
  color: #fff;
}

.navigation.pagination .prev,
.navigation.pagination .next {
  min-width: auto;
}

.archive-feed__posts .navigation.pagination {
  width: 100%;
}

.sidebar {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.sidebar .widget {
  margin: 0;
  padding: 0;
  border: 1px solid var(--epikora-border);
  border-radius: var(--epikora-radius);
  background: var(--epikora-bg-elevated);
  box-shadow: var(--epikora-shadow);
  overflow: hidden;
}

/* Hide leftover empty block widgets (blank Group, etc.) */
.sidebar .widget_block:has(> .wp-block-group:empty:only-child),
.sidebar .widget_block:has(> :empty:only-child) {
  display: none;
}

.sidebar .widget-title {
  margin: 0;
  padding: 0.9rem 1.1rem;
  font-size: 0.95rem;
  font-family: var(--epikora-font);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--epikora-secondary);
  background: var(--epikora-bg-muted);
  border-bottom: 1px solid var(--epikora-border);
  position: relative;
}

.sidebar .widget-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7rem;
  bottom: 0.7rem;
  width: 3px;
  border-radius: 999px;
  background: var(--epikora-primary);
}

.sidebar .widget > *:not(.widget-title) {
  padding: 1rem 1.1rem 1.15rem;
}

.sidebar .widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar .widget li {
  margin: 0;
  border-bottom: 1px solid var(--epikora-border);
}

.sidebar .widget li:last-child {
  border-bottom: 0;
}

.sidebar .widget li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0;
  color: var(--epikora-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.35;
}

.sidebar .widget li a:hover {
  color: var(--epikora-primary);
}

.sidebar .widget_categories .cat-item,
.sidebar .widget_archive li,
.sidebar .widget_recent_entries li,
.sidebar .widget_meta li,
.sidebar .widget_pages li,
.sidebar .widget_nav_menu li {
  padding: 0;
}

.sidebar .widget_categories .cat-item a::after,
.sidebar .widget_archive li a::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid var(--epikora-border);
  border-bottom: 2px solid var(--epikora-border);
  transform: rotate(-45deg);
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar .widget_recent_comments li {
  padding: 0.7rem 0;
  color: var(--epikora-text-muted);
  font-size: 0.9rem;
}

.sidebar .widget_search .widget-title + .search-form,
.sidebar .widget_search .search-form {
  padding: 1rem 1.1rem 1.15rem;
}

.sidebar .search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.sidebar .search-form__input {
  min-width: 0;
  width: 100%;
  background: var(--epikora-bg);
  border-radius: 999px;
  padding-inline: 0.95rem;
}

.sidebar .search-form__submit {
  border-radius: 999px;
  padding-inline: 1rem;
  min-height: 2.6rem;
}

.sidebar select {
  width: 100%;
  min-height: 2.6rem;
  border: 1px solid var(--epikora-border);
  border-radius: var(--epikora-radius-sm);
  background: var(--epikora-bg);
  color: var(--epikora-text);
  padding: 0.45rem 0.7rem;
}

.sidebar .widget_tag_cloud .tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.sidebar .widget_tag_cloud a {
  display: inline-flex;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--epikora-bg-muted);
  border: 1px solid var(--epikora-border);
  color: var(--epikora-text);
  text-decoration: none;
  font-size: 0.8rem !important;
  font-weight: 600;
}

.sidebar .widget_tag_cloud a:hover {
  border-color: var(--epikora-primary);
  color: var(--epikora-primary);
}

.ad-slot--sidebar {
  border-radius: var(--epikora-radius);
  border: 1px dashed var(--epikora-border);
  background: var(--epikora-bg-muted);
}

.widget-title {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  font-family: var(--epikora-font-display);
}

/* Archive / category intro card */
.archive-header {
  margin-bottom: 1.75rem;
}

.archive-header .page-title {
  margin-bottom: 1rem;
}

.archive-header__count {
  margin: 0;
  color: var(--epikora-text-muted);
  font-weight: 600;
  font-size: 0.925rem;
}

.archive-intro-card {
  display: grid;
  grid-template-columns: 5px 1fr;
  gap: 0;
  background: var(--epikora-bg-elevated);
  border: 1px solid var(--epikora-border);
  border-radius: var(--epikora-radius);
  box-shadow: var(--epikora-shadow);
  overflow: hidden;
}

.archive-intro-card__accent {
  background: linear-gradient(180deg, var(--epikora-primary), color-mix(in srgb, var(--epikora-primary) 40%, #0f172a));
}

.archive-intro-card__body {
  padding: 1.15rem 1.25rem 1.25rem;
}

.archive-intro-card__meta {
  margin: 0 0 0.75rem;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--epikora-primary-soft);
  color: var(--epikora-primary);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.35;
}

.archive-header__count {
  margin: 0.5rem 0 0;
  color: var(--epikora-text-muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.archive-intro-card__content {
  color: var(--epikora-text);
  font-size: 0.98rem;
  line-height: 1.7;
}

.archive-intro-card__content > *:first-child {
  margin-top: 0;
}

.archive-intro-card__content > *:last-child {
  margin-bottom: 0;
}

.archive-intro-card__content p {
  margin: 0 0 0.75em;
  color: var(--epikora-text-muted);
}

.ad-slot {
  min-height: var(--epikora-ad-min);
  display: grid;
  place-items: center;
  margin: 1rem 0;
  background: var(--epikora-bg-muted);
  border-radius: var(--epikora-radius-sm);
}
.ad-slot--header { min-height: 90px; }
.ad-slot--in-content { min-height: 250px; }
.ad-slot--sidebar { min-height: 250px; }
.ad-slot--footer { min-height: 90px; }

.error-404 { text-align: center; max-width: 40rem; margin: 0 auto; }
.error-404__code {
  font-size: 4.5rem;
  font-weight: 800;
  margin: 0;
  color: var(--epikora-primary);
  font-family: var(--epikora-font-display);
}
.error-404__latest { margin-top: 3rem; text-align: left; }

.site-footer {
  margin-top: 0;
  border-top: 1px solid var(--epikora-border);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--epikora-primary) 6%, transparent), transparent 7rem),
    var(--epikora-bg-elevated);
  color: var(--epikora-text);
}

.site-footer__main {
  padding: 2.75rem 0 2rem;
}

.site-footer__grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.site-footer__brand {
  max-width: 28rem;
}

.site-footer__logo {
  margin-bottom: 0.85rem;
}

.site-footer__logo .site-title,
.site-footer__logo .site-branding__link {
  font-size: 1.45rem;
}

.site-footer__desc {
  margin: 0;
  color: var(--epikora-text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.site-footer__heading {
  margin: 0 0 0.9rem;
  font-size: 0.8rem;
  font-family: var(--epikora-font);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--epikora-secondary);
}

.site-footer__col .widget-title {
  margin: 0 0 0.9rem;
  font-size: 0.8rem;
  font-family: var(--epikora-font);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-menu,
.footer-legal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.footer-menu a,
.footer-legal-list a {
  color: var(--epikora-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
}

.footer-menu a:hover,
.footer-legal-list a:hover {
  color: var(--epikora-primary);
}

.site-footer .social-links {
  margin-top: 1.15rem;
}

.site-footer .social-links a {
  color: var(--epikora-text);
  display: inline-grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 12px;
  background: var(--epikora-bg-muted);
  border: 1px solid var(--epikora-border);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.site-footer .social-links a:hover {
  background: var(--epikora-primary-soft);
  border-color: color-mix(in srgb, var(--epikora-primary) 35%, var(--epikora-border));
  color: var(--epikora-primary);
}

.site-footer__bottom {
  padding: 1.15rem 0 1.35rem;
  border-top: 1px solid var(--epikora-border);
  background: color-mix(in srgb, var(--epikora-bg-muted) 55%, var(--epikora-bg-elevated));
  color: var(--epikora-text-muted);
  font-size: 0.875rem;
}

.site-footer__bottom-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
  width: 100%;
}

.site-footer__credit-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  margin: 0;
  padding: 0.55rem 1rem;
  background: var(--epikora-bg-elevated);
  border: 1px solid color-mix(in srgb, var(--epikora-border) 80%, transparent);
  border-radius: 999px;
  box-shadow: var(--epikora-shadow);
  color: var(--epikora-text-muted);
  font-size: 0.875rem;
  font-weight: 550;
  line-height: 1.4;
}

.site-footer__backlinks {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.75rem 0 0;
  border: 0;
  border-top: 1px solid var(--epikora-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--epikora-text-muted);
  font-size: 0.875rem;
  font-weight: 550;
  line-height: 1.45;
  text-align: center;
}

.site-footer__backlinks a {
  color: var(--epikora-text);
  text-decoration: none;
  font-weight: 650;
}

.site-footer__backlinks a:hover {
  color: var(--epikora-primary);
}

.site-footer__backlinks p {
  margin: 0;
}

.site-footer__copy {
  color: var(--epikora-text-muted);
}

.site-footer__legal-inline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.site-footer__legal-inline a {
  color: var(--epikora-text-muted);
  text-decoration: none;
  font-weight: 600;
}

.site-footer__legal-inline a:hover {
  color: var(--epikora-primary);
}

.social-links {
  list-style: none;
  display: flex;
  gap: 0.65rem;
  margin: 1rem 0 0;
  padding: 0;
}
.social-links a {
  color: var(--epikora-text);
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  background: var(--epikora-bg-muted);
  border: 1px solid var(--epikora-border);
}

.author-header {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.author-header__avatar { border-radius: 50%; }

@media (min-width: 768px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .posts-grid--two { grid-template-columns: repeat(2, 1fr); }
  .archive-feed--split,
  .single-feed--split {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 1.75rem;
  }
  .post-card--list {
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: stretch;
  }
  .post-card--list .post-card__media {
    aspect-ratio: auto;
    height: 100%;
    min-height: 160px;
  }
  .post-card--list .post-card__media img,
  .post-card--list .post-card__media .media-placeholder {
    height: 100%;
  }
  .magazine-hero:not(.magazine-hero--solo) {
    grid-template-columns: 1.45fr 1fr;
    align-items: stretch;
  }
  .spotlight,
  .spotlight__body { min-height: 28rem; }
  .magazine-side {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    height: 100%;
  }
  .side-card--news {
    flex: 1 1 0;
    min-height: 0;
  }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .site-footer__grid {
    grid-template-columns: minmax(0, 1.6fr) repeat(auto-fit, minmax(150px, 1fr));
    gap: 2.25rem 2.5rem;
  }
  .post-navigation .nav-links { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .site-header__menu-toggle { display: none; }
  .nav-primary { display: flex; align-items: center; }
  .site-branding__mobile { display: none; }
  .site-branding__desktop { display: inline-flex; align-items: center; }
  .has-sidebar .layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }
  .has-sidebar.sidebar-left .layout {
    grid-template-columns: 320px minmax(0, 1fr);
  }
  .has-sidebar.sidebar-left .content-area { order: 2; }
  .has-sidebar.sidebar-left .sidebar { order: 1; }
  .has-sidebar .sidebar {
    position: sticky;
    top: calc(var(--epikora-header-h) + 1.25rem);
  }
  body.admin-bar.has-sidebar .sidebar {
    top: calc(var(--epikora-header-h) + 32px + 1.25rem);
  }
  body.page.no-sidebar .content-area {
    max-width: calc(var(--epikora-container) - 320px - 2rem);
    justify-self: start;
    width: 100%;
  }
  .posts-grid { grid-template-columns: repeat(3, 1fr); }
  .posts-grid--two { grid-template-columns: repeat(2, 1fr); }
  .posts-grid--compact { grid-template-columns: repeat(4, 1fr); }
  .spotlight__body { padding: 2rem; }
  .home-feed--split,
  .archive-feed--split,
  .single-feed--split {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 1.75rem;
  }
  .post-card--list {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .post-card--list .post-card__title {
    font-size: 1.35rem;
  }
}

@media screen and (max-width: 782px) {
  body.admin-bar.has-sidebar .sidebar {
    top: calc(var(--epikora-header-h) + 46px + 1.25rem);
  }
}

@media (max-width: 767px) {
  .site-branding__desktop { display: none; }
  .site-branding__mobile { display: inline-flex; align-items: center; }
  .side-card { grid-template-columns: 96px 1fr; }
}

@media (min-width: 1280px) {
  .site-main--home { padding-top: 2rem; }
}

/* ——— Dark mode readability (must stay WCAG-friendly) ——— */
html[data-theme="dark"] .page-title,
html[data-theme="dark"] .section-header h2,
html[data-theme="dark"] .post-card__title a,
html[data-theme="dark"] .side-card__title a,
html[data-theme="dark"] .hero-card__title a,
html[data-theme="dark"] .single-post__title,
html[data-theme="dark"] .widget-title,
html[data-theme="dark"] .author-box__name,
html[data-theme="dark"] .site-branding__link,
html[data-theme="dark"] .site-title,
html[data-theme="dark"] .entry-content h1,
html[data-theme="dark"] .entry-content h2,
html[data-theme="dark"] .entry-content h3,
html[data-theme="dark"] .entry-content h4,
html[data-theme="dark"] .entry-content h5,
html[data-theme="dark"] .entry-content h6 {
  color: var(--epikora-secondary);
}

html[data-theme="dark"] .entry-content,
html[data-theme="dark"] .post-card__excerpt,
html[data-theme="dark"] .archive-description,
html[data-theme="dark"] .author-box,
html[data-theme="dark"] .widget,
html[data-theme="dark"] .comment-body {
  color: var(--epikora-text);
}

html[data-theme="dark"] .breadcrumb {
  color: var(--epikora-text-muted);
  background: color-mix(in srgb, var(--epikora-bg-muted) 55%, var(--epikora-bg-elevated));
  border: 1px solid var(--epikora-border);
}

html[data-theme="dark"] .single-post {
  background: var(--epikora-bg-elevated);
  border-color: var(--epikora-border);
}

html[data-theme="dark"] .breadcrumb a,
html[data-theme="dark"] .breadcrumb--rankmath a,
html[data-theme="dark"] .breadcrumb--yoast a {
  color: var(--epikora-secondary);
}

html[data-theme="dark"] .single-post__meta {
  color: var(--epikora-text-muted);
  background: color-mix(in srgb, var(--epikora-bg-muted) 55%, var(--epikora-bg-elevated));
  border-color: var(--epikora-border);
}

html[data-theme="dark"] .single-post__meta-item {
  background: var(--epikora-bg-elevated);
  color: var(--epikora-text);
  border-color: var(--epikora-border);
}

html[data-theme="dark"] .single-post__meta-item--reading {
  color: #5eead4;
  background: color-mix(in srgb, var(--epikora-primary) 18%, transparent);
  border-color: color-mix(in srgb, var(--epikora-primary) 35%, var(--epikora-border));
}

html[data-theme="dark"] .site-footer {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--epikora-primary) 10%, transparent), transparent 7rem),
    var(--epikora-bg-elevated);
}

html[data-theme="dark"] .site-footer__heading,
html[data-theme="dark"] .site-footer__col .widget-title {
  color: var(--epikora-secondary);
}

html[data-theme="dark"] .footer-menu a,
html[data-theme="dark"] .footer-legal-list a {
  color: var(--epikora-text);
}

html[data-theme="dark"] .site-footer__bottom {
  background: color-mix(in srgb, var(--epikora-bg-muted) 70%, var(--epikora-bg-elevated));
}

html[data-theme="dark"] .site-footer__credit-card {
  background: var(--epikora-bg-elevated);
  border-color: var(--epikora-border);
  color: var(--epikora-text-muted);
}

html[data-theme="dark"] .site-footer__backlinks {
  background: transparent;
  border-top-color: var(--epikora-border);
  box-shadow: none;
  color: var(--epikora-text-muted);
}

html[data-theme="dark"] .site-footer__backlinks a {
  color: var(--epikora-text);
}

html[data-theme="dark"] .entry-content a,
html[data-theme="dark"] .widget a,
html[data-theme="dark"] .section-link {
  color: #5eead4;
}

html[data-theme="dark"] .entry-content a:hover,
html[data-theme="dark"] .widget a:hover,
html[data-theme="dark"] .section-link:hover {
  color: #99f6e4;
}

/* Gutenberg forced dark text on dark background */
html[data-theme="dark"] .entry-content .has-black-color,
html[data-theme="dark"] .entry-content .has-dark-gray-color,
html[data-theme="dark"] .entry-content .has-cyan-bluish-gray-color {
  color: var(--epikora-text) !important;
}

html[data-theme="dark"] .entry-content .has-white-background-color,
html[data-theme="dark"] .entry-content .has-light-gray-background-color {
  color: #0f172a !important;
}

html[data-theme="dark"] .wp-block-quote,
html[data-theme="dark"] .entry-content blockquote {
  color: var(--epikora-text-muted);
  border-left-color: var(--epikora-primary);
}

html[data-theme="dark"] .home-cats-panel__title {
  color: var(--epikora-secondary);
}

html[data-theme="dark"] .category-list a {
  color: var(--epikora-text);
}

html[data-theme="dark"] .category-list a:hover {
  color: #5eead4;
  background: color-mix(in srgb, var(--epikora-primary) 18%, transparent);
}

html[data-theme="dark"] .category-list__count {
  background: var(--epikora-bg-muted);
  color: var(--epikora-text-muted);
}

html[data-theme="dark"] .sidebar .widget-title {
  color: var(--epikora-secondary);
}

html[data-theme="dark"] .sidebar .widget li a {
  color: var(--epikora-text);
}

html[data-theme="dark"] .sidebar .widget li a:hover {
  color: #5eead4;
}

/* Dark chrome: AA-friendlier accents on dark surfaces */
html[data-theme="dark"] .nav-primary__list a:hover,
html[data-theme="dark"] .nav-primary__list .current-menu-item > a,
html[data-theme="dark"] .post-card__title a:hover,
html[data-theme="dark"] .side-card__title a:hover,
html[data-theme="dark"] .popular-list a:hover,
html[data-theme="dark"] .share-buttons__btn:hover,
html[data-theme="dark"] .share-buttons__btn:focus-visible,
html[data-theme="dark"] .share-buttons__btn.is-copied,
html[data-theme="dark"] .navigation.pagination a:hover,
html[data-theme="dark"] .navigation.pagination a:focus-visible,
html[data-theme="dark"] .single-post__author-link:hover,
html[data-theme="dark"] .single-post__author-link:focus-visible,
html[data-theme="dark"] .post-card__cat a,
html[data-theme="dark"] .epikora-toc a,
html[data-theme="dark"] .button--soft {
  color: var(--epikora-primary-readable);
}

html[data-theme="dark"] .button--soft {
  border-color: color-mix(in srgb, var(--epikora-primary-readable) 35%, var(--epikora-border));
  background: color-mix(in srgb, var(--epikora-primary) 18%, transparent);
}

html[data-theme="dark"] .navigation.pagination .current {
  background: var(--epikora-primary);
  border-color: var(--epikora-primary);
  color: #fff;
}

html[data-theme="dark"] .epikora-toc {
  background: var(--epikora-bg-elevated);
  border-color: var(--epikora-border);
  color: var(--epikora-text);
}

html[data-theme="dark"] .epikora-toc__title,
html[data-theme="dark"] .share-buttons__label {
  color: var(--epikora-text-muted);
}

html[data-theme="dark"] .share-buttons {
  background: color-mix(in srgb, var(--epikora-bg-muted) 55%, var(--epikora-bg-elevated));
  border-color: var(--epikora-border);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .page-title,
  html:not([data-theme="light"]) .section-header h2,
  html:not([data-theme="light"]) .post-card__title a,
  html:not([data-theme="light"]) .side-card__title a,
  html:not([data-theme="light"]) .hero-card__title a,
  html:not([data-theme="light"]) .single-post__title,
  html:not([data-theme="light"]) .widget-title,
  html:not([data-theme="light"]) .author-box__name,
  html:not([data-theme="light"]) .site-branding__link,
  html:not([data-theme="light"]) .site-title,
  html:not([data-theme="light"]) .entry-content h1,
  html:not([data-theme="light"]) .entry-content h2,
  html:not([data-theme="light"]) .entry-content h3,
  html:not([data-theme="light"]) .entry-content h4,
  html:not([data-theme="light"]) .entry-content h5,
  html:not([data-theme="light"]) .entry-content h6,
  html:not([data-theme="light"]) .home-cats-panel__title,
  html:not([data-theme="light"]) .site-footer__heading,
  html:not([data-theme="light"]) .site-footer__col .widget-title,
  html:not([data-theme="light"]) .sidebar .widget-title {
    color: var(--epikora-secondary);
  }

  html:not([data-theme="light"]) .entry-content,
  html:not([data-theme="light"]) .post-card__excerpt,
  html:not([data-theme="light"]) .archive-description,
  html:not([data-theme="light"]) .author-box,
  html:not([data-theme="light"]) .widget,
  html:not([data-theme="light"]) .comment-body,
  html:not([data-theme="light"]) .category-list a,
  html:not([data-theme="light"]) .footer-menu a,
  html:not([data-theme="light"]) .footer-legal-list a,
  html:not([data-theme="light"]) .sidebar .widget li a {
    color: var(--epikora-text);
  }

  html:not([data-theme="light"]) .entry-content a,
  html:not([data-theme="light"]) .widget a,
  html:not([data-theme="light"]) .section-link,
  html:not([data-theme="light"]) .nav-primary__list a:hover,
  html:not([data-theme="light"]) .post-card__title a:hover,
  html:not([data-theme="light"]) .category-list a:hover,
  html:not([data-theme="light"]) .sidebar .widget li a:hover,
  html:not([data-theme="light"]) .button--soft {
    color: var(--epikora-primary-readable);
  }

  html:not([data-theme="light"]) .entry-content .has-black-color,
  html:not([data-theme="light"]) .entry-content .has-dark-gray-color,
  html:not([data-theme="light"]) .entry-content .has-cyan-bluish-gray-color {
    color: var(--epikora-text) !important;
  }

  html:not([data-theme="light"]) .entry-content .has-white-background-color,
  html:not([data-theme="light"]) .entry-content .has-light-gray-background-color {
    color: #0f172a !important;
  }

  html:not([data-theme="light"]) .breadcrumb,
  html:not([data-theme="light"]) .single-post__meta,
  html:not([data-theme="light"]) .share-buttons,
  html:not([data-theme="light"]) .epikora-toc {
    color: var(--epikora-text-muted);
    background: color-mix(in srgb, var(--epikora-bg-muted) 55%, var(--epikora-bg-elevated));
    border-color: var(--epikora-border);
  }

  html:not([data-theme="light"]) .single-post {
    background: var(--epikora-bg-elevated);
    border-color: var(--epikora-border);
  }
}

