/* ═══════════════════════════════════════════════════════════
   NJT Journals — frontend styles
   Rebrand in one place: change the variables below.
   ═══════════════════════════════════════════════════════════ */
.njtj-wrap {
	--njtj-accent:      #24425c;   /* primary — links, buttons        */
	--njtj-accent-dark: #182f43;   /* hover state                     */
	--njtj-ink:         #23272e;   /* body text                       */
	--njtj-muted:       #6b7280;   /* secondary text                  */
	--njtj-paper:       #ffffff;   /* card / page surface             */
	--njtj-soft:        #f5f6f4;   /* subtle background               */
	--njtj-line:        #e4e6e3;   /* borders                         */
	--njtj-serif:       Georgia, 'Times New Roman', serif;
	--njtj-sans:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, sans-serif;
	--njtj-radius:      10px;

	max-width: 1180px;
	margin: 0 auto;
	padding: 56px 5% 90px;
	font-family: var(--njtj-sans);
	color: var(--njtj-ink);
	line-height: 1.65;
}
.njtj-wrap *, .njtj-wrap *::before, .njtj-wrap *::after { box-sizing: border-box; }
.njtj-wrap img { max-width: 100%; height: auto; display: block; }
.njtj-wrap a { text-decoration: none; }
.njtj-wrap a:focus-visible,
.njtj-wrap .njtj-btn:focus-visible { outline: 2px solid var(--njtj-accent); outline-offset: 3px; }

/* ── Type ─────────────────────────────────────────────────── */
.njtj-eyebrow {
	font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
	color: var(--njtj-accent); font-weight: 600; margin: 0 0 10px;
}
.njtj-eyebrow a { color: inherit; }
.njtj-eyebrow a:hover { text-decoration: underline; }

.njtj-page-title, .njtj-title {
	font-family: var(--njtj-serif);
	font-weight: 700; color: var(--njtj-ink);
	margin: 0 0 12px; line-height: 1.18;
}
.njtj-page-title { font-size: clamp(34px, 4.5vw, 48px); }
.njtj-title      { font-size: clamp(28px, 3.6vw, 40px); }

.njtj-section-title {
	font-family: var(--njtj-serif);
	font-size: clamp(22px, 2.6vw, 28px);
	margin: 0 0 24px; padding-bottom: 14px;
	border-bottom: 1px solid var(--njtj-line);
}
.njtj-sub-title { font-family: var(--njtj-serif); font-size: 19px; margin: 0 0 10px; }

.njtj-page-head { margin-bottom: 44px; max-width: 640px; }
.njtj-page-sub  { color: var(--njtj-muted); margin: 0; }
.njtj-empty     { color: var(--njtj-muted); background: var(--njtj-soft); padding: 26px 24px; border-radius: var(--njtj-radius); }

/* ── Breadcrumb ───────────────────────────────────────────── */
.njtj-crumb { font-size: 13px; color: var(--njtj-muted); margin-bottom: 30px; }
.njtj-crumb a { color: var(--njtj-muted); }
.njtj-crumb a:hover { color: var(--njtj-accent); }
.njtj-crumb-sep { margin: 0 8px; opacity: .6; }
.njtj-crumb-here { color: var(--njtj-ink); }

/* ── Card grids ───────────────────────────────────────────── */
.njtj-grid { display: grid; gap: 30px; }
.njtj-grid-journals { grid-template-columns: repeat(4, 1fr); }
.njtj-grid-issues   { grid-template-columns: repeat(4, 1fr); }

.njtj-card {
	background: var(--njtj-paper);
	border: 1px solid var(--njtj-line);
	border-radius: var(--njtj-radius);
	overflow: hidden; display: flex; flex-direction: column;
	transition: transform .18s ease, box-shadow .18s ease;
}
.njtj-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(20, 30, 45, .10); }

.njtj-card-cover {
	aspect-ratio: 3 / 4; background: var(--njtj-soft);
	display: flex; align-items: center; justify-content: center;
	overflow: hidden;
}
.njtj-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.njtj-cover-fallback {
	font-family: var(--njtj-serif); font-size: 17px; color: var(--njtj-accent);
	padding: 20px; text-align: center; line-height: 1.4;
}

.njtj-card-body { padding: 16px 18px 20px; }
.njtj-card-title { font-family: var(--njtj-serif); font-size: 17px; color: var(--njtj-ink); margin: 0 0 6px; line-height: 1.35; }
.njtj-card:hover .njtj-card-title { color: var(--njtj-accent); }
.njtj-card-meta  { font-size: 13px; color: var(--njtj-muted); margin: 0 0 8px; }
.njtj-card-count { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--njtj-accent); font-weight: 600; margin: 0; }

/* ── Journal / Issue header block ─────────────────────────── */
.njtj-journal-head {
	display: grid; grid-template-columns: 260px 1fr; gap: 44px;
	align-items: start; margin-bottom: 56px;
}
.njtj-journal-cover {
	aspect-ratio: 3 / 4; background: var(--njtj-soft);
	border: 1px solid var(--njtj-line); border-radius: var(--njtj-radius);
	overflow: hidden; display: flex; align-items: center; justify-content: center;
	box-shadow: 0 18px 36px rgba(20, 30, 45, .12);
}
.njtj-journal-cover img { width: 100%; height: 100%; object-fit: cover; }

.njtj-issue-label { font-size: 15px; color: var(--njtj-muted); margin: -4px 0 18px; }

