/* ==========================================================================\n   GGtheme v1.5 — Typography & Contrast Consistency\n   Final normalization layer. Loaded after the existing GGtheme styles.\n   Keeps v1.4.1 geometry/layout intact while unifying readable type sizes\n   and repairing remaining light/dark contrast gaps.\n   ========================================================================== */

:root {
    --gg-type-body: 13px;
    --gg-type-small: 11.5px;
    --gg-type-label: 10px;
    --gg-type-h1: 30px;
    --gg-type-h2: 24px;
    --gg-type-h3: 18px;
    --gg-type-h4: 15px;
    --gg-leading-body: 1.65;
}

/* --------------------------------------------------------------------------
   1. One readable body-copy scale across all public pages
   -------------------------------------------------------------------------- */
.gtheme-content-shell,
.gtheme-content-shell .gtheme-prose {
    font-size: var(--gg-type-body);
    line-height: var(--gg-leading-body);
}

.gtheme-content-shell .gtheme-prose p,
.gtheme-content-shell .gtheme-prose li,
.gtheme-content-shell .gtheme-prose dd,
.gtheme-content-shell .gtheme-prose blockquote,
.gtheme-content-shell .about-text,
.gtheme-content-shell .about-text p,
.gtheme-content-shell .section-desc,
.gtheme-content-shell .step-text,
.gtheme-content-shell .guide-card ul,
.gtheme-content-shell .guide-card li,
.gtheme-content-shell .item-label,
.gtheme-content-shell .gtheme-auth-intro,
.gtheme-content-shell .gtheme-auth-switch,
.gtheme-content-shell .gtheme-auth-aside p,
.gtheme-content-shell .gtheme-auth-benefits li,
.gtheme-content-shell .gtheme-auth-alert,
.gtheme-content-shell .gtheme-issue-card__description,
.gtheme-content-shell .obj_article_details dd,
.gtheme-content-shell .obj_article_details dt {
    font-size: var(--gg-type-body) !important;
    line-height: var(--gg-leading-body) !important;
}

/* Homepage: every normal <p> uses the same size. This intentionally includes
   About, announcement summaries and Recent Issue descriptions. */
body.pkp_page_index .gg-home p,
body.pkp_page_index .gg-home .gg-about-copy p,
body.pkp_page_index .gg-home .iit-announcement-wrap p,
body.pkp_page_index .gg-home .gg-recent-title {
    font-size: var(--gg-type-body) !important;
    line-height: var(--gg-leading-body) !important;
}

/* Text entered directly in the journal description can contain nested divs. */
body.pkp_page_index .gg-about-copy,
body.pkp_page_index .gg-about-copy div,
body.pkp_page_index .gg-about-copy li {
    font-size: var(--gg-type-body) !important;
    line-height: var(--gg-leading-body) !important;
}

/* Forms use the same reading scale instead of inheriting random browser/OJS sizes. */
.gtheme-content-shell label,
.gtheme-content-shell input,
.gtheme-content-shell select,
.gtheme-content-shell textarea,
.gtheme-content-shell button {
    font-size: var(--gg-type-body);
}

/* --------------------------------------------------------------------------
   2. Predictable heading hierarchy on inner pages
   -------------------------------------------------------------------------- */
.gtheme-content-shell .page > h1,
.gtheme-content-shell .page_title,
.gtheme-archive-heading h1,
.about-title-section h1,
.gtheme-auth-heading {
    font-size: var(--gg-type-h1) !important;
    line-height: 1.16 !important;
}

.gtheme-content-shell .subtitle,
.gtheme-content-shell .section-main-title {
    font-size: var(--gg-type-h2) !important;
    line-height: 1.25 !important;
}

.gtheme-content-shell .gtheme-auth-aside h3,
.gtheme-content-shell .col-header h3,
.gtheme-content-shell .submission-ready-card h3 {
    font-size: var(--gg-type-h3) !important;
    line-height: 1.3 !important;
}

.gtheme-content-shell .step-title,
.gtheme-content-shell .guide-card h4 {
    font-size: var(--gg-type-h4) !important;
    line-height: 1.4 !important;
}

/* Preserve the established compact homepage hierarchy. */
body.pkp_page_index .iit-section-head h2 { font-size: 26px !important; }
body.pkp_page_index .iit-current-card .obj_issue_toc ul[role="list"] h4,
body.pkp_page_index .iit-current-card .obj_issue_toc ul[role="list"] h5,
body.pkp_page_index .gg-recent-card-copy h3 { font-size: 16px !important; }

/* Avoid ultra-small supporting text while keeping labels visually subordinate. */
.gtheme-content-shell .item-subtext,
.gtheme-content-shell .gtheme-article-meta__license-terms,
.gtheme-content-shell .gtheme-archive-heading__eyebrow,
.gtheme-content-shell .gtheme-issue-card__series,
.gtheme-content-shell .gtheme-issue-card__date,
.gtheme-content-shell .gtheme-issue-card__date time,
.gtheme-content-shell .gtheme-auth-aside__foot {
    font-size: var(--gg-type-small) !important;
}

