/* ============================================================
 * Telas em código: home, grade de posts, prévia de torneios,
 * arquivos/categorias. Paleta herdada dos templates originais.
 * ============================================================ */

:root {
	/* Mesma base do header e das páginas do plugin (--lz-bg): superfície única
	   em todo o site. Cards se separam por borda, não por cor de fundo. */
	--lz-page-bg: #0D0D11;
	--lz-card-body: #0D0D11;
	--lz-hairline: rgba(255, 255, 255, 0.07);
	--lz-line: #252557;
	--lz-accent: #6161B1;
	--lz-muted: #D1D5DC;
}

body.lz-theme-screen {
	background: var(--lz-page-bg);
	color: var(--lz-muted);
	font-family: var(--lz-font);
}

.lz-main {
	display: block;
}

.lz-container {
	max-width: var(--lz-container);
	margin: 0 auto;
	padding: 0 24px;
}

/* ---------- Banner ---------- */

.lz-banner {
	max-width: var(--lz-container);
	margin: 24px auto;
	padding: 0 24px;
}

.lz-banner__pic,
.lz-banner img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 12px;
}

/* Reserva a altura pela proporção da arte que realmente vai aparecer.
   Sem isto o mobile herda a proporção do desktop e a página salta quando a
   imagem carrega (principal fonte de CLS da home). */
@media (max-width: 767px) {
	.lz-banner__pic[style*="--lz-banner-ratio-mobile"] img {
		aspect-ratio: var(--lz-banner-ratio-mobile);
		height: auto;
	}
}

/* ---------- Prévia de torneios ---------- */

.lz-tourn {
	padding: 24px 0 8px;
}

.lz-tourn__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.lz-tourn__title {
	margin: 0;
	font-size: 24px;
	line-height: 32px;
	font-weight: 600;
	color: #FFF;
}

.lz-tourn__sub {
	margin: 6px 0 0;
	font-size: 15px;
	color: var(--lz-muted);
}

/* Tabela no mesmo padrão da tela /torneios-hoje/ do plugin (lz-table--mixed).
   Escopada em .lz-tourn para não interferir nas páginas do próprio plugin. */

.lz-tourn .lz-table {
	background: #0E0E1E;
	border: 1px solid rgba(255, 255, 255, 0.07);
	border-radius: 8px;
	overflow: hidden;
}

.lz-tourn .lz-table__head,
.lz-tourn .lz-table__row {
	display: grid;
	grid-template-columns: minmax(0, 2.2fr) 1fr 0.7fr 0.9fr 0.9fr;
	gap: 12px;
	padding: 12px 16px;
	align-items: center;
}

.lz-tourn .lz-table__head {
	background: #14142A;
	border-bottom: 1px solid rgba(255, 255, 255, 0.14);
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #9FA3C8;
}

.lz-tourn .lz-table__row {
	border-bottom: 1px solid rgba(255, 255, 255, 0.07);
	font-size: 14px;
	transition: background 0.15s ease;
}

.lz-tourn .lz-table__row:last-child {
	border-bottom: 0;
}

.lz-tourn .lz-table__row:nth-child(odd) {
	background: rgba(255, 255, 255, 0.015);
}

.lz-tourn .lz-table__row:hover {
	background: rgba(82, 90, 242, 0.08);
}

.lz-tourn .lz-td {
	font-variant-numeric: tabular-nums;
}

.lz-tourn .lz-td--name {
	color: #FFF;
	font-weight: 500;
	overflow-wrap: anywhere;
}

/* Linha clicável: mesmo visual, com a seta de affordance do plugin. */
.lz-theme-screen .lz-tourn .lz-table__row--link {
	color: inherit;
	cursor: pointer;
	position: relative;
}

/* O link ocupa a linha inteira sem envolvê-la no HTML: assim a linha continua
   sendo uma `row` na árvore de acessibilidade e o link continua sendo link. */
.lz-theme-screen .lz-tourn .lz-table__link,
.lz-theme-screen .lz-tourn .lz-table__link:visited {
	color: inherit;
	text-decoration: none;
}

.lz-theme-screen .lz-tourn .lz-table__link::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.lz-theme-screen .lz-tourn .lz-table__link:focus-visible {
	outline: 2px solid #7582F9;
	outline-offset: 2px;
}

.lz-theme-screen .lz-tourn .lz-table__row--link:hover .lz-td--name {
	color: #7582F9;
}

