/**
 * Zyonix Journal — assets/css/main.css
 *
 * Global stylesheet: design tokens, resets, base elements,
 * layout containers, pagination, article cards, buttons,
 * badges, forms, utilities, and print overrides.
 *
 * Note: CSS custom properties (design tokens) are defined BOTH here
 * (for standard loading) and inline via zyonix_get_critical_css()
 * (for render-blocking prevention). Changes to token values must be
 * reflected in both places.
 *
 * Table of contents
 * ─────────────────
 *  01. CSS Custom Properties (design tokens)
 *  02. Global Reset
 *  03. Base Typography
 *  04. Links & Focus
 *  05. Accessibility helpers
 *  06. Layout containers
 *  07. Header
 *  08. Footer
 *  09. Pagination
 *  10. Article cards (archive / load-more)
 *  11. Buttons
 *  12. Badges
 *  13. Forms & inputs
 *  14. Image sizes
 *  15. WordPress core block overrides
 *  16. Utility classes
 *  17. Animation helpers
 *  18. Custom image sizes (Gutenberg)
 *  19. Admin bar offset
 *  20. Print styles
 *
 * @package Zyonix_Journal
 * @since   1.0.0
 */


/* ============================================================
   01. CSS CUSTOM PROPERTIES
   ============================================================ */


/* ============================================================
   02. GLOBAL RESET
   ============================================================ */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior:          smooth;
    font-size:                100%;
}

body {
    font-family:              var(--font-primary);
    font-size:                var(--text-base);
    font-weight:              var(--font-normal);
    line-height:              var(--leading-normal);
    color:                    var(--color-text-primary);
    background-color:         var(--color-bg-body);
    -webkit-font-smoothing:   antialiased;
    -moz-osx-font-smoothing:  grayscale;
    text-rendering:           optimizeLegibility;
    overflow-x:               hidden;
}

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

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

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

ul,
ol {
    list-style: none;
}

table {
    border-collapse: collapse;
}


/* ============================================================
   03. BASE TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
    font-family:  var(--font-primary);
    font-weight:  var(--font-bold);
    line-height:  var(--leading-snug);
    color:        var(--color-text-primary);
    letter-spacing: var(--tracking-tight);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl);  }
h6 { font-size: var(--text-lg);  }

p {
    line-height:    var(--leading-relaxed);
    color:          var(--color-text-secondary);
    margin-bottom:  var(--space-4);
}

p:last-child {
    margin-bottom: 0;
}

strong,
b {
    font-weight: var(--font-bold);
    color:       var(--color-text-primary);
}

em,
i {
    font-style: italic;
}

small {
    font-size: var(--text-xs);
}

code,
kbd,
samp,
pre {
    font-family: var(--font-mono);
    font-size:   0.9em;
}

code {
    background:    var(--color-gray-100);
    border:        1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding:       0.1em 0.35em;
    color:         #c62828;
}

pre {
    background:    var(--color-gray-100);
    border:        1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding:       var(--space-4);
    overflow-x:    auto;
    margin-bottom: var(--space-4);
    line-height:   var(--leading-relaxed);
}

pre code {
    background:    none;
    border:        none;
    padding:       0;
    color:         inherit;
}

blockquote {
    border-left:   4px solid var(--color-primary);
    padding:       var(--space-3) var(--space-5);
    background:    var(--color-primary-xlight);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin:        var(--space-5) 0;
    font-style:    italic;
    color:         var(--color-text-secondary);
}

hr {
    border:        none;
    border-top:    1px solid var(--color-border);
    margin:        var(--space-6) 0;
}

mark {
    background:  #fff3cd;
    color:       var(--color-text-primary);
    padding:     0.1em 0.2em;
    border-radius: var(--radius-sm);
}

abbr[title] {
    text-decoration:      underline dotted;
    cursor:               help;
    text-underline-offset: 2px;
}

sup,
sub {
    font-size:   0.75em;
    line-height: 0;
}


/* ============================================================
   04. LINKS & FOCUS
   ============================================================ */

a {
    color:           var(--color-primary);
    text-decoration: none;
    transition:      color var(--transition-fast),
                     text-decoration-color var(--transition-fast);
}

