/*
 * OJS Issue & Article Lists
 * Inherits the theme's fonts and text colour; one accent colour (Settings) does the rest.
 */
.ojsl {
	--ojsl-accent: #1e3a5f;
	--ojsl-turmeric: #b7791f;
	--ojsl-radius: 6px;
	--ojsl-muted: color-mix(in srgb, currentColor 64%, transparent);
	--ojsl-line: color-mix(in srgb, currentColor 14%, transparent);
	--ojsl-wash: color-mix(in srgb, var(--ojsl-accent) 7%, transparent);
	position: relative;
	margin: 0 0 2em;
	line-height: 1.6;
}
.ojsl *,
.ojsl *::before,
.ojsl *::after { box-sizing: border-box; }
.ojsl ul,
.ojsl ol { margin: 0; padding: 0; list-style: none; }
.ojsl p { margin: 0; }
.ojsl a { color: inherit; }
.ojsl a:focus-visible,
.ojsl summary:focus-visible,
.ojsl button:focus-visible,
.ojsl input:focus-visible,
.ojsl select:focus-visible { outline: 2px solid var(--ojsl-accent); outline-offset: 2px; }
.ojsl .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ojsl-heading { margin: 0 0 .8em; }
.ojsl-group-head { margin: 1.6em 0 .4em; font-size: 1.15em; }
.ojsl-group:first-of-type .ojsl-group-head,
.ojsl > .ojsl-group-head:first-child { margin-top: 0; }
.ojsl-empty { padding: 1.2em; border: 1px dashed var(--ojsl-line); border-radius: var(--ojsl-radius); color: var(--ojsl-muted); }

/* ------------------------------------------------------------------
 * Covers
 * ---------------------------------------------------------------- */