.lz-theme-screen .lz-tourn .lz-table__row--link::after {
	content: "\2192";
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%) translateX(-4px);
	color: #7582F9;
	font-size: 14px;
	opacity: 0;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.lz-theme-screen .lz-tourn .lz-table__row--link:hover::after {
	opacity: 1;
	transform: translateY(-50%) translateX(0);
}

/* Sala como bloco de cor sólida preenchendo a linha (igual ao app). */
.lz-tourn .lz-td--room {
	align-self: stretch;
	display: flex;
	align-items: center;
	margin: -12px 0;
	padding: 12px 14px;
	background: var(--lz-room-color, transparent);
	color: rgba(255, 255, 255, 0.94);
	font-size: 13px;
	font-weight: 600;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.lz-tourn .lz-td--room:not([style*="--lz-room-color"]) {
	color: #9FA3C8;
}

.lz-theme-screen .lz-tourn__more {
	display: inline-block;
	margin: 14px 0 0;
	color: var(--lz-muted);
	text-decoration: none;
	font-size: 15px;
}

.lz-theme-screen .lz-tourn__more:hover {
	color: #FFF;
}

@media (max-width: 767px) {
	.lz-tourn .lz-table__head {
		display: none;
	}

	.lz-tourn .lz-table__row,
	.lz-tourn .lz-table--mixed .lz-table__row {
		grid-template-columns: 1fr 1fr;
		gap: 6px 12px;
		padding: 14px 16px;
	}

	.lz-tourn .lz-td--name {
		grid-column: 1 / -1;
	}

	.lz-tourn .lz-td::before {
		content: attr(data-label) " ";
		display: block;
		font-size: 11px;
		text-transform: uppercase;
		letter-spacing: 0.05em;
		color: #9FA3C8;
		margin-bottom: 2px;
	}

	.lz-tourn .lz-td--name::before {
		display: none;
	}

	/* Sala no mobile: chip compacto, sem margens negativas (igual ao plugin). */
	.lz-tourn .lz-td--room {
		grid-column: 1 / -1;
		margin: 0;
		align-self: start;
		display: inline-flex;
		width: fit-content;
		padding: 4px 12px;
		border-radius: 6px;
	}

	.lz-tourn .lz-td--room::before {
		display: none;
	}
}

/* ---------- Chips de categoria ---------- */

.lz-chips {
	display: flex;
	gap: 28px;
	overflow-x: auto;
	scrollbar-width: none;
	border-bottom: 1px solid var(--lz-line);
	margin: 32px 0 24px;
}

.lz-chips::-webkit-scrollbar {
	display: none;
}

.lz-theme-screen .lz-chip {
	flex: 0 0 auto;
	padding: 0 0 12px;
	color: var(--lz-muted);
	font-size: 16px;
	text-decoration: none;
	border-bottom: 2px solid transparent;
	white-space: nowrap;
}

.lz-theme-screen .lz-chip:hover {
	color: #FFF;
}

.lz-theme-screen .lz-chip.is-active {
	color: #FFF;
	border-bottom-color: var(--lz-accent);
}

/* ---------- Grade de posts ---------- */

.lz-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

@media (max-width: 1024px) {
	.lz-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.lz-grid {
		grid-template-columns: 1fr;
	}
}

.lz-card {
	display: flex;
	flex-direction: column;
	border-radius: 12px;
	overflow: hidden;
	background: var(--lz-page-bg);
	border: 1px solid var(--lz-hairline);
}

/* Estado inicial (e aba "Ver Todos"): os extras de cada categoria ficam de
   fora da grade. Sem JS, o visitante vê os mais recentes e os chips levam
   para as páginas de categoria. */
.lz-grid.is-recent .lz-card:not([data-recent="1"]) {
	display: none;
}

.lz-card[hidden] {
	display: none;
}

.lz-card__thumb {
	line-height: 0;
}

.lz-card__img {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	object-position: center;
}

.lz-card__img--empty {
	background: linear-gradient(115deg, #1B1943, #252557);
}

.lz-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px;
	background: var(--lz-card-body);
	flex: 1;
}

.lz-card__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 14px;
	color: var(--lz-muted);
}

.lz-card__dot {
	opacity: .6;
}

.lz-theme-screen .lz-card__cat {
	margin-left: auto;
	padding: 4px 10px;
	border: 1px solid var(--lz-line);
	border-radius: 99px;
	font-size: 13px;
	color: var(--lz-muted);
	text-decoration: none;
	position: relative;
	z-index: 1;
}