a:hover {
    color:           var(--color-primary-dark);
    text-decoration: underline;
}

a:focus-visible {
    outline:        3px solid var(--color-primary);
    outline-offset: 2px;
    border-radius:  var(--radius-sm);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline:        3px solid var(--color-primary);
    outline-offset: 2px;
}

/* Remove focus ring on mouse click */
:focus:not(:focus-visible) {
    outline: none;
}


/* ============================================================
   05. ACCESSIBILITY HELPERS
   ============================================================ */

.skip-link {
    position:      absolute;
    top:           -9999px;
    left:          var(--space-4);
    z-index:       var(--z-toast);
    padding:       var(--space-2) var(--space-4);
    background:    var(--color-primary);
    color:         var(--color-white);
    border-radius: var(--radius-md);
    font-size:     var(--text-sm);
    font-weight:   var(--font-semibold);
    text-decoration: none;
    white-space:   nowrap;
}

.skip-link:focus {
    top:           var(--space-4);
    outline:       3px solid var(--color-white);
    outline-offset: 2px;
}

.screen-reader-text {
    position:   absolute;
    width:      1px;
    height:     1px;
    padding:    0;
    margin:     -1px;
    overflow:   hidden;
    clip:       rect(0, 0, 0, 0);
    white-space: nowrap;
    border:     0;
}

.screen-reader-text:focus {
    position:    static;
    width:       auto;
    height:      auto;
    clip:        auto;
    white-space: normal;
    padding:     var(--space-2) var(--space-4);
    background:  var(--color-primary);
    color:       var(--color-white);
    border-radius: var(--radius-md);
    font-size:   var(--text-sm);
    font-weight: var(--font-semibold);
}


/* ============================================================
   06. LAYOUT CONTAINERS
   ============================================================ */

.container {
    width:       100%;
    max-width:   var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left:  var(--space-5);
    padding-right: var(--space-5);
}

.container-sm {
    max-width: 860px;
}

.container-xs {
    max-width: 640px;
}

/* Site wrapper */
#page {
    display:        flex;
    flex-direction: column;
    min-height:     100vh;
}

#content {
    flex: 1;
    padding-top:    var(--space-6);
    padding-bottom: var(--space-10);
}


/* ============================================================
   07. HEADER
   ============================================================ */

#masthead {
    position:         sticky;
    top:              0;
    z-index:          var(--z-sticky);
    background:       var(--color-white);
    border-bottom:    1px solid var(--color-border);
    box-shadow:       var(--shadow-sm);
    height:           var(--header-height);
}

.site-header-inner {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    height:          100%;
    gap:             var(--space-4);
}

/* Top bar (above main header) */
.site-top-bar {
    background:  var(--color-gray-100);
    border-bottom: 1px solid var(--color-border-light);
    font-size:   var(--text-xs);
    padding:     5px 0;
}

.site-top-bar .container {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
}

/* Site logo */
.site-logo a {
    display:     flex;
    align-items: center;
    gap:         var(--space-2);
    text-decoration: none;
}

.site-logo img {
    height:    40px;
    width:     auto;
    display:   block;
}

.site-name {
    font-size:   var(--text-xl);
    font-weight: var(--font-bold);
    color:       var(--color-primary);
    letter-spacing: var(--tracking-tight);
}

/* Main navigation */
.main-nav ul {
    display:     flex;
    align-items: center;
    gap:         var(--space-1);
    list-style:  none;
    margin:      0;
    padding:     0;
}

.main-nav li a {
    display:       block;
    padding:       var(--space-2) var(--space-3);
    font-size:     var(--text-sm);
    font-weight:   var(--font-medium);
    color:         var(--color-text-secondary);
    border-radius: var(--radius-md);
    transition:    background var(--transition-fast),
                   color var(--transition-fast);
    white-space:   nowrap;
}

.main-nav li a:hover,
.main-nav li.current-menu-item > a,
.main-nav li.current-menu-ancestor > a {
    background: var(--color-primary-xlight);
    color:      var(--color-primary);
    text-decoration: none;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display:         none;
    align-items:     center;
    justify-content: center;
    width:           40px;
    height:          40px;
    background:      none;
    border:          none;
    cursor:          pointer;
    color:           var(--color-text-secondary);
    border-radius:   var(--radius-md);
    transition:      background var(--transition-fast),
                     color var(--transition-fast);
}