.gtheme-content-shell .section-intro-label,
.gtheme-content-shell .step-num,
.gtheme-content-shell .gtheme-article-meta__label,
.gtheme-content-shell .gtheme-auth-eyebrow,
.gtheme-content-shell .gtheme-auth-aside__label,
body.pkp_page_index .iit-eyebrow,
body.pkp_page_index .iit-passport span {
    font-size: var(--gg-type-label) !important;
}

/* Article detail utility text should match the body scale instead of varying
   between Tailwind text-xs/text-sm classes. */
.obj_article_details ._text-sm\/6,
.obj_article_details .text-sm\/6,
.obj_article_details .text-sm,
.obj_article_details p,
.obj_article_details .affiliation,
.obj_article_details .value {
    font-size: var(--gg-type-body) !important;
    line-height: var(--gg-leading-body) !important;
}

/* --------------------------------------------------------------------------
   3. Authentication contrast — fixes Login/Register/Lost Password in both modes
   -------------------------------------------------------------------------- */
.gtheme-auth-page {
    --auth-text: var(--gg-text);
    --auth-muted: var(--gg-muted);
    --auth-border: var(--gg-border);
    color: var(--gg-text-soft);
}
.gtheme-auth-frame,
.gtheme-register-form fieldset,
.gtheme-register-form fieldset.identity,
.gtheme-register-form fieldset.login {
    background: var(--gg-surface) !important;
    border-color: var(--gg-border) !important;
}
.gtheme-auth-main { color: var(--gg-text-soft); }
.gtheme-auth-heading,
.gtheme-auth-form label { color: var(--gg-text) !important; }
.gtheme-auth-intro,
.gtheme-auth-switch { color: var(--gg-muted) !important; }
.gtheme-auth-eyebrow,
.gtheme-auth-link,
.gtheme-auth-page a.gtheme-auth-link { color: var(--gtheme-mid) !important; }
.gtheme-auth-link:hover,
.gtheme-auth-page a.gtheme-auth-link:hover { color: var(--gtheme-dark) !important; }
.gtheme-auth-switch,
.gtheme-register-head { border-color: var(--gg-border-soft) !important; }
.gtheme-register-form fieldset > legend {
    background: var(--gg-surface) !important;
    color: var(--gtheme-mid) !important;
}
.gtheme-register-form .contexts > .context { border-color: var(--gg-border-soft) !important; }
.gtheme-auth-actions-list a {
    background: var(--gg-surface) !important;
    border-color: var(--gg-border) !important;
    color: var(--gg-text-soft) !important;
}

html.dark .gtheme-auth-page {
    --auth-text: var(--gg-text);
    --auth-muted: var(--gg-muted);
    --auth-border: var(--gg-border);
}
html.dark .gtheme-auth-frame,
html.dark .gtheme-register-form fieldset,
html.dark .gtheme-register-form fieldset.identity,
html.dark .gtheme-register-form fieldset.login {
    background: var(--gg-surface) !important;
    border-color: var(--gg-border) !important;
}
html.dark .gtheme-auth-main,
html.dark .gtheme-auth-heading,
html.dark .gtheme-auth-form label { color: var(--gg-text) !important; }
html.dark .gtheme-auth-intro,
html.dark .gtheme-auth-switch { color: var(--gg-muted) !important; }
html.dark .gtheme-auth-eyebrow,
html.dark .gtheme-auth-link,
html.dark .gtheme-auth-page a.gtheme-auth-link { color: var(--gtheme-accent) !important; }
html.dark .gtheme-auth-link:hover,
html.dark .gtheme-auth-page a.gtheme-auth-link:hover { color: #ffffff !important; }
html.dark .gtheme-register-form fieldset > legend {
    background: var(--gg-surface) !important;
    color: var(--gtheme-accent) !important;
}
html.dark .gtheme-auth-form input[type="text"],
html.dark .gtheme-auth-form input[type="email"],
html.dark .gtheme-auth-form input[type="password"],
html.dark .gtheme-auth-form input[type="url"],
html.dark .gtheme-auth-form textarea,
html.dark .gtheme-auth-form select {
    background: #0d1727 !important;
    border-color: #41506a !important;
    color: #f8fafc !important;
}
html.dark .gtheme-auth-form input::placeholder,
html.dark .gtheme-auth-form textarea::placeholder {
    color: #9aa9bd !important;
    opacity: 1;
}
html.dark .gtheme-auth-form input:focus,
html.dark .gtheme-auth-form textarea:focus,
html.dark .gtheme-auth-form select:focus {
    border-color: var(--gtheme-accent) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--gtheme-accent) 22%, transparent) !important;
}
html.dark .gtheme-auth-actions-list a {
    background: var(--gg-surface-raised) !important;
    border-color: var(--gg-border) !important;
    color: var(--gg-text-soft) !important;
}
html.dark .gtheme-auth-actions-list a:hover {
    background: var(--gg-surface-subtle) !important;
    color: #fff !important;
}