.lz-theme-screen .lz-card__cat:hover {
	color: #FFF;
	border-color: var(--lz-accent);
}

.lz-card__author {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--lz-muted);
}

.lz-card__avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
}

.lz-card__title {
	margin: 0;
	font-size: 20px;
	line-height: 26px;
	font-weight: 500;
}

.lz-theme-screen .lz-card__title a {
	color: #FFF;
	text-decoration: none;
}

/* Link do título cobre o card inteiro (o chip de categoria fica por cima). */
.lz-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.lz-card {
	position: relative;
}

.lz-theme-screen .lz-card__title a:hover {
	color: var(--lz-grad-b);
}

.lz-latest {
	padding: 8px 0 56px;
}

.lz-latest__more {
	margin: 32px 0 0;
	text-align: center;
}

/* ---------- Arquivos ---------- */

.lz-archive__head {
	padding: 40px 0 8px;
}

.lz-breadcrumb {
	display: flex;
	gap: 8px;
	font-size: 14px;
	color: var(--lz-muted);
	margin-bottom: 12px;
}

.lz-theme-screen .lz-breadcrumb a {
	color: var(--lz-muted);
	text-decoration: none;
}

.lz-theme-screen .lz-breadcrumb a:hover {
	color: #FFF;
}

.lz-archive__title {
	margin: 0;
	font-size: 36px;
	line-height: 44px;
	font-weight: 600;
	color: #FFF;
}

.lz-archive__desc {
	margin: 12px 0 0;
	max-width: 720px;
	font-size: 16px;
	line-height: 26px;
}

.lz-archive__count {
	margin: 8px 0 0;
	font-size: 14px;
	color: var(--lz-muted);
}

.lz-empty {
	padding: 48px 0;
	text-align: center;
}

.lz-theme-screen .pagination,
.lz-theme-screen .navigation.pagination {
	margin-top: 40px;
}

.lz-theme-screen .nav-links {
	display: flex;
	justify-content: center;
	gap: 8px;
	flex-wrap: wrap;
}

.lz-theme-screen .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--lz-line);
	border-radius: 8px;
	color: var(--lz-muted);
	text-decoration: none;
}

.lz-theme-screen .page-numbers:hover {
	color: #FFF;
	border-color: var(--lz-accent);
}

.lz-theme-screen .page-numbers.current {
	background: linear-gradient(115deg, var(--lz-grad-a) 0%, var(--lz-grad-b) 100%);
	border-color: transparent;
	color: #FFF;
}

@media (max-width: 767px) {
	.lz-archive__title {
		font-size: 28px;
		line-height: 36px;
	}

	.lz-card__img {
		aspect-ratio: 16 / 9;
	}
}

/* ============================================================
 * Artigo — leitura longa em fundo escuro.
 *
 * Três decisões governam esta tela:
 * 1. Medida: o texto para em ~68 caracteres por linha, mesmo com a coluna
 *    larga. Tabelas, imagens e citações usam a coluna inteira.
 * 2. Escala: 18px/1.78. Texto claro sobre fundo escuro "engorda" — corpo
 *    pequeno com entrelinha curta é o que tornava a leitura cansativa.
 * 3. Ritmo: o espaço acima de um título é ~3x o espaço entre parágrafos,
 *    então a hierarquia se lê antes de ser lida.
 * ============================================================ */

.lz-article {
	--lz-measure: 660px;
	--lz-ink: #E8E8F2;
	--lz-ink-strong: #FFFFFF;
	--lz-ink-quiet: #9A9AB4;
	--lz-rail: rgba(255, 255, 255, .12);
	padding: 40px 0 72px;
}

/* O artigo usa um container mais estreito que o resto do site: assim a coluna
   de 75% já nasce na medida de leitura, sem sobra à direita do texto. */
.lz-single .lz-container {
	max-width: 1000px;
}

/* Cabeçalho */

.lz-article__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	font-size: 13px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--lz-ink-quiet);
}

.lz-article__label {
	color: var(--lz-ink-quiet);
}

.lz-article__dot {
	opacity: .5;
}

.lz-article__title {
	max-width: 20ch;
	margin: 16px 0 0;
	font-size: clamp(30px, 3.4vw, 42px);
	line-height: 1.16;
	letter-spacing: -.02em;
	font-weight: 600;
	color: var(--lz-ink-strong);
	text-wrap: balance;
}