.mobile-menu-toggle:hover {
    background: var(--color-gray-100);
    color:      var(--color-primary);
}

/* Journal sub-nav (shown on journal/volume/issue/article pages) */
.journal-subnav {
    background:    var(--color-white);
    border-bottom: 1px solid var(--color-border);
    overflow-x:    auto;
    scrollbar-width: none;
}

.journal-subnav::-webkit-scrollbar {
    display: none;
}

.journal-subnav ul {
    display:    flex;
    gap:        var(--space-1);
    padding:    0 var(--space-5);
    white-space: nowrap;
}

.journal-subnav li a {
    display:       block;
    padding:       var(--space-2) var(--space-3);
    font-size:     var(--text-xs);
    font-weight:   var(--font-medium);
    color:         var(--color-text-muted);
    border-bottom: 2px solid transparent;
    transition:    color var(--transition-fast),
                   border-color var(--transition-fast);
}

.journal-subnav li a:hover,
.journal-subnav li.is-active a {
    color:        var(--color-primary);
    border-color: var(--color-primary);
    text-decoration: none;
}


/* ============================================================
   08. FOOTER
   ============================================================ */

#colophon {
    background: var(--color-footer-bg);
    color:      var(--color-footer-text);
    padding:    var(--space-10) 0 var(--space-6);
    margin-top: auto;
}

.footer-grid {
    display:               grid;
    grid-template-columns: repeat(4, 1fr);
    gap:                   var(--space-8);
    margin-bottom:         var(--space-8);
    padding-bottom:        var(--space-8);
    border-bottom:         1px solid rgba(255, 255, 255, .1);
}