.njtj-pub-details { display: flex; flex-wrap: wrap; gap: 10px 34px; margin: 0 0 22px; padding: 16px 0; border-top: 1px solid var(--njtj-line); border-bottom: 1px solid var(--njtj-line); }
.njtj-pub-details div { min-width: 0; }
.njtj-pub-details dt { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--njtj-muted); margin: 0 0 2px; }
.njtj-pub-details dd { font-size: 14px; margin: 0; font-weight: 600; }
.njtj-pub-details-stack { flex-direction: column; gap: 12px; border: 0; padding: 0; }

.njtj-desc p { margin: 0 0 14px; color: var(--njtj-ink); }
.njtj-desc p:last-child { margin-bottom: 0; }

.njtj-section { margin-top: 10px; }

/* ── Table of contents (signature element) ────────────────── */
.njtj-toc { list-style: none; margin: 0; padding: 0; counter-reset: njtj-ch; }
.njtj-toc-row {
	display: flex; align-items: baseline; gap: 14px;
	padding: 20px 4px; border-bottom: 1px solid var(--njtj-line);
	counter-increment: njtj-ch;
}
.njtj-toc-row::before {
	content: counter(njtj-ch, decimal-leading-zero);
	font-size: 13px; color: var(--njtj-muted); font-variant-numeric: tabular-nums;
	flex: 0 0 30px;
}
.njtj-toc-main { min-width: 0; }
.njtj-toc-title { font-family: var(--njtj-serif); font-size: 18px; color: var(--njtj-ink); line-height: 1.4; }
.njtj-toc-title:hover { color: var(--njtj-accent); text-decoration: underline; text-underline-offset: 3px; }
.njtj-toc-authors { font-size: 13px; color: var(--njtj-muted); margin: 4px 0 0; }
.njtj-toc-leader {
	flex: 1 1 auto; min-width: 24px;
	border-bottom: 2px dotted var(--njtj-line);
	transform: translateY(-4px);
}
.njtj-toc-side { flex: 0 0 auto; display: flex; align-items: center; gap: 16px; }
.njtj-toc-pages { font-size: 13px; color: var(--njtj-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.njtj-toc-dl {
	font-size: 13px; font-weight: 600; color: var(--njtj-accent);
	border: 1px solid var(--njtj-accent); border-radius: 999px;
	padding: 5px 14px; white-space: nowrap;
	transition: background .15s ease, color .15s ease;
}
.njtj-toc-dl:hover { background: var(--njtj-accent); color: #fff; }

/* ── Chapter detail ───────────────────────────────────────── */
.njtj-chapter-layout { display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: start; }
.njtj-chapter-authors { font-size: 16px; color: var(--njtj-muted); margin: 0 0 26px; }
.njtj-chapter-desc, .njtj-pubinfo { margin-bottom: 30px; }
.njtj-pubinfo p { color: var(--njtj-muted); font-size: 14px; margin: 0; }

.njtj-side-card {
	position: sticky; top: 30px;
	background: var(--njtj-soft);
	border: 1px solid var(--njtj-line);
	border-radius: var(--njtj-radius);
	padding: 24px;
}
.njtj-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 9px;
	width: 100%; padding: 13px 20px;
	background: var(--njtj-accent); color: #fff;
	font-size: 15px; font-weight: 600;
	border: 0; border-radius: 8px; cursor: pointer;
	transition: background .15s ease;
}
.njtj-btn:hover { background: var(--njtj-accent-dark); color: #fff; }
.njtj-side-note { font-size: 12.5px; color: var(--njtj-muted); text-align: center; margin: 10px 0 18px; }

/* ── Pagination ───────────────────────────────────────────── */
.njtj-pagination { margin-top: 46px; }
.njtj-pagination .page-numbers {
	display: inline-block; padding: 7px 13px; margin-right: 6px;
	border: 1px solid var(--njtj-line); border-radius: 7px;
	color: var(--njtj-ink); font-size: 14px;
}
.njtj-pagination .page-numbers.current,
.njtj-pagination .page-numbers:hover { background: var(--njtj-accent); border-color: var(--njtj-accent); color: #fff; }

/* ── Motion preference ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.njtj-card, .njtj-toc-dl, .njtj-btn { transition: none; }
	.njtj-card:hover { transform: none; }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
	.njtj-grid-journals, .njtj-grid-issues { grid-template-columns: repeat(3, 1fr); }
	.njtj-chapter-layout { grid-template-columns: 1fr 270px; gap: 34px; }
}
@media (max-width: 820px) {
	.njtj-wrap { padding: 42px 5% 70px; }
	.njtj-journal-head { grid-template-columns: 200px 1fr; gap: 28px; }
	.njtj-chapter-layout { grid-template-columns: 1fr; }
	.njtj-side-card { position: static; }
}
@media (max-width: 640px) {
	.njtj-grid-journals, .njtj-grid-issues { grid-template-columns: repeat(2, 1fr); gap: 18px; }
	.njtj-journal-head { grid-template-columns: 1fr; }
	.njtj-journal-cover { max-width: 240px; }
	.njtj-toc-row { flex-wrap: wrap; row-gap: 8px; }
	.njtj-toc-leader { display: none; }
	.njtj-toc-side { flex: 1 0 100%; padding-left: 44px; }
	.njtj-card-body { padding: 12px 13px 15px; }
	.njtj-card-title { font-size: 15px; }
}