.lz-rule {
	border: 0;
	border-top: 1px solid var(--lz-rail);
	margin: 32px 0;
}

.lz-article__cover {
	text-align: center;
	line-height: 0;
}

.lz-article__cover-img {
	width: 100%;
	height: 420px;
	object-fit: cover;
	object-position: center;
	border-radius: 14px;
}

.lz-article__cover--natural {
	margin: 0 auto;
}

.lz-article__cover--natural .lz-article__cover-img {
	height: auto;
	max-height: 460px;
	object-fit: contain;
}

/* Duas colunas: trilha 25% / texto 75%. */

.lz-article__body {
	display: grid;
	grid-template-columns: 25% 1fr;
	gap: 48px;
	align-items: start;
}

.lz-article__body--full {
	grid-template-columns: 1fr;
}

.lz-article__aside {
	position: sticky;
	top: 32px;
}

/* Trilha de seções */

.lz-toc {
	margin: 0;
}

.lz-toc__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	cursor: pointer;
	list-style: none;
	padding: 0 0 14px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--lz-ink-quiet);
}

.lz-toc__header::-webkit-details-marker {
	display: none;
}

.lz-toc__chevron {
	flex: 0 0 auto;
	transition: transform .2s ease;
}

.lz-toc[open] .lz-toc__chevron {
	transform: rotate(180deg);
}

/* A linha da esquerda preenche conforme a leitura avança: é o mesmo gesto
   de acompanhar uma grade ao vivo, aplicado ao texto. */
.lz-toc__list {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
	border-left: 1px solid var(--lz-rail);
}

.lz-toc__list::before {
	content: "";
	position: absolute;
	left: -1px;
	top: 0;
	width: 2px;
	height: calc(clamp(0, var(--lz-progress, 0), 1) * 100%);
	background: linear-gradient(180deg, var(--lz-grad-a), var(--lz-grad-b));
	border-radius: 2px;
}

.lz-theme-screen .lz-toc__item a {
	display: block;
	padding: 9px 0 9px 18px;
	margin-left: -1px;
	border-left: 2px solid transparent;
	font-size: 14px;
	line-height: 1.45;
	color: var(--lz-ink-quiet);
	text-decoration: none;
	transition: color .15s ease, border-color .15s ease;
}

.lz-theme-screen .lz-toc__item--h3 a {
	padding-left: 32px;
	font-size: 13px;
}

.lz-theme-screen .lz-toc__item a:hover {
	color: var(--lz-ink-strong);
}

.lz-theme-screen .lz-toc__item.is-active a {
	color: var(--lz-ink-strong);
	border-left-color: var(--lz-grad-b);
}

/* Corpo do texto */

.lz-article__content {
	color: var(--lz-ink);
	font-size: 18px;
	line-height: 1.78;
	letter-spacing: .003em;
}

.lz-article__content > * {
	max-width: var(--lz-measure);
	margin: 0 0 1.35em;
}

/* Elementos largos respiram na coluna inteira; só o texto fica na medida. */
.lz-article__content > figure,
.lz-article__content > table,
.lz-article__content > .wp-block-table,
.lz-article__content > .wp-block-image,
.lz-article__content > .wp-block-embed,
.lz-article__content > iframe {
	max-width: 100%;
}

/* Abertura: um degrau acima do corpo, para dar entrada no texto. */
.lz-article__content > p:first-of-type {
	font-size: 20px;
	line-height: 1.7;
	color: #F4F4FA;
}

.lz-article__content h2 {
	margin: 2.6em 0 .5em;
	font-size: clamp(22px, 2.2vw, 27px);
	line-height: 1.25;
	letter-spacing: -.01em;
	font-weight: 600;
	color: var(--lz-ink-strong);
	scroll-margin-top: 28px;
	text-wrap: balance;
}

.lz-article__content h3 {
	margin: 2em 0 .4em;
	font-size: 20px;
	line-height: 1.35;
	font-weight: 600;
	color: var(--lz-ink-strong);
	scroll-margin-top: 28px;
}

.lz-article__content h4 {
	margin: 1.8em 0 .4em;
	font-size: 17px;
	font-weight: 600;
	color: var(--lz-ink-strong);
}

.lz-article__content > :first-child {
	margin-top: 0;
}

