/**
 * Hemik 2.0 — Main stylesheet
 *
 * FASE 2: capa visual global.
 *
 * Este archivo se carga después de los módulos base, layout y utilities.
 * No utiliza @import para evitar cascadas de solicitudes CSS. La carga y
 * el orden se gestionan desde inc/assets.php.
 */

body {
    min-width: 20rem;
    overflow-wrap: break-word;
}

.site {
    min-height: 100vh;
}

.site-main {
    min-width: 0;
}

/*
 * Superficie genérica. No sustituye a las tarjetas de FASE 6;
 * sirve como primitiva neutra para bloques de contenido.
 */
.surface {
    border: var(--hemik-border);
    border-radius: var(--hemik-radius-lg);
    background: var(--hemik-color-surface);
}

/*
 * Clase para contenido editorial de lectura prolongada.
 * La composición detallada de single.php se desarrollará en FASE 8.
 */
.reading-content {
    color: var(--hemik-color-text);
    font-size: var(--hemik-font-size-md);
    line-height: var(--hemik-line-height-relaxed);
}

.reading-content > * + * {
    margin-block-start: var(--hemik-space-5);
}


/* --------------------------------------------------------------
 * Editorial system — FASE 8
 * -------------------------------------------------------------- */

.site-main--editorial {
    width: 100%;
    max-width: none;
    padding: 0;
}

.editorial-entry {
    padding-block: clamp(var(--hemik-space-10), 7vw, var(--hemik-space-20));
}

.editorial-entry__header {
    text-align: left;
}

.editorial-entry__taxonomy {
    margin-block-end: var(--hemik-space-3);
}

.editorial-entry__taxonomy a {
    display: inline-flex;
    min-height: 1.75rem;
    align-items: center;
    padding-inline: var(--hemik-space-3);
    border: var(--hemik-border);
    border-radius: var(--hemik-radius-pill);
    background: var(--hemik-color-brand-subtle);
    color: var(--hemik-color-brand);
    font-size: var(--hemik-font-size-xs);
    font-weight: var(--hemik-font-weight-semibold);
    text-decoration: none;
}

.editorial-entry__title {
    max-width: 18ch;
}

.editorial-entry__lead {
    max-width: 42rem;
    margin-block-start: var(--hemik-space-5);
    color: var(--hemik-color-text-soft);
    font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.35rem);
    line-height: var(--hemik-line-height-relaxed);
}

.editorial-entry__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hemik-space-2);
    align-items: center;
    margin-block-start: var(--hemik-space-5);
    color: var(--hemik-color-text-muted);
    font-size: var(--hemik-font-size-sm);
}

.editorial-entry__separator {
    color: var(--hemik-color-border-strong);
}

.editorial-entry__featured {
    margin-block-start: var(--hemik-space-8);
}

.editorial-entry__featured-image {
    width: 100%;
    max-height: 38rem;
    border-radius: var(--hemik-radius-lg);
    object-fit: cover;
}

.editorial-entry__content {
    margin-block-start: var(--hemik-space-8);
}

.reading-content {
    color: var(--hemik-color-text);
    font-size: var(--hemik-font-size-md);
    line-height: var(--hemik-line-height-relaxed);
}

.reading-content > * + * {
    margin-block-start: var(--hemik-space-5);
}

.reading-content h2,
.reading-content h3,
.reading-content h4,
.reading-content h5,
.reading-content h6 {
    scroll-margin-top: var(--hemik-space-24);
}

.reading-content h2 {
    margin-block-start: var(--hemik-space-10);
    font-size: clamp(1.65rem, 1.45rem + 0.8vw, 2.2rem);
}

.reading-content h3 {
    margin-block-start: var(--hemik-space-8);
    font-size: clamp(1.35rem, 1.2rem + 0.45vw, 1.7rem);
}

.reading-content h4 {
    margin-block-start: var(--hemik-space-6);
}

.reading-content p,
.reading-content li {
    max-width: 70ch;
}

.reading-content ul,
.reading-content ol {
    padding-inline-start: 1.4em;
}

.reading-content li + li {
    margin-block-start: var(--hemik-space-2);
}

.reading-content blockquote {
    margin-block: var(--hemik-space-8);
    padding: var(--hemik-space-5) var(--hemik-space-6);
    border-inline-start: 3px solid var(--hemik-color-brand);
    border-radius: 0 var(--hemik-radius-md) var(--hemik-radius-md) 0;
    background: var(--hemik-color-brand-subtle);
}

.reading-content blockquote > * + * {
    margin-block-start: var(--hemik-space-3);
}

.reading-content figure,
.reading-content .wp-block-image,
.reading-content .wp-block-gallery {
    margin-block: var(--hemik-space-8);
}

.reading-content img {
    border-radius: var(--hemik-radius-md);
}

.reading-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.reading-content pre {
    max-width: 100%;
    overflow-x: auto;
}

.reading-content a {
    overflow-wrap: anywhere;
}

.editorial-entry__page-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hemik-space-2);
    align-items: center;
    margin-block-start: var(--hemik-space-8);
    padding-block-start: var(--hemik-space-5);
    border-block-start: var(--hemik-border);
}

.editorial-entry__page-links a,
.editorial-entry__page-links > span {
    display: inline-flex;
    min-width: 2.25rem;
    min-height: 2.25rem;
    align-items: center;
    justify-content: center;
    padding-inline: var(--hemik-space-2);
    border: var(--hemik-border);
    border-radius: var(--hemik-radius-md);
    background: var(--hemik-color-surface);
    text-decoration: none;
}