.ojsl-cover { display: block; text-decoration: none; }
.ojsl-cover-img,
.ojsl-cover-made {
	display: block; width: 100%; aspect-ratio: 1 / 1.414; border-radius: calc(var(--ojsl-radius) * .6);
	object-fit: cover; background: var(--ojsl-wash);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 8px 18px -12px rgba(0, 0, 0, .45);
}
.ojsl-cover-made {
	--ojsl-c: var(--ojsl-accent);
	position: relative; overflow: hidden; container-type: inline-size;
	display: flex; flex-direction: column; padding: 9% 10% 10%;
	color: #fff; background-color: var(--ojsl-c);
	line-height: 1.15;
}
.ojsl-shade-1 { --ojsl-c: color-mix(in srgb, var(--ojsl-accent) 78%, #000); }
.ojsl-shade-2 { --ojsl-c: color-mix(in srgb, var(--ojsl-accent) 80%, var(--ojsl-turmeric)); }
.ojsl-shade-3 { --ojsl-c: color-mix(in srgb, var(--ojsl-accent) 84%, #fff); }
/* Pulli kolam: the dot grid drawn before a kolam, fading up from the foot of the cover. */
.ojsl-kolam .ojsl-cover-made::after {
	content: ""; position: absolute; inset: 30% 0 0 38%; pointer-events: none;
	background-image: radial-gradient(circle, rgba(255, 255, 255, .55) 1.3px, transparent 1.9px);
	background-size: 14px 14px; background-position: right 7px bottom 7px;
	-webkit-mask-image: radial-gradient(circle at 100% 100%, #000 20%, transparent 78%);
	mask-image: radial-gradient(circle at 100% 100%, #000 20%, transparent 78%);
}
.ojsl-cover-journal { position: relative; z-index: 1; font-size: max(.72rem, 7.5cqi); font-weight: 600; opacity: .92; }
.ojsl-cover-vol { position: relative; z-index: 1; margin-top: auto; display: flex; flex-direction: column; }
.ojsl-cover-vol-label { font-size: max(.7rem, 7cqi); opacity: .85; }
.ojsl-cover-vol-num { font-size: 34cqi; font-weight: 700; letter-spacing: -.02em; line-height: .95; font-variant-numeric: lining-nums tabular-nums; }
.ojsl-cover-no { position: relative; z-index: 1; margin-top: .25em; font-size: max(.8rem, 9cqi); font-weight: 600; }
.ojsl-cover-year { position: relative; z-index: 1; margin-top: .9em; font-size: max(.68rem, 6.5cqi); opacity: .9; }

/* ------------------------------------------------------------------
 * Issues: grid and rows
 * ---------------------------------------------------------------- */
.ojsl-issue-grid {
	display: grid; gap: 2em 1.5em;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr));
}
.ojsl-issue-grid[style*="--ojsl-cols"] { grid-template-columns: repeat(var(--ojsl-cols), minmax(0, 1fr)); }
.ojsl-issue-grid .ojsl-issue { display: flex; flex-direction: column; gap: .8em; }
.ojsl-issue-grid .ojsl-issue-body { display: flex; flex-direction: column; gap: .2em; }
.ojsl-issue-ident { margin: 0; font-size: 1em; line-height: 1.35; }
.ojsl-issue-ident a { text-decoration: none; }
.ojsl-issue-ident a:hover { text-decoration: underline; text-underline-offset: .2em; }
.ojsl-issue-title { color: var(--ojsl-muted); font-size: .92em; }
.ojsl-issue-meta { display: flex; flex-wrap: wrap; gap: .1em 1em; color: var(--ojsl-muted); font-size: .86em; font-variant-numeric: tabular-nums; }
.ojsl-issue-desc { margin-top: .4em; max-width: 68ch; }
.ojsl-issue.is-current .ojsl-cover-img,
.ojsl-issue.is-current .ojsl-cover-made { outline: 3px solid var(--ojsl-turmeric); outline-offset: 3px; }

.ojsl-issue-rows .ojsl-issue {
	display: grid; grid-template-columns: 6.5rem 1fr; gap: 1.25em; align-items: start;
	padding: 1.25em 0; border-bottom: 1px solid var(--ojsl-line);
}
.ojsl-issue-rows .ojsl-issue:first-child { padding-top: 0; }
.ojsl-issue-rows .ojsl-issue-body { display: flex; flex-direction: column; gap: .3em; align-items: flex-start; }
.ojsl-issue-rows .ojsl-issue-ident { font-size: 1.15em; }
.ojsl-issue-rows .ojsl-issue:not(:has(.ojsl-cover)) { grid-template-columns: 1fr; }

.ojsl-badge {
	display: inline-block; width: fit-content; padding: .1em .55em; border-radius: 99px;
	font-size: .75em; font-weight: 600; line-height: 1.5;
	color: color-mix(in srgb, var(--ojsl-turmeric) 70%, #000);
	background: color-mix(in srgb, var(--ojsl-turmeric) 16%, transparent);
}
.ojsl-badge--upcoming { color: var(--ojsl-accent); background: var(--ojsl-wash); }

.ojsl-button,
.ojsl-search-btn {
	display: inline-block; margin-top: .6em; padding: .45em 1em; border: 0; border-radius: var(--ojsl-radius);
	background: var(--ojsl-accent); color: #fff !important; font: inherit; font-size: .9em; font-weight: 600;
	line-height: 1.3; text-decoration: none; cursor: pointer;
}
.ojsl-button:hover,
.ojsl-search-btn:hover { background: color-mix(in srgb, var(--ojsl-accent) 85%, #000); }

/* Archive: issues by year */
.ojsl-archive { border-top: 1px solid var(--ojsl-line); }
.ojsl-archive-item {
	display: flex; flex-wrap: wrap; align-items: baseline; gap: .2em 1em;
	padding: .6em 0; border-bottom: 1px solid var(--ojsl-line);
}
.ojsl-archive-link { font-weight: 600; text-decoration: none; }
.ojsl-archive-link:hover { text-decoration: underline; text-underline-offset: .2em; }
.ojsl-archive-title { flex: 1 1 14rem; }
.ojsl-archive-count { margin-left: auto; color: var(--ojsl-muted); font-size: .88em; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------
 * Tables
 * ---------------------------------------------------------------- */
.ojsl-table-wrap { position: relative; overflow-x: auto; }
.ojsl-table { width: 100%; border-collapse: collapse; font-size: .95em; }
.ojsl-table th,
.ojsl-table td { padding: .65em .75em .65em 0; border-bottom: 1px solid var(--ojsl-line); text-align: left; vertical-align: top; }
.ojsl-table thead th { color: var(--ojsl-muted); font-size: .85em; font-weight: 600; border-bottom-width: 2px; }
.ojsl-table .ojsl-nowrap { white-space: nowrap; }
.ojsl-table .ojsl-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ojsl-table-group th { padding-top: 1.3em; font-size: 1em; color: inherit; }
.ojsl-table .ojsl-title-link { font-weight: 600; text-decoration: none; }
.ojsl-table .ojsl-title-link:hover { text-decoration: underline; }
.ojsl-table .ojsl-galleys { margin: 0; flex-wrap: nowrap; }

/* ------------------------------------------------------------------
 * Articles: table of contents and list
 * ---------------------------------------------------------------- */
.ojsl-entries { border-top: 1px solid var(--ojsl-line); }
.ojsl-entries > .ojsl-entry {
	display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 1.5em;
	padding: 1em 0; border-bottom: 1px solid var(--ojsl-line);
}
ol.ojsl-entries { counter-reset: ojsl; }
ol.ojsl-entries > .ojsl-entry { counter-increment: ojsl; grid-template-columns: 2.2em minmax(0, 1fr) auto; }
ol.ojsl-entries > .ojsl-entry::before { content: counter(ojsl); color: var(--ojsl-muted); font-variant-numeric: tabular-nums; padding-top: .1em; }
.ojsl-entry-main { display: flex; flex-direction: column; gap: .3em; min-width: 0; }
.ojsl-entries--toc .ojsl-entry-main { gap: .15em; }
.ojsl-entries--toc > .ojsl-entry { padding: .85em 0; }
.ojsl-title { margin: 0; font-size: 1.05em; font-weight: 600; line-height: 1.45; }
.ojsl-title-link { text-decoration: none; }
.ojsl-title-link:hover { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.ojsl-subtitle { font-size: .95em; }
.ojsl-alt-title { color: var(--ojsl-muted); font-size: .93em; line-height: 1.45; }
.ojsl-authors { color: var(--ojsl-muted); font-size: .93em; }
.ojsl-authors--full { display: flex; flex-direction: column; gap: .15em; color: inherit; }
.ojsl-author-name { font-weight: 500; }
.ojsl-affiliation { display: block; color: var(--ojsl-muted); font-size: .9em; }
.ojsl-orcid {
	display: inline-flex; align-items: center; justify-content: center; width: 1.15em; height: 1.15em;
	margin-left: .2em; border-radius: 50%; background: #a6ce39; color: #fff !important;
	font-size: .7em; font-weight: 700; text-decoration: none; vertical-align: .1em;
}
.ojsl-entry-pages {
	padding-top: .15em; color: var(--ojsl-muted); font-size: .9em;
	font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right;
}
.ojsl-facts { display: flex; flex-wrap: wrap; gap: .15em 1.25em; margin: 0; font-size: .86em; }
.ojsl-fact { display: flex; gap: .4em; }
.ojsl-fact dt { color: var(--ojsl-muted); }
.ojsl-fact dd { margin: 0; font-variant-numeric: tabular-nums; }
.ojsl-fact a { text-underline-offset: .15em; }

.ojsl-galleys { display: flex; flex-wrap: wrap; gap: .4em; margin-top: .3em; }
.ojsl-galley {
	display: inline-flex; align-items: center; gap: .3em; padding: .12em .6em .12em .45em;
	border: 1px solid color-mix(in srgb, var(--ojsl-accent) 45%, transparent); border-radius: var(--ojsl-radius);
	color: var(--ojsl-accent) !important; font-size: .82em; font-weight: 600; line-height: 1.5;
	text-decoration: none; white-space: nowrap;
}
.ojsl-galley:hover { background: var(--ojsl-accent); border-color: var(--ojsl-accent); color: #fff !important; }
.ojsl-galley-icon { width: 1em; height: 1em; flex: none; }

.ojsl-excerpt { max-width: 72ch; font-size: .95em; line-height: 1.7; }
.ojsl-abstract { max-width: 72ch; font-size: .95em; }
.ojsl-abstract > summary {
	display: inline-flex; align-items: center; gap: .4em; width: fit-content;
	color: var(--ojsl-accent); font-size: .9em; font-weight: 600; cursor: pointer; list-style: none;
}
.ojsl-abstract > summary::-webkit-details-marker { display: none; }
.ojsl-abstract > summary::before {
	content: ""; width: .5em; height: .5em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: rotate(-45deg); transition: transform .15s ease;
}
.ojsl-abstract[open] > summary::before { transform: rotate(45deg); }
.ojsl-abstract-head { font-weight: 600; font-size: .9em; color: var(--ojsl-muted); }
.ojsl-abstract-text { margin-top: .5em; padding-left: .9em; border-left: 2px solid var(--ojsl-wash); line-height: 1.75; }
.ojsl-abstract-text p + p { margin-top: .6em; }
.ojsl-keywords { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3em; font-size: .85em; }
.ojsl-keywords-head { color: var(--ojsl-muted); margin-right: .2em; }
.ojsl-keyword { padding: .05em .5em; border-radius: 99px; background: var(--ojsl-wash); }

/* Compact list (sidebars, "latest articles") */
.ojsl-compact > li { padding: .55em 0; border-bottom: 1px solid var(--ojsl-line); }
.ojsl-compact > li:last-child { border-bottom: 0; }
ol.ojsl-compact { list-style: decimal; padding-left: 1.4em; }
.ojsl-compact .ojsl-title-link { font-weight: 600; line-height: 1.45; }
.ojsl-compact-authors { display: block; color: var(--ojsl-muted); font-size: .88em; }

/* Cards */
.ojsl-cards {
	display: grid; gap: 1.25em;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}
.ojsl-cards[style*="--ojsl-cols"] { grid-template-columns: repeat(var(--ojsl-cols), minmax(0, 1fr)); }
.ojsl-card {
	display: flex; flex-direction: column; overflow: hidden;
	border: 1px solid var(--ojsl-line); border-radius: var(--ojsl-radius);
}
.ojsl-card-cover img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.ojsl-card-body { display: flex; flex-direction: column; gap: .45em; flex: 1; padding: 1em 1.1em 1.1em; }
.ojsl-card-section { color: var(--ojsl-accent); font-size: .8em; font-weight: 600; }
.ojsl-card .ojsl-excerpt { font-size: .9em; line-height: 1.6; }
.ojsl-card-foot { display: flex; flex-direction: column; gap: .4em; margin-top: auto; padding-top: .6em; }

/* ------------------------------------------------------------------
 * Issue on top of its table of contents
 * ---------------------------------------------------------------- */
.ojsl-issue-head {
	display: grid; grid-template-columns: 8.5rem 1fr; gap: 1.5em; align-items: start;
	margin-bottom: 1.8em; padding-bottom: 1.5em; border-bottom: 2px solid var(--ojsl-line);
}
.ojsl-issue-head-text { display: flex; flex-direction: column; gap: .35em; align-items: flex-start; }
.ojsl-issue-head-ident { margin: 0; font-size: 1.5em; line-height: 1.25; }
.ojsl-issue-head-title { font-size: 1.05em; }

/* ------------------------------------------------------------------
 * Search and pages
 * ---------------------------------------------------------------- */
.ojsl-search { display: flex; flex-wrap: wrap; align-items: stretch; gap: .5em; margin: 0 0 1.25em; }
.ojsl-search label { display: flex; }
.ojsl-search-text { flex: 1 1 100%; }
.ojsl-search label:not(.ojsl-search-text) { flex: 1 1 12rem; }
.ojsl-search input[type="search"],
.ojsl-search select {
	width: 100%; min-height: 2.5em; padding: .4em .7em; border: 1px solid var(--ojsl-line);
	border-radius: var(--ojsl-radius); background: transparent; color: inherit; font: inherit; font-size: .95em;
}
.ojsl-search-btn { margin-top: 0; }
.ojsl-search-clear { align-self: center; font-size: .9em; }
.ojsl-results { margin: -.4em 0 1em; color: var(--ojsl-muted); font-size: .9em; }

.ojsl-pages { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5em 1em; margin-top: 1.6em; }
.ojsl-page-link {
	padding: .4em .9em; border: 1px solid var(--ojsl-line); border-radius: var(--ojsl-radius);
	text-decoration: none; font-size: .92em;
}
.ojsl-page-link:hover { border-color: var(--ojsl-accent); color: var(--ojsl-accent); }
.ojsl-page-now { color: var(--ojsl-muted); font-size: .9em; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------
 * Small screens
 * ---------------------------------------------------------------- */
@media (max-width: 600px) {
	.ojsl-issue-grid,
	.ojsl-issue-grid[style*="--ojsl-cols"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5em 1em; }
	.ojsl-cards[style*="--ojsl-cols"] { grid-template-columns: minmax(0, 1fr); }
	.ojsl-issue-rows .ojsl-issue { grid-template-columns: 4.5rem 1fr; gap: 1em; }
	.ojsl-issue-head { grid-template-columns: 5.5rem 1fr; gap: 1em; }
	.ojsl-issue-head-ident { font-size: 1.25em; }
	.ojsl-entries > .ojsl-entry { grid-template-columns: minmax(0, 1fr); }
	ol.ojsl-entries > .ojsl-entry { grid-template-columns: 2em minmax(0, 1fr); }
	.ojsl-entry-pages { grid-column: -2 / -1; text-align: left; padding-top: .3em; }
	.ojsl-search label:not(.ojsl-search-text) { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.ojsl-abstract > summary::before { transition: none; }
}
@media print {
	.ojsl-search, .ojsl-pages, .ojsl-galleys { display: none; }
}
