/*
 * plugins/themes/pmlaMaterialChild/styles/article.css
 *
 * Pagina de artigo da Policy Making.
 * CSS puro: o tema pai compila Tailwind em styles/dist/output.css, entao
 * classes utilitarias novas nao existiriam no bundle.
 */

:root {
	--pm-rule: #e2e8f0;
	--pm-muted: #64748b;
	--pm-strong: #0f172a;
	--pm-accent: #1e3a8a;
	--pm-chip-bg: #f1f5f9;
	--pm-surface: #ffffff;
	--pm-section-title: 1.375rem;
}

.dark .pm-article,
.dark .pm-article * {
	--pm-rule: #1e293b;
	--pm-muted: #94a3b8;
	--pm-strong: #e2e8f0;
	--pm-accent: #93c5fd;
	--pm-chip-bg: #1e293b;
	--pm-surface: #0f172a;
}

/* ---------- Cabecalho ---------- */

.pm-article .pm-head {
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--pm-rule);
}

.pm-article .pm-cover {
	float: right;
	width: 121px;
	margin: 0 0 1rem 1.5rem;
}

.pm-article .pm-cover img {
	width: 100%;
	height: auto;
	margin: 0;
	border: 1px solid var(--pm-rule);
	object-fit: contain;
}

.pm-article .pm-title {
	margin: 0 0 0.25rem;
	font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.125rem);
	line-height: 1.2;
	font-weight: 700;
	color: var(--pm-strong);
}

.pm-article .pm-subtitle {
	margin: 0 0 0.5rem;
	font-size: 1.125rem;
	font-weight: 400;
	line-height: 1.35;
	color: var(--pm-muted);
}

/* ---------- Autores ---------- */

.pm-article .pm-authors {
	margin-top: 0.75rem;
}

.pm-article .pm-authors-inline {
	margin: 0;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--pm-strong);
}

.pm-article .pm-author-name {
	font-weight: 600;
}

/* Icone do ORCID ao lado do nome, na linha compacta */
.pm-article .pm-orcid-inline {
	display: inline-block;
	margin-left: 0.25em;
	line-height: 1;
	vertical-align: -0.1em;
}

.pm-article .pm-orcid-inline svg,
.pm-article .pm-orcid-inline img {
	display: inline-block;
	width: 0.95em;
	height: 0.95em;
}

.pm-article .pm-authors-detail {
	margin-top: 0.25rem;
}

.pm-article .pm-authors-detail > summary {
	display: inline-block;
	cursor: pointer;
	font-size: 0.8125rem;
	color: var(--pm-accent);
	list-style: none;
}

.pm-article .pm-authors-detail > summary::-webkit-details-marker {
	display: none;
}

.pm-article .pm-authors-detail > summary::after {
	content: " \25BE";
}

.pm-article .pm-authors-detail[open] > summary::after {
	content: " \25B4";
}

.pm-article .pm-authors-list {
	margin: 0.5rem 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.875rem;
	color: var(--pm-muted);
}

.pm-article .pm-authors-list > li {
	padding: 0.375rem 0;
}

/* O travessao pertence a afiliacao, nao ao nome: preso ao nome ele sobrava
   solto nos autores sem afiliacao ("Amanda Oliveira —"). */
.pm-article .pm-authors-list .pm-author-aff::before {
	content: " — ";
	font-weight: 400;
	color: var(--pm-muted);
}

/* O preflight do Tailwind (tema pai) declara `svg { display: block }`, entao o
   selo do ROR ocupava uma linha inteira, dobrando a altura da afiliacao.
   Volta a ser inline, na altura da propria linha de texto. */
.pm-article .pm-author-ror {
	display: inline-block;
	margin-left: 0.3em;
	line-height: 1;
	vertical-align: -0.15em;
}

.pm-article .pm-author-ror svg {
	display: inline-block;
	width: auto;
	height: 1em;
}

.pm-article .pm-author-role::before {
	content: " · ";
}

/* So o icone: um separador antes dele ficaria sobrando. */
.pm-article .pm-author-orcid {
	margin-left: 0.35em;
}

.pm-article .pm-author-orcid svg,
.pm-article .pm-author-orcid img {
	display: inline-block;
	width: 1em;
	height: 1em;
	vertical-align: -0.125em;
}

/* ---------- Linha de metadados ---------- */

.pm-article .pm-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem 0.75rem;
	margin: 0.75rem 0 0;
	font-size: 0.8125rem;
	color: var(--pm-muted);
}

.pm-article .pm-meta-item + .pm-meta-item::before {
	content: "|";
	margin-right: 0.75rem;
	color: var(--pm-rule);
}

.pm-article .pm-meta a {
	color: var(--pm-accent);
	word-break: break-word;
}

/* ---------- Barra de acoes (PDF) ---------- */

.pm-article .pm-actions {
	margin-top: 1.25rem;
}