.editorial-entry__footer {
    margin-block-start: var(--hemik-space-12);
    padding-block-start: var(--hemik-space-6);
    border-block-start: var(--hemik-border);
}

.editorial-entry__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hemik-space-2) var(--hemik-space-3);
    color: var(--hemik-color-text-muted);
    font-size: var(--hemik-font-size-sm);
}

.editorial-entry__tags-label {
    font-weight: var(--hemik-font-weight-semibold);
}

.editorial-entry__tags a {
    color: var(--hemik-color-brand);
}

.editorial-post-navigation {
    display: grid;
    gap: var(--hemik-space-4);
    margin-block-start: var(--hemik-space-8);
}

.editorial-post-navigation > div:empty {
    display: none;
}

.editorial-post-navigation a {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    gap: var(--hemik-space-2);
    padding: var(--hemik-space-5);
    border: var(--hemik-border);
    border-radius: var(--hemik-radius-lg);
    background: var(--hemik-color-surface);
    color: var(--hemik-color-text);
    text-decoration: none;
    transition:
        border-color var(--hemik-duration-normal) var(--hemik-ease-standard),
        background-color var(--hemik-duration-normal) var(--hemik-ease-standard);
}

.editorial-post-navigation a:hover {
    border-color: var(--hemik-color-border-strong);
    background: var(--hemik-color-brand-subtle);
}