.footer-col-title {
    font-size:      var(--text-xs);
    font-weight:    var(--font-bold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    color:          var(--color-white);
    margin-bottom:  var(--space-4);
}

.footer-nav ul,
.footer-journal-list {
    list-style: none;
    margin:     0;
    padding:    0;
}

.footer-nav li,
.footer-journal-list li {
    margin-bottom: var(--space-2);
}

.footer-nav a,
.footer-journal-list a {
    font-size:  var(--text-sm);
    color:      rgba(255, 255, 255, .7);
    transition: color var(--transition-fast);
    text-decoration: none;
}

.footer-nav a:hover,
.footer-journal-list a:hover {
    color: var(--color-white);
    text-decoration: none;
}

.footer-bottom {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    flex-wrap:       wrap;
    gap:             var(--space-3);
    font-size:       var(--text-xs);
    color:           rgba(255, 255, 255, .5);
}

.footer-license {
    display:     flex;
    align-items: center;
    gap:         var(--space-2);
    font-size:   var(--text-xs);
    color:       rgba(255, 255, 255, .5);
}

.footer-license a {
    color: rgba(255, 255, 255, .7);
}


/* ============================================================
   09. PAGINATION
   ============================================================ */

/* Numbered pagination (zyonix_pagination) */
.pagination {
    display:         flex;
    align-items:     center;
    justify-content: center;
    flex-wrap:       wrap;
    gap:             var(--space-1);
    padding:         var(--space-6) 0;
}

.pagination .page-numbers {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    min-width:       36px;
    height:          36px;
    padding:         0 var(--space-2);
    border:          1px solid var(--color-border);
    border-radius:   var(--radius-md);
    font-size:       var(--text-sm);
    font-weight:     var(--font-medium);
    color:           var(--color-text-secondary);
    background:      var(--color-white);
    text-decoration: none;
    transition:      background var(--transition-fast),
                     color var(--transition-fast),
                     border-color var(--transition-fast);
}

.pagination .page-numbers:hover {
    background:   var(--color-primary-xlight);
    color:        var(--color-primary);
    border-color: var(--color-primary);
}

.pagination .page-numbers.current {
    background:   var(--color-primary);
    color:        var(--color-white);
    border-color: var(--color-primary);
    font-weight:  var(--font-bold);
}

.pagination .page-numbers.dots {
    border-color: transparent;
    background:   transparent;
    color:        var(--color-text-muted);
    cursor:       default;
    pointer-events: none;
}

.pagination .page-numbers.prev,
.pagination .page-numbers.next {
    gap: var(--space-1);
}


/* ============================================================
   10. ARTICLE CARDS
   ============================================================ */

.article-card {
    padding:       var(--space-5) 0;
    border-bottom: 1px solid var(--color-border);
}

.article-card:last-child {
    border-bottom: none;
}

/* Top meta row */
.article-card-topmeta {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    flex-wrap:       wrap;
    gap:             var(--space-2);
    margin-bottom:   var(--space-2);
}

.article-card-badges {
    display:     flex;
    flex-wrap:   wrap;
    gap:         var(--space-2);
    align-items: center;
}

.article-card-file-info {
    display:     flex;
    align-items: center;
    gap:         var(--space-2);
    font-size:   var(--text-xs);
    color:       var(--color-text-muted);
    flex-shrink: 0;
}

/* Title */
.article-card-title {
    font-size:     var(--text-xl);
    font-weight:   var(--font-bold);
    line-height:   var(--leading-snug);
    margin-bottom: var(--space-2);
    color:         var(--color-text-primary);
}

.article-card-title a {
    color:      var(--color-text-primary);
    transition: color var(--transition-fast);
    text-decoration: none;
}

.article-card-title a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

/* Authors */
.article-card-authors,
.article-by {
    font-size:     var(--text-sm);
    color:         var(--color-text-secondary);
    margin-bottom: var(--space-1);
    line-height:   var(--leading-snug);
}

.article-by {
    margin-right: var(--space-1);
    color:        var(--color-text-muted);
}

.article-card-authors a {
    color:      var(--color-primary);
    transition: color var(--transition-fast);
    text-decoration: none;
}

.article-card-authors a:hover {
    text-decoration: underline;
}

/* Citation string */
.article-card-cite {
    font-size:     var(--text-xs);
    color:         var(--color-text-muted);
    font-style:    italic;
    margin-bottom: var(--space-1);
    line-height:   var(--leading-relaxed);
}

.article-card-cite a {
    color: inherit;
}

/* Metrics */
.article-card-metrics {
    font-size:     var(--text-xs);
    color:         var(--color-text-muted);
    margin-bottom: var(--space-2);
}

.article-metrics-sep {
    margin:     0 var(--space-2);
    color:      var(--color-border-dark);
}

/* Abstract */
.article-card-abstract {
    font-size:     var(--text-sm);
    color:         var(--color-text-secondary);
    line-height:   var(--leading-relaxed);
    margin-bottom: var(--space-2);
}

.article-abstract-label {
    font-weight:  var(--font-bold);
    color:        var(--color-text-primary);
    margin-right: var(--space-1);
}

.article-read-more {
    color:       var(--color-primary);
    font-size:   var(--text-xs);
    font-weight: var(--font-medium);
    text-decoration: none;
}

.article-read-more:hover {
    text-decoration: underline;
}

/* Special issue note */
.article-si-note {
    font-size:     var(--text-xs);
    color:         var(--color-text-muted);
    margin-bottom: var(--space-2);
    font-style:    italic;
}

.article-si-note a {
    color: var(--color-primary);
}

/* Keywords */
.article-card-keywords {
    display:       flex;
    flex-wrap:     wrap;
    gap:           var(--space-1);
    margin-bottom: var(--space-2);
}

.article-keyword-tag {
    display:       inline-flex;
    padding:       2px var(--space-2);
    background:    var(--color-primary-xlight);
    border:        1px solid rgba(0, 117, 180, .15);
    border-radius: var(--radius-full);
    font-size:     var(--text-xs);
    font-weight:   var(--font-medium);
    color:         var(--color-primary);
    text-decoration: none;
    transition:    background var(--transition-fast),
                   color var(--transition-fast);
}

.article-keyword-tag:hover {
    background: var(--color-primary);
    color:      var(--color-white);
    text-decoration: none;
}

/* Action row */
.article-card-actions {
    display:     flex;
    align-items: center;
    gap:         var(--space-4);
    flex-wrap:   wrap;
    margin-top:  var(--space-1);
}

/* Show figures */
.article-show-figs {
    display:     inline-flex;
    align-items: center;
    gap:         var(--space-1);
    background:  none;
    border:      none;
    cursor:      pointer;
    font-family: var(--font-primary);
    font-size:   var(--text-sm);
    color:       var(--color-primary);
    padding:     0;
    transition:  color var(--transition-fast);
}

.article-show-figs:hover {
    color: var(--color-primary-dark);
}

.article-figs-arrow {
    transition: transform var(--transition-base);
    flex-shrink: 0;
}

.article-show-figs[aria-expanded="true"] .article-figs-arrow {
    transform: rotate(90deg);
}

.article-figs-panel {
    margin-top: var(--space-3);
}

/* Article card footer */
.article-card-footer {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    flex-wrap:       wrap;
    gap:             var(--space-3);
    margin-top:      var(--space-3);
    padding-top:     var(--space-3);
    border-top:      1px solid var(--color-border-light);
}

.article-card-meta-row {
    display:     flex;
    align-items: center;
    gap:         var(--space-3);
    flex-wrap:   wrap;
    font-size:   var(--text-xs);
    color:       var(--color-text-muted);
}


/* ============================================================
   11. BUTTONS
   ============================================================ */

.btn {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    gap:             var(--space-2);
    padding:         var(--space-2) var(--space-4);
    font-family:     var(--font-primary);
    font-size:       var(--text-sm);
    font-weight:     var(--font-semibold);
    line-height:     1.4;
    border-radius:   var(--radius-md);
    border:          1px solid transparent;
    cursor:          pointer;
    text-decoration: none;
    white-space:     nowrap;
    transition:      background var(--transition-fast),
                     color var(--transition-fast),
                     border-color var(--transition-fast),
                     box-shadow var(--transition-fast);
    -webkit-user-select: none;
    user-select:     none;
}

.btn:disabled,
.btn[disabled],
.btn.is-loading {
    opacity:        0.6;
    cursor:         not-allowed;
    pointer-events: none;
}

/* Primary */
.btn-primary {
    background:   var(--color-primary);
    color:        var(--color-white);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background:   var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color:        var(--color-white);
    text-decoration: none;
}

/* Secondary */
.btn-secondary {
    background:   var(--color-white);
    color:        var(--color-text-secondary);
    border-color: var(--color-border-dark);
}

.btn-secondary:hover {
    background:  var(--color-gray-100);
    color:       var(--color-text-primary);
    text-decoration: none;
}

/* PDF download */
.btn-pdf {
    background:   #c62828;
    color:        var(--color-white);
    border-color: #c62828;
}

.btn-pdf:hover {
    background:   #b71c1c;
    border-color: #b71c1c;
    color:        var(--color-white);
    text-decoration: none;
}

/* Dark (MDPI action buttons) */
.btn-dark {
    background:   #37474f;
    color:        var(--color-white);
    border-color: #37474f;
}

.btn-dark:hover {
    background:  #263238;
    border-color: #263238;
    color:       var(--color-white);
    text-decoration: none;
}

/* Ghost / outline */
.btn-ghost {
    background:   transparent;
    color:        var(--color-primary);
    border-color: var(--color-primary);
}

.btn-ghost:hover {
    background:  var(--color-primary-xlight);
    text-decoration: none;
}

/* Teal (Propose special issue) */
.btn-teal {
    background:   #0d7377;
    color:        var(--color-white);
    border-color: #0d7377;
}

.btn-teal:hover {
    background:   #0a5e61;
    border-color: #0a5e61;
    color:        var(--color-white);
    text-decoration: none;
}

/* Sizes */
.btn-sm  { padding: 4px var(--space-3); font-size: var(--text-xs); }
.btn-xs  { padding: 3px var(--space-2); font-size: var(--text-xs); }
.btn-lg  { padding: var(--space-3) var(--space-6); font-size: var(--text-lg); }
.btn-xl  { padding: var(--space-4) var(--space-8); font-size: var(--text-xl); }
.btn-block { width: 100%; justify-content: center; }

/* Loading spinner */
.btn.is-loading::after {
    content:       '';
    display:       inline-block;
    width:         14px;
    height:        14px;
    border:        2px solid rgba(255, 255, 255, .35);
    border-top-color: currentColor;
    border-radius: 50%;
    animation:     zyonix-spin 0.6s linear infinite;
    flex-shrink:   0;
}

@keyframes zyonix-spin {
    to { transform: rotate(360deg); }
}


/* ============================================================
   12. BADGES
   ============================================================ */

.badge {
    display:        inline-flex;
    align-items:    center;
    padding:        2px var(--space-2);
    font-family:    var(--font-primary);
    font-size:      11px;
    font-weight:    var(--font-bold);
    line-height:    1.4;
    border-radius:  2px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space:    nowrap;
}

/* Open Access */
.badge-oa {
    background: var(--color-oa-green);
    color:      var(--color-white);
}

/* Article type */
.badge-type {
    background: var(--color-article-type);
    color:      var(--color-white);
}

/* Journal abbreviation */
.badge-section,
.badge-journal {
    background:      var(--color-primary);
    color:           var(--color-white);
    text-decoration: none;
}

.badge-section:hover,
.badge-journal:hover {
    background:  var(--color-primary-dark);
    color:       var(--color-white);
    text-decoration: none;
}

/* Outline variant */
.badge-outline {
    background:   transparent;
    border:       1px solid var(--color-border-dark);
    color:        var(--color-text-secondary);
}


/* ============================================================
   13. FORMS & INPUTS
   ============================================================ */

.form-group {
    margin-bottom: var(--space-4);
}

.form-label {
    display:       block;
    font-size:     var(--text-sm);
    font-weight:   var(--font-semibold);
    color:         var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
    width:         100%;
    padding:       var(--space-2) var(--space-3);
    font-family:   var(--font-primary);
    font-size:     var(--text-sm);
    color:         var(--color-text-primary);
    background:    var(--color-white);
    border:        1px solid var(--color-border-dark);
    border-radius: var(--radius-md);
    line-height:   var(--leading-normal);
    transition:    border-color var(--transition-fast),
                   box-shadow var(--transition-fast);
    -webkit-appearance: none;
    appearance:    none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline:      none;
    border-color: var(--color-primary);
    box-shadow:   0 0 0 3px rgba(0, 117, 180, .12);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--color-gray-400);
}

