/* ==========================================================================
   NCAEJ journal pages: article landing page, issue TOC, archive, search.
   Palette from the NNCAE crest and cover: green, navy, sky.
   ========================================================================== */
:root {
    --nj-green: #0b6b2e;
    --nj-green-dark: #08521f;
    --nj-green-soft: #e8f3ec;
    --nj-navy: #1d2b6b;
    --nj-sky: #2bb5ec;
    --nj-ink: #1f2933;
    --nj-ink-2: #4a5563;
    --nj-muted: #6b7280;
    --nj-line: #e3e7eb;
    --nj-paper: #fbfcfb;
    --nj-radius: 6px;
    --nj-serif: Georgia, "Times New Roman", Times, serif;
}

/* ---------- breadcrumb in the green banner ---------- */
.nj-crumbs { color: #dfeee4; font-size: 14px; line-height: 1.6; padding: 14px 0; }
.nj-crumbs a { color: #fff; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(255,255,255,.45); }
.nj-crumbs a:hover { text-decoration-color: #fff; }
.nj-crumbs span[aria-hidden] { margin: 0 6px; opacity: .7; }

.nj-article, .nj-issue, .nj-archive, .nj-search { color: var(--nj-ink); }
.nj-muted { color: var(--nj-muted); }

/* ---------- article header ---------- */
.nj-eyebrow { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 13px; color: var(--nj-muted); margin-bottom: 10px; }
.nj-badge { background: var(--nj-green-soft); color: var(--nj-green-dark); font-weight: 600; letter-spacing: .02em; padding: 2px 10px; border-radius: 999px; }
.nj-access { font-weight: 600; }
.nj-access.is-open { color: var(--nj-green); }
.nj-access.is-paid { color: #9a5b00; }
.nj-title { font-family: var(--nj-serif); font-size: 30px; line-height: 1.25; font-weight: 700; color: var(--nj-ink); margin: 0 0 18px; }
@media (max-width: 575px) { .nj-title { font-size: 23px; } }

.nj-authors { margin-bottom: 18px; }
.nj-author { padding: 6px 0; border-bottom: 1px dashed var(--nj-line); }
.nj-author:last-child { border-bottom: 0; }
.nj-author-name { font-weight: 700; color: var(--nj-ink); }
.nj-orcid img { vertical-align: -2px; margin-left: 4px; }
.nj-mail { margin-left: 6px; color: var(--nj-green); }
.nj-affil { display: block; font-size: 14px; color: var(--nj-ink-2); }

/* ---------- buttons ---------- */
.nj-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 26px; }
.nj-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--nj-line); border-radius: var(--nj-radius);
          background: #fff; color: var(--nj-ink); font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.nj-btn:hover, .nj-btn:focus { border-color: var(--nj-green); color: var(--nj-green); text-decoration: none; }
.nj-btn-primary { background: var(--nj-green); border-color: var(--nj-green); color: #fff; }
.nj-btn-primary:hover, .nj-btn-primary:focus { background: var(--nj-green-dark); border-color: var(--nj-green-dark); color: #fff; }
.nj-btn-outline { border-color: var(--nj-green); color: var(--nj-green); }
.nj-btn-outline:hover { background: var(--nj-green); color: #fff; }
.nj-btn-block { display: flex; justify-content: center; width: 100%; }
.nj-btn-sm { padding: 5px 10px; font-size: 13px; }
.nj-btn small { font-weight: 400; opacity: .9; }

/* ---------- content blocks ---------- */
.nj-block { padding: 22px 0; border-top: 1px solid var(--nj-line); }
.nj-block h2 { font-family: var(--nj-serif); font-size: 21px; font-weight: 700; color: var(--nj-navy); margin: 0 0 12px; }
.nj-abstract p { font-size: 16px; line-height: 1.75; text-align: justify; hyphens: auto; color: var(--nj-ink); margin-bottom: 12px; }

.nj-tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.nj-tags a { display: inline-block; padding: 4px 12px; border: 1px solid #cfe3d6; background: var(--nj-green-soft); color: var(--nj-green-dark); border-radius: 999px; font-size: 14px; }
.nj-tags a:hover { background: var(--nj-green); border-color: var(--nj-green); color: #fff; text-decoration: none; }

.nj-details { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; margin: 0; font-size: 15px; }
.nj-details dt { font-weight: 600; color: var(--nj-ink-2); }
.nj-details dd { margin: 0; word-break: break-word; }
@media (max-width: 575px) { .nj-details { grid-template-columns: 1fr; gap: 2px; } .nj-details dd { margin-bottom: 8px; } }
.nj-license { display: flex; gap: 14px; align-items: flex-start; margin-top: 18px; padding: 14px; background: var(--nj-paper); border: 1px solid var(--nj-line); border-radius: var(--nj-radius); font-size: 14px; }

/* ---------- how to cite ---------- */
.nj-cite { border: 1px solid var(--nj-line); border-radius: var(--nj-radius); background: var(--nj-paper); }
.nj-cite-custom { margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--nj-line); font-size: 15px; }
.nj-cite-styles { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 10px 0; border-bottom: 1px solid var(--nj-line); }
.nj-cite-styles button { border: 1px solid transparent; border-bottom: 0; background: none; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--nj-ink-2);
                         border-radius: var(--nj-radius) var(--nj-radius) 0 0; cursor: pointer; margin-bottom: -1px; }
.nj-cite-styles button:hover { color: var(--nj-green); }
.nj-cite-styles button.active { background: #fff; border-color: var(--nj-line); color: var(--nj-green); }
.nj-cite-text { background: #fff; padding: 16px; font-size: 15px; line-height: 1.7; word-break: break-word; }
.nj-cite-foot { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--nj-line); font-size: 14px; }
.nj-cite-foot a { color: var(--nj-green); font-weight: 600; }

/* ---------- references ---------- */
.nj-refs { padding-left: 1.6em; margin: 0; font-size: 14.5px; line-height: 1.65; }
.nj-refs li { padding: 4px 0 4px 4px; word-break: break-word; }
.nj-refs a { color: var(--nj-green); }

/* ---------- usage stats + chart ---------- */
.nj-stats { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.nj-stat { flex: 1 1 160px; padding: 14px 16px; border: 1px solid var(--nj-line); border-radius: var(--nj-radius); background: #fff; }
.nj-stat-num { display: block; font-size: 28px; font-weight: 700; color: var(--nj-ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.nj-stat-label { font-size: 13px; color: var(--nj-ink-2); }
.nj-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.nj-key-view { background: var(--nj-green); }
.nj-key-download { background: var(--nj-sky); }
.nj-chart { margin: 0; }
.nj-chart-plot { display: flex; align-items: stretch; gap: 2px; height: 150px; padding-top: 8px; border-bottom: 1px solid #cfd5db;
                 background: repeating-linear-gradient(to top, transparent 0, transparent 49px, #f0f2f4 49px, #f0f2f4 50px); }
.nj-chart-col { position: relative; flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end; outline: none; }
.nj-chart-bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px; padding: 0 2px; }
.nj-bar { display: block; width: 40%; max-width: 14px; min-height: 0; border-radius: 4px 4px 0 0; }
.nj-bar-view { background: var(--nj-green); }
.nj-bar-download { background: var(--nj-sky); }
.nj-chart-x { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--nj-muted); }
.nj-chart-col:hover, .nj-chart-col:focus { background: rgba(11, 107, 46, .06); }
.nj-chart-col[data-tip]:hover::after, .nj-chart-col[data-tip]:focus::after {
    content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 3;
    white-space: nowrap; background: var(--nj-ink); color: #fff; font-size: 12px; padding: 5px 8px; border-radius: 4px; pointer-events: none; }
.nj-chart-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 28px; font-size: 13px; color: var(--nj-ink-2); }
.nj-chart-table { margin-top: 10px; font-size: 13px; }
.nj-chart-table summary { cursor: pointer; color: var(--nj-green); font-weight: 600; }

/* ---------- lists / pager ---------- */
.nj-list { list-style: none; padding: 0; margin: 0; }
.nj-list li { padding: 8px 0; border-bottom: 1px solid var(--nj-line); }
.nj-list li:last-child { border-bottom: 0; }
.nj-list a { color: var(--nj-ink); font-weight: 600; }
.nj-list a:hover { color: var(--nj-green); }
.nj-list .nj-muted { display: block; font-size: 13px; }
.nj-list-compact li { padding: 6px 0; font-size: 14px; }
.nj-list-compact a { font-weight: 500; }
.nj-list-compact .nj-muted { display: inline; }
.nj-ranked { counter-reset: rank; }
.nj-ranked li { counter-increment: rank; padding-left: 26px; position: relative; }
.nj-ranked li::before { content: counter(rank); position: absolute; left: 0; top: 6px; width: 18px; height: 18px; border-radius: 50%;
                        background: var(--nj-green-soft); color: var(--nj-green-dark); font-size: 11px; font-weight: 700; text-align: center; line-height: 18px; }
.nj-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 22px 0 0; border-top: 1px solid var(--nj-line); }
.nj-pager a { display: block; padding: 12px 14px; border: 1px solid var(--nj-line); border-radius: var(--nj-radius); color: var(--nj-ink); }
.nj-pager a:hover { border-color: var(--nj-green); text-decoration: none; }
.nj-pager small { display: block; color: var(--nj-green); font-weight: 600; margin-bottom: 2px; }
.nj-pager span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; }
.nj-pager-next { text-align: right; grid-column: 2; }

/* ---------- sidebar ---------- */
.nj-sidebar { margin-bottom: 24px; }
.nj-card { border: 1px solid var(--nj-line); border-radius: var(--nj-radius); background: #fff; padding: 16px; margin-bottom: 18px; }
.nj-card h3 { font-size: 16px; font-weight: 700; color: var(--nj-navy); margin: 0 0 10px; }
.nj-card p { font-size: 14px; }
.nj-cover-card img { display: block; width: 100%; max-width: 260px; margin: 0 auto 14px; border-radius: 4px; box-shadow: 0 6px 18px rgba(16, 24, 40, .14); }
.nj-side-meta { margin: 14px 0 0; font-size: 14px; }
.nj-side-meta dt { font-weight: 600; color: var(--nj-ink-2); margin-top: 8px; }
.nj-side-meta dd { margin: 0; word-break: break-word; }
@media (min-width: 992px) { .nj-sidebar { position: sticky; top: 16px; align-self: flex-start; } }

/* ---------- issue table of contents ---------- */
.nj-issue-head { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; margin-bottom: 26px; }
@media (max-width: 767px) { .nj-issue-head { grid-template-columns: 1fr; } }
.nj-issue-head img { width: 100%; max-width: 220px; border-radius: 4px; box-shadow: 0 6px 18px rgba(16, 24, 40, .14); }
.nj-issue-head h1 { font-family: var(--nj-serif); font-size: 28px; font-weight: 700; margin: 4px 0 6px; color: var(--nj-ink); }
.nj-issue-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--nj-ink-2); margin-bottom: 12px; }
.nj-issue-desc { font-size: 15px; line-height: 1.7; color: var(--nj-ink); }
.nj-issue-desc.is-clamped { max-height: 9.5em; overflow: hidden; position: relative; }
.nj-issue-desc.is-clamped::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3em; background: linear-gradient(rgba(255,255,255,0), #fff); }
.nj-more { background: none; border: 0; padding: 0; color: var(--nj-green); font-weight: 600; cursor: pointer; }
.nj-toc-section { font-family: var(--nj-serif); font-size: 20px; color: var(--nj-navy); border-bottom: 2px solid var(--nj-green); padding-bottom: 6px; margin: 26px 0 4px; }
.nj-toc-item { display: grid; grid-template-columns: 1fr auto; gap: 6px 18px; padding: 16px 0; border-bottom: 1px solid var(--nj-line); }
.nj-toc-title { font-size: 16.5px; font-weight: 700; line-height: 1.4; margin: 0 0 4px; }
.nj-toc-title a { color: var(--nj-ink); }
.nj-toc-title a:hover { color: var(--nj-green); }
.nj-toc-authors { font-size: 14px; color: var(--nj-ink-2); }
.nj-toc-side { text-align: right; font-size: 13px; color: var(--nj-muted); white-space: nowrap; }
.nj-toc-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 575px) { .nj-toc-item { grid-template-columns: 1fr; } .nj-toc-side { text-align: left; } }

/* ---------- home intro ---------- */
.nj-hero { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: center; padding: 26px; border: 1px solid var(--nj-line); border-radius: var(--nj-radius); background: var(--nj-paper); margin-bottom: 30px; }
@media (max-width: 767px) { .nj-hero { grid-template-columns: 1fr; } }
.nj-hero img { width: 100%; max-width: 260px; border-radius: 4px; box-shadow: 0 8px 22px rgba(16, 24, 40, .16); }
.nj-hero h1 { font-family: var(--nj-serif); font-size: 28px; font-weight: 700; color: var(--nj-navy); margin: 0 0 10px; }
.nj-hero p { font-size: 15.5px; line-height: 1.7; }
.nj-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 14px 0 18px; list-style: none; font-size: 14px; color: var(--nj-ink-2); }
.nj-facts strong { color: var(--nj-ink); }

/* ---------- archive grid ---------- */
.nj-issue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px; }
.nj-issue-card { display: block; color: var(--nj-ink); }
.nj-issue-card:hover { text-decoration: none; color: var(--nj-green); }
.nj-issue-card img { width: 100%; aspect-ratio: 3 / 4.5; object-fit: cover; border-radius: 4px; box-shadow: 0 4px 14px rgba(16, 24, 40, .12); transition: transform .15s; }
.nj-issue-card:hover img { transform: translateY(-3px); }
.nj-issue-card strong { display: block; margin-top: 10px; font-size: 15px; }
.nj-issue-card > span { display: block; font-size: 13px; color: var(--nj-muted); }
.nj-current-flag { display: inline-block; font-size: 11px; font-weight: 700; background: var(--nj-green); color: #fff; padding: 1px 8px; border-radius: 999px; margin-left: 4px; vertical-align: 1px; }

/* ---------- search ---------- */
.nj-searchbar { display: flex; gap: 8px; margin-bottom: 20px; }
.nj-searchbar input { flex: 1; border: 1px solid #c9d1d9; border-radius: var(--nj-radius); padding: 10px 14px; font-size: 16px; }
.nj-searchbar input:focus { outline: 2px solid var(--nj-green); outline-offset: 1px; }
mark { background: #fff2b3; padding: 0 1px; }