.editorial-post-navigation__label {
    color: var(--hemik-color-text-muted);
    font-size: var(--hemik-font-size-xs);
    font-weight: var(--hemik-font-weight-semibold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.editorial-post-navigation__title {
    font-weight: var(--hemik-font-weight-semibold);
}

@media (min-width: 48rem) {
    .editorial-post-navigation {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .editorial-post-navigation__next {
        text-align: right;
    }
}

@media (prefers-reduced-motion: reduce) {
    .editorial-post-navigation a {
        transition: none;
    }
}


/* --------------------------------------------------------------
 * Archives, search and navigation — FASE 9
 * -------------------------------------------------------------- */

.site-main--listing {
    width: 100%;
    max-width: none;
    padding: 0;
}

.listing-hero {
    border-block-end: var(--hemik-border);
    background: var(--hemik-color-brand-subtle);
}

.listing-hero__content {
    max-width: 52rem;
    padding-block: clamp(var(--hemik-space-10), 6vw, var(--hemik-space-16));
}

.listing-hero__eyebrow,
.empty-state__eyebrow {
    margin-block-end: var(--hemik-space-2);
    color: var(--hemik-color-brand);
    font-size: var(--hemik-font-size-sm);
    font-weight: var(--hemik-font-weight-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.listing-hero__title {
    max-width: 22ch;
}

.listing-hero__description {
    max-width: 44rem;
    margin-block-start: var(--hemik-space-4);
    color: var(--hemik-color-text-soft);
    line-height: var(--hemik-line-height-relaxed);
}

.listing-hero__description > * + * {
    margin-block-start: var(--hemik-space-3);
}

.listing-hero__search {
    max-width: 38rem;
    margin-block-start: var(--hemik-space-6);
}

.listing-section {
    padding-block: clamp(var(--hemik-space-10), 7vw, var(--hemik-space-20));
    background: var(--hemik-color-surface);
}

.listing-grid {
    align-items: stretch;
}

.listing-grid > * {
    height: 100%;
}

.hemik-pagination {
    margin-block-start: var(--hemik-space-10);
}

.hemik-pagination__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hemik-space-2);
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

.hemik-pagination__item {
    margin: 0;
}

.hemik-pagination .page-numbers {
    display: inline-flex;
    min-width: 2.5rem;
    min-height: 2.5rem;
    align-items: center;
    justify-content: center;
    padding-inline: var(--hemik-space-3);
    border: var(--hemik-border);
    border-radius: var(--hemik-radius-md);
    background: var(--hemik-color-surface);
    color: var(--hemik-color-text-soft);
    font-size: var(--hemik-font-size-sm);
    font-weight: var(--hemik-font-weight-medium);
    text-decoration: none;
}

.hemik-pagination a.page-numbers:hover,
.hemik-pagination a.page-numbers:focus-visible {
    border-color: var(--hemik-color-border-strong);
    background: var(--hemik-color-brand-subtle);
    color: var(--hemik-color-brand);
}

.hemik-pagination .page-numbers.current {
    border-color: var(--hemik-color-brand);
    background: var(--hemik-color-brand);
    color: var(--hemik-color-surface);
}

.hemik-breadcrumbs {
    padding-block-start: var(--hemik-space-5);
}

.hemik-breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hemik-space-2);
    align-items: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

.hemik-breadcrumbs__item {
    display: inline-flex;
    gap: var(--hemik-space-2);
    align-items: center;
    margin: 0;
    color: var(--hemik-color-text-muted);
    font-size: var(--hemik-font-size-xs);
}

.hemik-breadcrumbs__item a {
    color: var(--hemik-color-text-soft);
    text-decoration: none;
}

.hemik-breadcrumbs__item a:hover {
    color: var(--hemik-color-brand);
}

.hemik-breadcrumbs__separator {
    color: var(--hemik-color-border-strong);
}

.empty-state {
    padding-block: var(--hemik-space-12);
}

.empty-state__content {
    text-align: center;
}

.empty-state__title {
    max-width: 22ch;
    margin-inline: auto;
}

.empty-state__description {
    max-width: 38rem;
    margin: var(--hemik-space-4) auto 0;
    color: var(--hemik-color-text-soft);
}

.empty-state__search {
    max-width: 36rem;
    margin: var(--hemik-space-6) auto 0;
}

.empty-state__actions {
    display: flex;
    justify-content: center;
    margin-block-start: var(--hemik-space-5);
}


/* --------------------------------------------------------------
 * Sidebar and related content — FASE 10
 * -------------------------------------------------------------- */

.site-sidebar {
    min-width: 0;
}

.site-sidebar__inner {
    display: grid;
    gap: var(--hemik-space-6);
}

.site-sidebar .widget {
    margin: 0;
    padding: var(--hemik-space-5);
    border: var(--hemik-border);
    border-radius: var(--hemik-radius-lg);
    background: var(--hemik-color-surface);
    box-shadow: var(--hemik-shadow-xs);
}

.site-sidebar .widget-title {
    margin-block-end: var(--hemik-space-4);
    font-size: var(--hemik-font-size-lg);
}

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

.site-sidebar .widget li {
    margin: 0;
}

.site-sidebar .widget li + li {
    margin-block-start: var(--hemik-space-2);
}

.site-sidebar .widget a {
    color: var(--hemik-color-text-soft);
    text-decoration: none;
}

.site-sidebar .widget a:hover {
    color: var(--hemik-color-brand);
}

.related-content {
    margin-block-start: clamp(var(--hemik-space-12), 7vw, var(--hemik-space-20));
    padding-block: clamp(var(--hemik-space-10), 6vw, var(--hemik-space-16));
    border-block-start: var(--hemik-border);
    background: var(--hemik-color-background);
}

.related-content__header {
    margin-block-end: var(--hemik-space-8);
}

.related-content__eyebrow {
    margin-block-end: var(--hemik-space-2);
    color: var(--hemik-color-brand);
    font-size: var(--hemik-font-size-sm);
    font-weight: var(--hemik-font-weight-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.related-content__title {
    max-width: 20ch;
}

.related-content__grid {
    align-items: stretch;
}

.related-content__grid > * {
    height: 100%;
}


/* --------------------------------------------------------------
 * Accessibility, resilience and 404 — FASE 11
 * -------------------------------------------------------------- */

.skip-link:focus {
    top: var(--hemik-space-3);
    left: var(--hemik-space-3);
}

.site-main:focus {
    outline: none;
}

a,
button,
input,
select,
textarea,
[tabindex]:not([tabindex="-1"]) {
    scroll-margin-top: calc(var(--hemik-space-20) + 1rem);
}

button,
[role="button"],
input,
select,
textarea {
    touch-action: manipulation;
}

img,
svg,
video,
iframe {
    max-inline-size: 100%;
}

iframe,
video {
    inline-size: 100%;
}

.wp-caption,
.wp-caption img {
    max-width: 100%;
}

.error-404 {
    padding-block: clamp(var(--hemik-space-12), 8vw, var(--hemik-space-24));
    background:
        linear-gradient(
            180deg,
            var(--hemik-color-surface) 0%,
            var(--hemik-color-background) 100%
        );
}

.error-404__eyebrow {
    margin-block-end: var(--hemik-space-2);
    color: var(--hemik-color-brand);
    font-size: var(--hemik-font-size-sm);
    font-weight: var(--hemik-font-weight-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.error-404__title {
    max-width: 16ch;
}

.error-404__description {
    max-width: 40rem;
    margin-block-start: var(--hemik-space-4);
    color: var(--hemik-color-text-soft);
    line-height: var(--hemik-line-height-relaxed);
}

.error-404__search {
    max-width: 36rem;
    margin-block-start: var(--hemik-space-6);
}

.error-404__actions {
    margin-block-start: var(--hemik-space-5);
}

@media (max-width: 47.999rem) {
    .editorial-entry__meta {
        align-items: flex-start;
    }

    .editorial-entry__separator {
        display: none;
    }

    .editorial-entry__date,
    .editorial-entry__author {
        flex-basis: 100%;
    }
}

@media (forced-colors: active) {
    .hemik-card,
    .hemik-button,
    .hemik-notice,
    .site-sidebar .widget,
    .editorial-post-navigation a,
    .hemik-pagination .page-numbers {
        border-color: CanvasText;
        box-shadow: none;
    }
}

@media (prefers-contrast: more) {
    :root {
        --hemik-color-text-soft: #373056;
        --hemik-color-text-muted: #51496d;
        --hemik-color-border: #c4a6ec;
        --hemik-color-border-strong: #9d6ee0;
    }

    a {
        text-decoration-thickness: 0.12em;
    }
}


/* ==============================================================
 * Editorial refinement — Visual 04
 * ============================================================== */

.site-main--editorial {
    background:
        linear-gradient(
            180deg,
            var(--hemik-color-surface) 0%,
            var(--hemik-color-surface-soft) 28rem,
            var(--hemik-color-background) 100%
        );
}

.editorial-entry {
    padding-block: clamp(var(--hemik-space-8), 5vw, var(--hemik-space-16));
}

.editorial-entry__breadcrumb-wrap {
    margin-block-end: var(--hemik-space-8);
}

.editorial-entry__breadcrumb-wrap .hemik-breadcrumbs {
    padding-block-start: 0;
}

.editorial-entry__header {
    position: relative;
    padding-block-end: var(--hemik-space-8);
}

.editorial-entry__header::after {
    display: block;
    width: 4.5rem;
    height: 2px;
    margin-block-start: var(--hemik-space-7, 1.75rem);
    border-radius: var(--hemik-radius-pill);
    background:
        linear-gradient(
            90deg,
            var(--hemik-color-brand) 0%,
            var(--hemik-color-action) 100%
        );
    content: "";
}

.editorial-entry__section-label,
.editorial-entry__taxonomy {
    margin-block-end: var(--hemik-space-4);
}

.editorial-entry__section-label {
    color: var(--hemik-color-brand);
    font-size: var(--hemik-font-size-xs);
    font-weight: var(--hemik-font-weight-semibold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.editorial-entry__taxonomy a {
    min-height: 1.9rem;
    padding-inline: var(--hemik-space-3);
    border-color: rgb(109 40 217 / 0.14);
    background: rgb(109 40 217 / 0.07);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.editorial-entry__title {
    max-width: 15ch;
    font-size: clamp(2.35rem, 1.85rem + 2vw, 4.2rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.editorial-entry--page .editorial-entry__title {
    max-width: 18ch;
}

.editorial-entry__lead {
    max-width: 41rem;
    margin-block-start: var(--hemik-space-6);
    color: var(--hemik-color-text-soft);
    font-size: clamp(1.15rem, 1.05rem + 0.45vw, 1.45rem);
    line-height: 1.72;
}

.editorial-entry__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hemik-space-3);
    align-items: center;
    margin-block-start: var(--hemik-space-6);
    color: var(--hemik-color-text-muted);
    font-size: var(--hemik-font-size-xs);
}

.editorial-entry__meta-item {
    display: inline-flex;
    gap: var(--hemik-space-2);
    align-items: baseline;
}

.editorial-entry__meta-label {
    color: var(--hemik-color-text-soft);
    font-weight: var(--hemik-font-weight-semibold);
}

.editorial-entry__meta-divider {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--hemik-color-border-strong);
}

.editorial-entry__featured {
    margin-block-start: var(--hemik-space-4);
}

.editorial-entry__featured-image {
    max-height: 42rem;
    border: 1px solid rgb(109 40 217 / 0.08);
    border-radius: var(--hemik-radius-xl);
    box-shadow: var(--hemik-shadow-sm);
}

.editorial-entry__content {
    margin-block-start: clamp(var(--hemik-space-8), 6vw, var(--hemik-space-12));
}

.reading-content {
    font-size: clamp(1.05rem, 1rem + 0.2vw, 1.15rem);
    line-height: 1.88;
}

.reading-content > p:first-child {
    font-size: 1.08em;
}

.reading-content h2 {
    margin-block-start: var(--hemik-space-12);
    margin-block-end: var(--hemik-space-5);
    font-size: clamp(1.7rem, 1.5rem + 0.75vw, 2.25rem);
    letter-spacing: -0.018em;
}

.reading-content h3 {
    margin-block-start: var(--hemik-space-10);
    margin-block-end: var(--hemik-space-4);
}

.reading-content h2 + *,
.reading-content h3 + *,
.reading-content h4 + * {
    margin-block-start: 0;
}

.reading-content strong {
    color: var(--hemik-color-text);
}

.reading-content a:not(.wp-element-button) {
    color: var(--hemik-color-brand);
    text-decoration-color: rgb(109 40 217 / 0.35);
}

.reading-content a:not(.wp-element-button):hover {
    text-decoration-color: currentColor;
}

.reading-content blockquote {
    position: relative;
    margin-block: var(--hemik-space-10);
    padding: var(--hemik-space-6) var(--hemik-space-7, 1.75rem);
    border: 1px solid rgb(109 40 217 / 0.13);
    border-inline-start: 3px solid var(--hemik-color-brand);
    border-radius: 0 var(--hemik-radius-lg) var(--hemik-radius-lg) 0;
    background:
        linear-gradient(
            135deg,
            rgb(109 40 217 / 0.055),
            rgb(139 92 246 / 0.035)
        );
    color: var(--hemik-color-text-soft);
}

.reading-content blockquote p {
    font-size: 1.05em;
}

.reading-content figure,
.reading-content .wp-block-image,
.reading-content .wp-block-gallery {
    margin-block: var(--hemik-space-10);
}

.reading-content figcaption {
    max-width: 62ch;
    margin-inline: auto;
    text-align: center;
}

.reading-content table {
    border-radius: var(--hemik-radius-md);
    box-shadow: var(--hemik-shadow-xs);
}

.reading-content th {
    background: var(--hemik-color-brand-subtle);
}

.reading-content hr {
    width: 5rem;
    margin-block: var(--hemik-space-12);
    margin-inline: auto;
    background: var(--hemik-color-border-strong);
}

.editorial-entry__context {
    margin-block-start: var(--hemik-space-10);
}

.editorial-entry__notice {
    border-color: rgb(109 40 217 / 0.12);
    background: var(--hemik-color-brand-subtle);
}

.editorial-entry__footer {
    margin-block-start: var(--hemik-space-10);
    padding-block-start: var(--hemik-space-8);
}

.editorial-entry__tags {
    display: grid;
    gap: var(--hemik-space-3);
}

.editorial-entry__tags-label {
    color: var(--hemik-color-text-muted);
    font-size: var(--hemik-font-size-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.editorial-entry__tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hemik-space-2);
}

.editorial-entry__tags-list a {
    display: inline-flex;
    min-height: 2rem;
    align-items: center;
    padding-inline: var(--hemik-space-3);
    border: 1px solid rgb(109 40 217 / 0.13);
    border-radius: var(--hemik-radius-pill);
    background: var(--hemik-color-surface);
    color: var(--hemik-color-brand);
    font-size: var(--hemik-font-size-xs);
    text-decoration: none;
}

.editorial-entry__tags-list a:hover {
    border-color: var(--hemik-color-border-strong);
    background: var(--hemik-color-brand-subtle);
}

.editorial-post-navigation {
    gap: var(--hemik-space-4);
    margin-block-start: var(--hemik-space-10);
}

.editorial-post-navigation a {
    position: relative;
    overflow: hidden;
    min-height: 9rem;
    padding: var(--hemik-space-6);
    border-color: rgb(109 40 217 / 0.11);
    background:
        linear-gradient(
            145deg,
            var(--hemik-color-surface) 0%,
            var(--hemik-color-surface-soft) 100%
        );
}

.editorial-post-navigation a::before {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--hemik-color-brand);
    content: "";
    opacity: 0.65;
}

.editorial-post-navigation__previous a::before {
    left: 0;
}

.editorial-post-navigation__next a::before {
    right: 0;
}

.editorial-post-navigation a:hover {
    border-color: rgb(109 40 217 / 0.22);
    background: var(--hemik-color-brand-subtle);
}

.editorial-post-navigation__label {
    color: var(--hemik-color-brand);
    letter-spacing: 0.07em;
}

.editorial-post-navigation__title {
    max-width: 26ch;
    font-size: var(--hemik-font-size-lg);
    line-height: 1.4;
}

/* Related content */

.related-content {
    margin-block-start: 0;
    padding-block: clamp(var(--hemik-space-12), 8vw, var(--hemik-space-20));
    border-block-start: 1px solid rgb(109 40 217 / 0.10);
    background:
        linear-gradient(
            180deg,
            var(--hemik-color-background) 0%,
            var(--hemik-color-mist, #F8F6FC) 100%
        );
}

.related-content__header {
    display: grid;
    gap: var(--hemik-space-5);
    margin-block-end: var(--hemik-space-8);
}

.related-content__eyebrow {
    margin-block-end: var(--hemik-space-2);
    letter-spacing: 0.08em;
}

.related-content__title {
    max-width: 16ch;
    font-size: clamp(1.85rem, 1.6rem + 0.9vw, 2.6rem);
}

.related-content__description {
    max-width: 38rem;
    color: var(--hemik-color-text-soft);
    line-height: var(--hemik-line-height-relaxed);
}

.related-content__grid .hemik-card {
    border-color: rgb(109 40 217 / 0.10);
    box-shadow: none;
}

.related-content__grid .hemik-card:hover {
    border-color: rgb(109 40 217 / 0.22);
    box-shadow: var(--hemik-shadow-sm);
}

@media (min-width: 48rem) {
    .related-content__header {
        grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.72fr);
        align-items: end;
        gap: var(--hemik-space-8);
    }

    .related-content__description {
        justify-self: end;
    }
}

@media (max-width: 47.999rem) {
    .editorial-entry__title {
        font-size: clamp(2.15rem, 10vw, 3rem);
    }

    .editorial-entry__meta {
        align-items: flex-start;
    }

    .editorial-entry__meta-divider {
        display: none;
    }

    .editorial-entry__meta-item {
        flex-basis: 100%;
    }

    .editorial-post-navigation a {
        min-height: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .editorial-entry__tags-list a,
    .editorial-post-navigation a {
        transition: none;
    }
}


/* ==============================================================
 * Discovery refinement — Visual 05
 * ============================================================== */

.site-main--listing,
.site-main--error {
    background: var(--hemik-color-surface-soft);
}

.listing-hero {
    position: relative;
    overflow: hidden;
    border-block-end: 1px solid rgb(109 40 217 / 0.10);
    background:
        radial-gradient(circle at 90% 5%, rgb(139 92 246 / 0.10), transparent 30%),
        linear-gradient(
            180deg,
            var(--hemik-color-surface) 0%,
            var(--hemik-color-brand-subtle) 100%
        );
}

.listing-hero::after {
    position: absolute;
    right: -4rem;
    bottom: -7rem;
    width: 18rem;
    height: 18rem;
    border: 1px solid rgb(109 40 217 / 0.08);
    border-radius: 50%;
    content: "";
}

.listing-hero__content {
    position: relative;
    z-index: 1;
    display: grid;
    gap: var(--hemik-space-6);
    max-width: none;
    padding-block: clamp(var(--hemik-space-10), 7vw, var(--hemik-space-18, 4.5rem));
}

.listing-hero__eyebrow {
    letter-spacing: 0.09em;
}

.listing-hero__title {
    max-width: 18ch;
    font-size: clamp(2.25rem, 1.8rem + 1.8vw, 3.8rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.listing-hero__description {
    max-width: 38rem;
    margin-block-start: 0;
    align-self: end;
    font-size: var(--hemik-font-size-md);
}

.listing-hero__search-column {
    align-self: end;
}

.listing-hero__search {
    max-width: 40rem;
    margin-block-start: var(--hemik-space-5);
}

.listing-section {
    padding-block: clamp(var(--hemik-space-10), 7vw, var(--hemik-space-20));
    background:
        linear-gradient(
            180deg,
            var(--hemik-color-surface-soft) 0%,
            var(--hemik-color-surface) 100%
        );
}

.listing-section__header {
    display: flex;
    justify-content: flex-end;
    margin-block-end: var(--hemik-space-5);
}

.listing-section__count {
    color: var(--hemik-color-text-muted);
    font-size: var(--hemik-font-size-xs);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.listing-grid {
    gap: var(--hemik-space-7, 1.75rem);
}

.listing-grid .hemik-card {
    border-color: rgb(109 40 217 / 0.10);
    box-shadow: none;
}

.listing-grid .hemik-card:hover {
    border-color: rgb(109 40 217 / 0.22);
    box-shadow: var(--hemik-shadow-sm);
}

/* Pagination */

.hemik-pagination {
    margin-block-start: clamp(var(--hemik-space-10), 6vw, var(--hemik-space-14, 3.5rem));
    padding-block-start: var(--hemik-space-6);
    border-block-start: 1px solid rgb(109 40 217 / 0.10);
}

.hemik-pagination__list {
    gap: var(--hemik-space-2);
}

.hemik-pagination .page-numbers {
    min-width: 2.65rem;
    min-height: 2.65rem;
    border-color: rgb(109 40 217 / 0.12);
    border-radius: var(--hemik-radius-pill);
    background: rgb(255 255 255 / 0.72);
}

.hemik-pagination a.page-numbers:hover,
.hemik-pagination a.page-numbers:focus-visible {
    border-color: rgb(109 40 217 / 0.24);
    background: var(--hemik-color-brand-subtle);
}

.hemik-pagination .page-numbers.current {
    border-color: var(--hemik-color-brand);
    background: var(--hemik-color-brand);
    color: var(--hemik-color-surface);
}

/* Empty state */

.empty-state {
    padding-block: clamp(var(--hemik-space-12), 8vw, var(--hemik-space-20));
}

.empty-state__content {
    padding: clamp(var(--hemik-space-6), 5vw, var(--hemik-space-10));
    border: 1px solid rgb(109 40 217 / 0.10);
    border-radius: var(--hemik-radius-xl);
    background:
        linear-gradient(
            145deg,
            var(--hemik-color-surface) 0%,
            var(--hemik-color-brand-subtle) 100%
        );
    box-shadow: var(--hemik-shadow-xs);
}

.empty-state__mark {
    display: grid;
    width: 3rem;
    height: 3rem;
    place-items: center;
    margin: 0 auto var(--hemik-space-4);
    border-radius: 50%;
    background: rgb(109 40 217 / 0.08);
    color: var(--hemik-color-brand);
    font-size: 2rem;
    line-height: 1;
}

.empty-state__eyebrow {
    letter-spacing: 0.08em;
}

.empty-state__title {
    max-width: 18ch;
}

.empty-state__description {
    max-width: 34rem;
}

/* 404 */

.error-404 {
    position: relative;
    overflow: hidden;
    min-height: 68vh;
    display: grid;
    align-items: center;
    padding-block: clamp(var(--hemik-space-12), 9vw, var(--hemik-space-24));
    background:
        radial-gradient(circle at 50% 0%, rgb(139 92 246 / 0.10), transparent 32%),
        linear-gradient(
            180deg,
            var(--hemik-color-surface) 0%,
            var(--hemik-color-background) 100%
        );
}

.error-404__visual {
    position: relative;
    width: fit-content;
    margin-block-end: var(--hemik-space-6);
}

.error-404__number {
    position: relative;
    z-index: 2;
    color: var(--hemik-color-brand);
    font-size: clamp(4.5rem, 14vw, 8rem);
    font-weight: var(--hemik-font-weight-semibold);
    line-height: 0.9;
    letter-spacing: -0.06em;
    opacity: 0.92;
}

.error-404__halo {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    width: 9rem;
    height: 9rem;
    border: 1px solid rgb(109 40 217 / 0.12);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.error-404__halo::before,
.error-404__halo::after {
    position: absolute;
    inset: 1.25rem;
    border: 1px solid rgb(139 92 246 / 0.10);
    border-radius: inherit;
    content: "";
}

.error-404__halo::after {
    inset: 2.5rem;
}

.error-404__eyebrow {
    letter-spacing: 0.08em;
}

.error-404__title {
    max-width: 13ch;
    font-size: clamp(2.15rem, 1.8rem + 1.6vw, 3.5rem);
    line-height: 1.12;
}

.error-404__description {
    max-width: 38rem;
}

@media (min-width: 48rem) {
    .listing-hero__content {
        grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.72fr);
        align-items: end;
        gap: var(--hemik-space-10);
    }

    .listing-hero__description,
    .listing-hero__search-column {
        justify-self: end;
    }
}

@media (max-width: 47.999rem) {
    .listing-hero__title {
        font-size: clamp(2rem, 9vw, 2.8rem);
    }

    .listing-hero::after {
        display: none;
    }

    .error-404 {
        min-height: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .listing-hero,
    .error-404 {
        background: var(--hemik-color-background);
    }
}


/* ==============================================================
 * Global interactive refinement — Visual 06
 * ============================================================== */

a:not(.hemik-button):not(.custom-logo-link) {
    transition:
        color var(--hemik-duration-fast) var(--hemik-ease-standard),
        background-color var(--hemik-duration-fast) var(--hemik-ease-standard),
        border-color var(--hemik-duration-fast) var(--hemik-ease-standard);
}

button,
input,
textarea,
select {
    accent-color: var(--hemik-color-brand);
}

::placeholder {
    color: var(--hemik-color-text-muted);
    opacity: 0.78;
}

@media (prefers-reduced-motion: reduce) {
    a,
    button,
    input,
    textarea,
    select {
        transition: none !important;
    }
}


/* ==============================================================
 * Sidebar, widgets and breadcrumbs — Visual 07
 * ============================================================== */

.site-sidebar {
    min-width: 0;
}

.site-sidebar__header {
    margin-block-end: var(--hemik-space-5);
    padding-block-end: var(--hemik-space-5);
    border-block-end: 1px solid rgb(109 40 217 / 0.10);
}

.site-sidebar__eyebrow {
    margin-block-end: var(--hemik-space-2);
    color: var(--hemik-color-brand);
    font-size: var(--hemik-font-size-xs);
    font-weight: var(--hemik-font-weight-semibold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-sidebar__intro {
    color: var(--hemik-color-text-muted);
    font-size: var(--hemik-font-size-sm);
    line-height: 1.65;
}

.site-sidebar__inner {
    display: grid;
    gap: var(--hemik-space-5);
}

.site-sidebar .hemik-widget {
    margin: 0;
    padding: var(--hemik-space-5);
    border: 1px solid rgb(109 40 217 / 0.10);
    border-radius: var(--hemik-radius-xl);
    background:
        linear-gradient(
            145deg,
            rgb(255 255 255 / 0.96),
            rgb(249 247 253 / 0.96)
        );
    box-shadow: none;
}

.site-sidebar .hemik-widget__title {
    position: relative;
    margin-block-end: var(--hemik-space-4);
    padding-block-end: var(--hemik-space-3);
    font-size: var(--hemik-font-size-base);
    letter-spacing: -0.01em;
}

.site-sidebar .hemik-widget__title::after {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 2.75rem;
    height: 2px;
    border-radius: var(--hemik-radius-pill);
    background:
        linear-gradient(
            90deg,
            var(--hemik-color-brand),
            var(--hemik-color-action)
        );
    content: "";
}

.site-sidebar .widget ul {
    display: grid;
    gap: var(--hemik-space-2);
    padding: 0;
    margin: 0;
    list-style: none;
}

.site-sidebar .widget li {
    margin: 0;
}

.site-sidebar .widget a {
    display: inline-flex;
    min-height: 2.2rem;
    align-items: center;
    color: var(--hemik-color-text-soft);
    font-size: var(--hemik-font-size-sm);
    text-decoration: none;
}

.site-sidebar .widget a:hover {
    color: var(--hemik-color-brand);
}

.site-sidebar .widget_search .hemik-search-form,
.site-sidebar .widget_search form {
    margin: 0;
}

.site-sidebar .widget_categories select,
.site-sidebar .widget_archive select {
    width: 100%;
}

.site-sidebar .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hemik-space-2);
}

.site-sidebar .tagcloud a {
    min-height: 2rem;
    padding-inline: var(--hemik-space-3);
    border: 1px solid rgb(109 40 217 / 0.12);
    border-radius: var(--hemik-radius-pill);
    background: rgb(255 255 255 / 0.72);
    color: var(--hemik-color-brand);
    font-size: var(--hemik-font-size-xs) !important;
}

.site-sidebar .tagcloud a:hover {
    border-color: rgb(109 40 217 / 0.22);
    background: var(--hemik-color-brand-subtle);
}

/* Breadcrumbs */

.hemik-breadcrumbs {
    padding-block-start: var(--hemik-space-4);
}

.hemik-breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hemik-space-1) var(--hemik-space-2);
    align-items: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

.hemik-breadcrumbs__item {
    display: inline-flex;
    gap: var(--hemik-space-2);
    align-items: center;
    margin: 0;
    color: var(--hemik-color-text-muted);
    font-size: var(--hemik-font-size-xs);
    line-height: 1.4;
}

.hemik-breadcrumbs__item a {
    color: var(--hemik-color-text-soft);
    text-decoration: none;
}

.hemik-breadcrumbs__item a:hover {
    color: var(--hemik-color-brand);
}

.hemik-breadcrumbs__separator {
    color: rgb(109 40 217 / 0.34);
    font-size: 1.05em;
}

.hemik-breadcrumbs__current {
    max-width: min(28rem, 48vw);
    overflow: hidden;
    color: var(--hemik-color-text-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Footer widgets follow the same visual language, but lighter. */

.site-footer__widgets .hemik-widget {
    border-color: rgb(109 40 217 / 0.08);
    background: rgb(255 255 255 / 0.56);
}

.site-footer__widgets .hemik-widget__title {
    color: var(--hemik-color-text);
    font-size: var(--hemik-font-size-sm);
}

@media (max-width: 47.999rem) {
    .hemik-breadcrumbs__current {
        max-width: 58vw;
    }
}

@media (forced-colors: active) {
    .site-sidebar .hemik-widget,
    .site-sidebar .tagcloud a {
        border-color: CanvasText;
        background: Canvas;
    }
}


/* ==============================================================
 * Editorial social conversion — Visual 10
 * ============================================================== */

.editorial-social {
    display: grid;
    gap: var(--hemik-space-5);
    margin-block-start: var(--hemik-space-10);
    padding: clamp(var(--hemik-space-5), 4vw, var(--hemik-space-7, 1.75rem));
    border: 1px solid rgb(109 40 217 / 0.11);
    border-radius: var(--hemik-radius-xl);
    background:
        linear-gradient(
            145deg,
            rgb(255 255 255 / 0.96),
            rgb(247 244 255 / 0.96)
        );
}

.editorial-social__eyebrow {
    margin-block-end: var(--hemik-space-2);
    color: var(--hemik-color-brand);
    font-size: var(--hemik-font-size-xs);
    font-weight: var(--hemik-font-weight-semibold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.editorial-social__title {
    max-width: 18ch;
    font-size: clamp(1.45rem, 1.3rem + 0.5vw, 1.85rem);
}

.editorial-social__description {
    max-width: 38rem;
    margin-block-start: var(--hemik-space-3);
    color: var(--hemik-color-text-soft);
    line-height: 1.65;
}

.editorial-social__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hemik-space-3);
    align-items: center;
}

@media (min-width: 48rem) {
    .editorial-social {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    .editorial-social__actions {
        justify-content: flex-end;
    }
}


/* ==============================================================
 * SEO / social sharing presentation — Visual 11
 * ============================================================== */

.editorial-share {
    margin-block-start: var(--hemik-space-10);
    padding-block: var(--hemik-space-8);
    border-block: 1px solid rgb(109 40 217 / 0.10);
}

.editorial-share__header {
    display: grid;
    gap: var(--hemik-space-4);
}

.editorial-share__eyebrow {
    margin-block-end: var(--hemik-space-2);
    color: var(--hemik-color-brand);
    font-size: var(--hemik-font-size-xs);
    font-weight: var(--hemik-font-weight-semibold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.editorial-share__title {
    max-width: 21ch;
    font-size: clamp(1.4rem, 1.26rem + 0.45vw, 1.8rem);
    line-height: 1.3;
}

.editorial-share__description {
    max-width: 38rem;
    color: var(--hemik-color-text-muted);
    font-size: var(--hemik-font-size-sm);
    line-height: 1.65;
}

.editorial-share__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hemik-space-2);
    margin-block-start: var(--hemik-space-5);
}

.editorial-share__button {
    display: inline-flex;
    min-height: 2.65rem;
    align-items: center;
    justify-content: center;
    gap: var(--hemik-space-2);
    padding-inline: var(--hemik-space-4);
    border: 1px solid rgb(109 40 217 / 0.13);
    border-radius: var(--hemik-radius-pill);
    background: var(--hemik-color-surface);
    color: var(--hemik-color-text-soft);
    font-family: inherit;
    font-size: var(--hemik-font-size-sm);
    font-weight: var(--hemik-font-weight-semibold);
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.editorial-share__button--facebook {
    border-color: transparent;
    background: var(--hemik-color-brand-deep);
    color: #fff;
}

.editorial-share__button--facebook:hover {
    background: #47245f;
    color: #fff;
}

.editorial-share__button--whatsapp {
    border-color: var(--hemik-color-brand);
    background: transparent;
    color: var(--hemik-color-brand);
}

.editorial-share__button--whatsapp:hover,
.editorial-share__button--copy:hover {
    border-color: var(--hemik-color-border-strong);
    background: var(--hemik-color-brand-subtle);
    color: var(--hemik-color-action-hover);
}

.editorial-share__button:focus-visible {
    outline: 3px solid transparent;
    box-shadow: var(--hemik-shadow-focus);
}

@media (min-width: 48rem) {
    .editorial-share__header {
        grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.72fr);
        align-items: end;
        gap: var(--hemik-space-8);
    }

    .editorial-share__description {
        justify-self: end;
    }
}

@media (max-width: 35.999rem) {
    .editorial-share__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .editorial-share__button {
        width: 100%;
    }
}


/* ==============================================================
 * Rendering performance — Performance 13
 * ============================================================== */

/*
 * Preserve predictable media geometry before images decode.
 * Existing card and commerce aspect-ratios do most of the work;
 * these rules protect editorial media and embeds.
 */
.reading-content img,
.editorial-entry__featured-image,
.commerce-product__image {
    height: auto;
}

.reading-content iframe,
.reading-content video {
    aspect-ratio: 16 / 9;
    height: auto;
}

/*
 * These sections are normally below the initial viewport.
 * content-visibility allows compatible browsers to defer their paint work,
 * while contain-intrinsic-size reserves approximate space to limit shifts.
 */
.related-content,
.site-footer,
.commerce-related,
.commerce-trust {
    content-visibility: auto;
    contain-intrinsic-size: auto 720px;
}

@media (max-width: 47.999rem) {
    .related-content,
    .site-footer,
    .commerce-related,
    .commerce-trust {
        contain-intrinsic-size: auto 960px;
    }
}


/* ==============================================================
 * Surface refinement — Visual 16
 * ============================================================== */

/*
 * Hemikra intentionally avoids large uninterrupted pure-white fields.
 * White-like surfaces are reserved for elevated cards/components while
 * page canvases use soft lavender-neutral layers.
 */
.site {
    background: var(--hemik-color-background);
}

.site-main:not(.site-main--home):not(.commerce-page) {
    background:
        linear-gradient(
            180deg,
            var(--hemik-color-surface-soft) 0%,
            var(--hemik-color-background) 44rem,
            var(--hemik-color-surface-muted) 100%
        );
}

.reading-content,
.editorial-entry__content {
    color: var(--hemik-color-text);
}

@media (prefers-contrast: more) {
    .site,
    .site-main:not(.site-main--home):not(.commerce-page) {
        background: var(--hemik-color-background);
    }
}