.form-select {
    background-image:    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat:   no-repeat;
    background-position: right 10px center;
    padding-right:       30px;
    cursor:              pointer;
}

.form-textarea {
    resize:      vertical;
    min-height:  80px;
    line-height: var(--leading-relaxed);
}

/* Checkbox / radio */
.form-check {
    display:     flex;
    align-items: flex-start;
    gap:         var(--space-2);
    cursor:      pointer;
}

.form-check-input {
    width:         16px;
    height:        16px;
    border:        2px solid var(--color-border-dark);
    border-radius: var(--radius-sm);
    background:    var(--color-white);
    flex-shrink:   0;
    cursor:        pointer;
    accent-color:  var(--color-primary);
    margin-top:    2px;
}

.form-check-label {
    font-size:  var(--text-sm);
    color:      var(--color-text-secondary);
    cursor:     pointer;
    line-height: var(--leading-relaxed);
}

/* Search form */
.search-form {
    display:       flex;
    border-radius: var(--radius-md);
    overflow:      hidden;
    box-shadow:    var(--shadow-sm);
}

.search-form input[type="search"] {
    flex:          1;
    border:        1px solid var(--color-border-dark);
    border-right:  none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    padding:       var(--space-2) var(--space-4);
    font-size:     var(--text-base);
    min-width:     0;
}