/* The right-side login panel is deliberately inverse in both appearances. */
.gtheme-auth-aside,
html.dark .gtheme-auth-aside { color: #fff !important; }
.gtheme-auth-aside h3,
.gtheme-auth-aside p,
.gtheme-auth-aside li { color: rgba(255,255,255,.86) !important; }
.gtheme-auth-aside h3 { color: #fff !important; }
.gtheme-auth-aside__foot { color: rgba(255,255,255,.66) !important; }

/* --------------------------------------------------------------------------
   4. Generic fallback contrast audit for OJS utility classes/components
   -------------------------------------------------------------------------- */
.gtheme-content-shell .cmp_notification,
.gtheme-content-shell .cmp_form,
.gtheme-content-shell .cmp_pagination,
.gtheme-content-shell .search_advanced {
    color: var(--gg-text-soft);
}

html.dark .gtheme-content-shell .bg-white { background-color: var(--gg-surface) !important; }
html.dark .gtheme-content-shell .bg-gray-50,
html.dark .gtheme-content-shell .bg-slate-50,
html.dark .gtheme-content-shell .bg-gray-100,
html.dark .gtheme-content-shell .bg-slate-100 { background-color: var(--gg-surface-subtle) !important; }

html.dark .gtheme-content-shell .text-gray-600,
html.dark .gtheme-content-shell .text-gray-700,
html.dark .gtheme-content-shell .text-slate-600,
html.dark .gtheme-content-shell .text-slate-700 { color: var(--gg-muted) !important; }
html.dark .gtheme-content-shell .text-gray-800,
html.dark .gtheme-content-shell .text-gray-900,
html.dark .gtheme-content-shell .text-slate-800,
html.dark .gtheme-content-shell .text-slate-900 { color: var(--gg-text) !important; }

html.dark .gtheme-content-shell .border-gray-100,
html.dark .gtheme-content-shell .border-gray-200,
html.dark .gtheme-content-shell .border-slate-100,
html.dark .gtheme-content-shell .border-slate-200 { border-color: var(--gg-border) !important; }

/* Search and other standard OJS forms. */
.gtheme-content-shell .cmp_form label,
.gtheme-content-shell .cmp_form legend { color: var(--gg-text) !important; }
html.dark .gtheme-content-shell .cmp_form,
html.dark .gtheme-content-shell .search_advanced { color: var(--gg-text-soft) !important; }

/* Keep mobile readable without re-introducing oversized typography. */
@media (max-width: 680px) {
    :root {
        --gg-type-body: 13px;
        --gg-type-h1: 27px;
        --gg-type-h2: 22px;
        --gg-type-h3: 18px;
    }
    body.pkp_page_index .iit-section-head h2 { font-size: 24px !important; }
}


/* ==========================================================================
   GGtheme v1.5.1 — Homepage Readability Tune
   Keeps the v1.5 global scale, but gives homepage editorial copy and the
   Current Issue article list a little more breathing room/readability.
   ========================================================================== */
:root {
    --gg-home-body: 14px;
    --gg-home-article-title: 17px;
    --gg-home-article-meta: 13px;
    --gg-home-article-utility: 12px;
}

/* Homepage prose: intentionally one step larger than the compact global body. */
body.pkp_page_index .gg-home p,
body.pkp_page_index .gg-home .gg-about-copy,
body.pkp_page_index .gg-home .gg-about-copy p,
body.pkp_page_index .gg-home .gg-about-copy div,
body.pkp_page_index .gg-home .gg-about-copy li,
body.pkp_page_index .gg-home .iit-announcement-wrap p,
body.pkp_page_index .gg-home .gg-recent-title,
body.pkp_page_index .iit-current-card .obj_issue_toc > .not-prose:first-of-type p {
    font-size: var(--gg-home-body) !important;
    line-height: 1.68 !important;
}

/* Current Issue list: stronger editorial hierarchy without losing compactness. */
body.pkp_page_index .iit-current-card .obj_issue_toc ul[role="list"] h4,
body.pkp_page_index .iit-current-card .obj_issue_toc ul[role="list"] h5 {
    font-size: var(--gg-home-article-title) !important;
    line-height: 1.38 !important;
    margin-bottom: 7px !important;
}

body.pkp_page_index .iit-current-card .obj_issue_toc ul[role="list"] .md\:text-sm,
body.pkp_page_index .iit-current-card .obj_issue_toc ul[role="list"] .text-sm,
body.pkp_page_index .iit-current-card .obj_issue_toc ul[role="list"] .font-medium {
    font-size: var(--gg-home-article-meta) !important;
    line-height: 1.5 !important;
}

body.pkp_page_index .iit-current-card .obj_issue_toc ul[role="list"] .gtheme-meta-badge,
body.pkp_page_index .iit-current-card .obj_issue_toc ul[role="list"] ul,
body.pkp_page_index .iit-current-card .obj_issue_toc ul[role="list"] ul a {
    font-size: var(--gg-home-article-utility) !important;
}

/* Give the slightly larger article type enough vertical room. */
body.pkp_page_index .iit-current-card .obj_issue_toc ul[role="list"] > li {
    min-height: 94px;
}

@media (max-width: 680px) {
    :root {
        --gg-home-body: 13.5px;
        --gg-home-article-title: 16.5px;
        --gg-home-article-meta: 12.5px;
        --gg-home-article-utility: 11.5px;
    }
}