.pm-article .pm-actions-label {
	margin: 0 0 0.5rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--pm-muted);
}

.pm-article .pm-actions-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pm-article .pm-actions-list > li {
	margin: 0;
}

/* ---------- Resumo ---------- */

.pm-article .pm-abstract {
	margin-top: 1.75rem;
	padding-left: 1.25rem;
	border-left: 3px solid var(--pm-accent);
}

.pm-article .pm-abstract-title {
	margin: 0 0 0.625rem;
	font-size: var(--pm-section-title);
	font-weight: 700;
	line-height: 1.25;
	color: var(--pm-strong);
}

.pm-article .pm-abstract-body {
	font-size: 1rem;
	line-height: 1.65;
	color: var(--pm-strong);
}

.pm-article .pm-abstract-body p {
	margin: 0 0 0.875rem;
}

.pm-article .pm-abstract-body p:last-child {
	margin-bottom: 0;
}

/* ---------- Palavras-chave ---------- */

.pm-article .pm-keywords {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem;
	margin-top: 1.5rem;
}

.pm-article .pm-keywords-label {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--pm-muted);
}

.pm-article .pm-keywords-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pm-article .pm-keywords-list > li {
	margin: 0;
	padding: 0.125rem 0.5rem;
	font-size: 0.8125rem;
	color: var(--pm-muted);
	background: var(--pm-chip-bg);
	border-radius: 9999px;
}

/* A citacao formatada (plugin citationstylelanguage) termina com a URL do
   artigo, longa e sem ponto de quebra natural. */
.pm-article .citation_display .csl-entry,
.pm-article .citation_display .csl-entry a {
	overflow-wrap: anywhere;
}

/* ---------- Referencias em accordion ---------- */

.pm-article .pm-references > summary {
	cursor: pointer;
	font-size: 0.8125rem;
	color: var(--pm-accent);
}

.pm-article .pm-references[open] > summary {
	margin-bottom: 0.5rem;
}

/* ---------- Demais blocos ---------- */

.pm-article .pm-rest {
	margin-top: 0.5rem;
}

@media (max-width: 640px) {
	.pm-article .pm-cover {
		float: none;
		width: 97px;
		margin: 0 0 0.75rem 0;
	}

	.pm-article .pm-abstract {
		padding-left: 0.875rem;
	}
}

/* ---------- Uso do artigo: aneis de acessos e downloads ---------- */

/* Titulos de secao: mesma fonte, mesmo corpo, mesmo peso.
 *
 * "Como Citar" vem do plugin citationstylelanguage e "Artigos Semelhantes" do
 * recommendBySimilarity — nenhum dos dois passa pelo nosso template.
 *
 * O !important aqui nao e preguica: policymaking.css declara
 * `h1,h2,...,h6 { font-family: 'Open Sans' !important; font-weight: 600 !important }`
 * para o site inteiro. Sem !important nenhum peso nosso vale, e "Estatisticas",
 * por ser um <dt> e nao um heading, escapava daquela regra e saia em Roboto. */
.pm-article .pm-abstract-title,
.pm-article .pm-stats-title,
.pm-article .citation_display > .label,
#articlesBySimilarityList > .label {
	font-family: 'Open Sans', sans-serif !important;
	font-size: var(--pm-section-title) !important;
	font-weight: 700 !important;
	line-height: 1.25;
}

.pm-article .pm-stats-title,
.pm-article .citation_display > .label {
	margin: 0 0 1rem;
	color: var(--pm-strong);
}

.pm-article .pm-usage {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem;
	max-width: 30rem;
}

.pm-article .pm-usage-card {
	margin: 0;
	text-align: center;
}

.pm-article .pm-usage-label {
	margin: 0 0 0.75rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--pm-muted);
}

.pm-article .pm-usage-ring {
	position: relative;
	width: 100%;
	max-width: 160px;
	margin: 0 auto;
	aspect-ratio: 1 / 1;
}

.pm-article .pm-usage-chart {
	width: 100%;
	height: 100%;
}

/* O total vive sobre o anel, nao dentro do canvas, para herdar a tipografia
   da pagina e continuar selecionavel. */
.pm-article .pm-usage-center {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.pm-article .pm-usage-total {
	font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
	font-weight: 700;
	line-height: 1;
	color: var(--pm-strong);
	font-variant-numeric: tabular-nums;
}

.pm-article .pm-usage-empty .pm-usage-total {
	color: var(--pm-muted);
	font-weight: 600;
}

.pm-article .pm-usage-period {
	margin: 0.625rem 0 0;
	font-size: 0.75rem;
	line-height: 1.3;
	color: var(--pm-muted);
}

.pm-article .pm-usage-period:empty {
	display: none;
}

@media (max-width: 420px) {
	.pm-article .pm-usage {
		gap: 1rem;
	}

	.pm-article .pm-usage-ring {
		max-width: 124px;
	}
}