.search-form input[type="search"]:focus {
    outline:      none;
    border-color: var(--color-primary);
    box-shadow:   none;
}

.search-form button {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}


/* ============================================================
   14. IMAGE SIZES
   ============================================================ */

/* Registered via add_image_size() in inc/post-types.php */
.journal-cover-img   { width: 120px; height: 158px; object-fit: cover; }
.issue-cover-img     { width: 140px; height: 185px; object-fit: cover; }
.article-figure-img  { max-width: 100%; height: auto; }

/* Featured image inside article body */
.wp-post-image {
    border-radius: var(--radius-md);
    border:        1px solid var(--color-border);
}


/* ============================================================
   15. WORDPRESS CORE BLOCK OVERRIDES
   ============================================================ */

/* Gutenberg alignment classes */
.alignleft  { float: left;  margin: 0 var(--space-5) var(--space-4) 0; }
.alignright { float: right; margin: 0 0 var(--space-4) var(--space-5); }
.aligncenter {
    display:    block;
    margin:     0 auto var(--space-4);
    text-align: center;
}

.alignwide {
    margin-left:  calc(-1 * var(--space-8));
    margin-right: calc(-1 * var(--space-8));
    max-width:    none;
}

.alignfull {
    margin-left:  calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width:    100vw;
    width:        100vw;
}