.lz-theme-screen .lz-article__content a {
	color: #AAACFF;
	text-decoration: underline;
	text-underline-offset: .18em;
	text-decoration-thickness: 1px;
	text-decoration-color: rgba(170, 172, 255, .45);
	transition: color .15s ease, text-decoration-color .15s ease;
}

.lz-theme-screen .lz-article__content a:hover {
	color: #C7C9FF;
	text-decoration-color: currentColor;
}

.lz-article__content ul,
.lz-article__content ol {
	padding-left: 1.3em;
}

.lz-article__content li {
	margin: .5em 0;
	padding-left: .2em;
}

.lz-article__content li::marker {
	color: var(--lz-accent);
}

.lz-article__content strong {
	color: var(--lz-ink-strong);
	font-weight: 600;
}

.lz-article__content img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
}

.lz-article__content figure {
	margin: 2em 0;
}

.lz-article__content figcaption {
	margin-top: 10px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--lz-ink-quiet);
}

.lz-article__content blockquote {
	margin: 2em 0;
	padding: 2px 0 2px 24px;
	border-left: 2px solid var(--lz-grad-b);
	font-size: 19px;
	line-height: 1.7;
	color: var(--lz-ink-strong);
}

.lz-article__content blockquote p:last-child {
	margin-bottom: 0;
}

.lz-article__content table {
	width: 100%;
	border-collapse: collapse;
	display: block;
	overflow-x: auto;
	font-size: 15px;
	font-variant-numeric: tabular-nums;
}

.lz-article__content th,
.lz-article__content td {
	border-bottom: 1px solid var(--lz-rail);
	padding: 12px 14px;
	text-align: left;
}

.lz-article__content th {
	font-size: 12px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--lz-ink-quiet);
	font-weight: 600;
}

.lz-article__content code {
	background: rgba(255, 255, 255, .07);
	padding: 2px 6px;
	border-radius: 4px;
	font-size: .9em;
}

/* Autor */

.lz-authorbox {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	max-width: var(--lz-measure);
}

.lz-authorbox__avatar {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	flex: 0 0 auto;
}

.lz-authorbox__name {
	margin: 0 0 6px;
	font-size: 17px;
	font-weight: 600;
	color: var(--lz-ink-strong);
}

.lz-authorbox__bio {
	margin: 0;
	font-size: 15px;
	line-height: 1.65;
	color: var(--lz-ink-quiet);
}

/* Relacionados */

.lz-related__title {
	margin: 0 0 24px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--lz-ink-quiet);
}

@media (prefers-reduced-motion: reduce) {
	.lz-toc__chevron,
	.lz-theme-screen .lz-toc__item a,
	.lz-theme-screen .lz-article__content a {
		transition: none;
	}
}

@media (max-width: 1024px) {
	.lz-article__body {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.lz-article__aside {
		position: static;
	}

	.lz-toc {
		border: 1px solid var(--lz-rail);
		border-radius: 12px;
		padding: 16px 18px;
	}

	.lz-toc__header {
		padding-bottom: 0;
	}

	.lz-toc[open] .lz-toc__header {
		padding-bottom: 14px;
	}
}

@media (max-width: 767px) {
	.lz-article {
		padding: 28px 0 56px;
	}

	.lz-article__title {
		max-width: none;
	}

	/* Duas linhas de meta: o ponto solto no fim da primeira linha vira ruído. */
	.lz-article__dot {
		display: none;
	}

	.lz-article__meta {
		gap: 4px 14px;
	}

	.lz-article__cover-img {
		height: 240px;
	}

	.lz-article__content {
		font-size: 17px;
		line-height: 1.75;
	}

	.lz-article__content > p:first-of-type {
		font-size: 18px;
	}

	.lz-authorbox {
		gap: 14px;
	}

	.lz-authorbox__avatar {
		width: 56px;
		height: 56px;
	}
}

/* ---------- Cabeçalho editável das páginas do tema ---------- */

.lz-page__head {
	padding: 40px 0 8px;
}

.lz-page__title,
.lz-page__head h1 {
	margin: 0 0 12px;
	font-size: 36px;
	line-height: 44px;
	font-weight: 600;
	color: #FFF;
}

.lz-page__head p {
	margin: 0 0 12px;
	max-width: 720px;
	font-size: 16px;
	line-height: 26px;
	color: var(--lz-muted);
}

@media (max-width: 767px) {
	.lz-page__title,
	.lz-page__head h1 {
		font-size: 28px;
		line-height: 36px;
	}
}