/* WP figure / caption */
figure {
    margin: var(--space-5) 0;
}

figcaption,
.wp-caption-text {
    font-size:  var(--text-xs);
    color:      var(--color-text-muted);
    text-align: center;
    margin-top: var(--space-2);
    font-style: italic;
}

/* WP gallery */
.gallery {
    display:               grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap:                   var(--space-3);
    margin:                var(--space-4) 0;
}

.gallery-item img {
    width:         100%;
    height:        160px;
    object-fit:    cover;
    border-radius: var(--radius-md);
    border:        1px solid var(--color-border);
}

/* WP embeds */
.wp-block-embed {
    margin: var(--space-5) 0;
}

/* Tables in content */
.entry-content table,
.wp-block-table table {
    width:           100%;
    border-collapse: collapse;
    font-size:       var(--text-sm);
    margin-bottom:   var(--space-5);
}

.entry-content th,
.entry-content td,
.wp-block-table th,
.wp-block-table td {
    border:   1px solid var(--color-border);
    padding:  var(--space-2) var(--space-3);
    text-align: left;
    vertical-align: top;
}

.entry-content th,
.wp-block-table th {
    background:  var(--color-gray-100);
    font-weight: var(--font-semibold);
    color:       var(--color-text-primary);
}

.entry-content tr:nth-child(even) td,
.wp-block-table tr:nth-child(even) td {
    background: var(--color-gray-50);
}


/* ============================================================
   16. UTILITY CLASSES
   ============================================================ */

/* Display */
.d-none     { display: none !important; }
.d-block    { display: block !important; }
.d-flex     { display: flex !important; }
.d-grid     { display: grid !important; }
.d-inline   { display: inline !important; }
.d-inline-flex { display: inline-flex !important; }

/* Flexbox */
.flex-wrap    { flex-wrap: wrap !important; }
.flex-nowrap  { flex-wrap: nowrap !important; }
.items-center { align-items: center !important; }
.items-start  { align-items: flex-start !important; }
.items-end    { align-items: flex-end !important; }
.justify-between { justify-content: space-between !important; }
.justify-center  { justify-content: center !important; }
.justify-end     { justify-content: flex-end !important; }
.gap-2 { gap: var(--space-2) !important; }
.gap-3 { gap: var(--space-3) !important; }
.gap-4 { gap: var(--space-4) !important; }
.gap-6 { gap: var(--space-6) !important; }

/* Typography */
.text-xs    { font-size: var(--text-xs) !important; }
.text-sm    { font-size: var(--text-sm) !important; }
.text-base  { font-size: var(--text-base) !important; }
.text-lg    { font-size: var(--text-lg) !important; }
.text-xl    { font-size: var(--text-xl) !important; }
.text-2xl   { font-size: var(--text-2xl) !important; }
.text-3xl   { font-size: var(--text-3xl) !important; }

.font-normal   { font-weight: var(--font-normal) !important; }
.font-medium   { font-weight: var(--font-medium) !important; }
.font-semibold { font-weight: var(--font-semibold) !important; }
.font-bold     { font-weight: var(--font-bold) !important; }

.text-left    { text-align: left !important; }
.text-center  { text-align: center !important; }
.text-right   { text-align: right !important; }

.text-primary   { color: var(--color-text-primary) !important; }
.text-secondary { color: var(--color-text-secondary) !important; }
.text-muted     { color: var(--color-text-muted) !important; }
.text-link      { color: var(--color-primary) !important; }
.text-white     { color: var(--color-white) !important; }

.italic  { font-style: italic !important; }
.no-wrap { white-space: nowrap !important; }

/* Spacing */
.mt-0  { margin-top:    0 !important; }
.mt-2  { margin-top:    var(--space-2) !important; }
.mt-4  { margin-top:    var(--space-4) !important; }
.mt-6  { margin-top:    var(--space-6) !important; }
.mb-0  { margin-bottom: 0 !important; }
.mb-2  { margin-bottom: var(--space-2) !important; }
.mb-4  { margin-bottom: var(--space-4) !important; }
.mb-6  { margin-bottom: var(--space-6) !important; }

/* Borders */
.border       { border: 1px solid var(--color-border) !important; }
.border-top   { border-top: 1px solid var(--color-border) !important; }
.border-bottom { border-bottom: 1px solid var(--color-border) !important; }
.rounded      { border-radius: var(--radius-md) !important; }
.rounded-lg   { border-radius: var(--radius-lg) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }

/* Backgrounds */
.bg-white    { background-color: var(--color-white) !important; }
.bg-gray-50  { background-color: var(--color-gray-50) !important; }
.bg-primary  { background-color: var(--color-primary) !important; }

/* Visibility */
.invisible     { visibility: hidden !important; }
.opacity-0     { opacity: 0 !important; }
.overflow-hidden { overflow: hidden !important; }

/* Width / height */
.w-full  { width: 100% !important; }
.h-full  { height: 100% !important; }
.min-w-0 { min-width: 0 !important; }

/* Cursor */
.cursor-pointer { cursor: pointer !important; }
.cursor-default { cursor: default !important; }

/* Truncate */
.truncate {
    overflow:      hidden;
    text-overflow: ellipsis;
    white-space:   nowrap;
}

.line-clamp-2 {
    display:           -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow:           hidden;
}

.line-clamp-3 {
    display:           -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow:           hidden;
}


/* ============================================================
   17. ANIMATION HELPERS
   ============================================================ */

@keyframes zyonix-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes zyonix-fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes zyonix-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .4; }
}

@keyframes zyonix-shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position:  400px 0; }
}

.animate-fade-in {
    animation: zyonix-fade-in var(--transition-base) ease both;
}

.animate-fade-up {
    animation: zyonix-fade-up var(--transition-base) ease both;
}

.animate-pulse {
    animation: zyonix-pulse 1.5s ease-in-out infinite;
}

/* Skeleton / loading placeholder */
.skeleton {
    background:      linear-gradient(90deg, var(--color-gray-200) 25%, var(--color-gray-100) 37%, var(--color-gray-200) 63%);
    background-size: 400px 100%;
    animation:       zyonix-shimmer 1.4s ease infinite;
    border-radius:   var(--radius-sm);
}

/* Prefer reduced motion: see assets/css/responsive.css */


/* ============================================================
   18. ADMIN BAR OFFSET
   ============================================================ */

/* When the WP admin bar is visible, offset the sticky header */
.admin-bar #masthead {
    top: 32px;
}

.admin-bar .zyonix-left,
.admin-bar .zyonix-right,
.admin-bar .aa-sidebar,
.admin-bar .ti-left,
.admin-bar .ti-right,
.admin-bar .tv-left,
.admin-bar .tv-right,
.admin-bar .tj-left,
.admin-bar .tj-right,
.admin-bar .pg-sidebar,
.admin-bar .ix-sidebar {
    top: calc(32px + var(--header-height) + 8px);
}

/* Admin bar responsive offset: see assets/css/responsive.css */


/* ============================================================
   19. RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Responsive breakpoints: see assets/css/responsive.css */

/* Responsive breakpoint rules moved to assets/css/responsive.css */

/* Responsive breakpoint rules moved to assets/css/responsive.css */


/* ============================================================
   20. PRINT STYLES
   ============================================================ */

/* Print styles are in assets/css/print.css (loaded with media="print") */