/*
Theme Name: Be karūnos
Theme URI: https://www.menasbekarunos.lt/
Author: menasbekarunos.lt
Description: Greita, išskirtinė naujienų ir praktinių gidų tema svetainei „Apie viską be karūnos“. Veikia be įskiepių: SEO žymės, schema.org duomenys, nukreipimai, straipsnio turinys, susiję straipsniai, populiariausių sąrašas, tamsi tema ir mygtukas į viršų.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bekarunos
Tags: news, blog, two-columns, custom-logo, custom-menu, featured-images, translation-ready, accessibility-ready
*/

/* ==========================================================================
   1. Spalvos, šriftai, matmenys
   ========================================================================== */

:root {
	--paper: #f1f3ee;
	--paper-2: #e4e9e1;
	--surface: #fbfcfa;
	--ink: #17241e;
	--ink-2: #4a5a52;
	--line: #d2d9cf;
	--gold: #f0b429;
	--gold-ink: #7d5700;
	--marker: rgba(240, 180, 41, .72);
	--band: #17241e;
	--band-ink: #eef2ec;

	/* Temų spalvos (kategorijos). */
	--c0: #2c6a55;
	--c1: #3450b8;
	--c2: #a63d28;
	--c3: #74469a;
	--c4: #86610c;
	--c5: #1d6f80;

	--f-head: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Fira Sans", "Helvetica Neue", Arial, sans-serif;
	--f-body: Charter, "Bitstream Charter", "Sitka Text", Cambria, "Iowan Old Style", Georgia, serif;
	--f-ui: system-ui, -apple-system, "Segoe UI", "Fira Sans", Roboto, "Helvetica Neue", Arial, sans-serif;

	--r-l: 22px;
	--r-m: 14px;
	--r-s: 9px;
	--wrap: 1240px;
	--gutter: clamp(1rem, 3.5vw, 2.25rem);
	--header-h: 72px;
	color-scheme: light;
}

[data-theme="dark"] {
	--paper: #0f1713;
	--paper-2: #17221d;
	--surface: #1b2722;
	--ink: #e5ebe6;
	--ink-2: #a5b4ab;
	--line: #2b3a33;
	--gold-ink: #f0b429;
	--marker: rgba(240, 180, 41, .38);
	--band: #1b2722;
	--band-ink: #e5ebe6;
	--c0: #7fc4aa;
	--c1: #9db0f7;
	--c2: #f19a85;
	--c3: #c9a2ea;
	--c4: #e8be5e;
	--c5: #7ccad9;
	color-scheme: dark;
}

/* ==========================================================================
   2. Pagrindai
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--f-ui);
	font-size: 1rem;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; }
img { display: block; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: inherit; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--f-head);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -.018em;
	margin: 0;
	text-wrap: balance;
}

p { margin: 0; }

button { font: inherit; color: inherit; }

:focus-visible {
	outline: 3px solid var(--gold);
	outline-offset: 3px;
	border-radius: 4px;
}

::selection { background: var(--gold); color: #17241e; }

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	margin: 0;
	z-index: 1000;
	top: .75rem;
	left: .75rem;
	padding: .75rem 1rem;
	background: var(--ink);
	color: var(--paper);
	border-radius: var(--r-s);
	font-weight: 700;
	text-decoration: none;
}

.wrap {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.wrap-narrow {
	width: 100%;
	max-width: calc(760px + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

/* Žymeklis: auksinis brūkšnys po antrašte – „be karūnos“ auksas, naudojamas kasdien. */
.mark {
	background-image: linear-gradient(var(--marker), var(--marker));
	background-repeat: no-repeat;
	background-position: 0 88%;
	background-size: 0% .36em;
}

a:hover .mark,
a:focus-visible .mark { background-size: 100% .36em; }

/* ==========================================================================
   3. Mygtukai, žymės, meta
   ========================================================================== */

.btn {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	padding: .8rem 1.25rem;
	border-radius: var(--r-s);
	border: 2px solid var(--ink);
	background: var(--ink);
	color: var(--paper);
	font-family: var(--f-ui);
	font-weight: 700;
	font-size: .975rem;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.btn:hover { background: transparent; color: var(--ink); }

.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn .icon { width: 1.15em; height: 1.15em; }

.chip {
	--c: var(--c0);
	display: inline-flex;
	align-items: center;
	gap: .45em;
	padding: .26em .7em .26em .55em;
	border-radius: 999px;
	background: color-mix(in srgb, var(--c) 13%, transparent);
	color: var(--c);
	font-family: var(--f-ui);
	font-size: .8125rem;
	font-weight: 650;
	line-height: 1.25;
	text-decoration: none;
	white-space: nowrap;
}

.chip::before {
	content: "";
	width: .5em;
	height: .5em;
	border-radius: 2px;
	background: currentColor;
	transform: rotate(45deg);
	flex: none;
}

a.chip:hover { background: var(--c); color: var(--paper); }

.chip--lg { font-size: .95rem; padding: .45em .9em .45em .75em; }
.chip__count { opacity: .7; font-weight: 500; }

.chips {
	list-style: none;
	margin: 1.5rem 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}

.meta {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: .25rem 1rem;
	color: var(--ink-2);
	font-family: var(--f-ui);
	font-size: .8125rem;
	line-height: 1.4;
}

.meta li { display: inline-flex; align-items: center; gap: .35em; }
.meta .icon { width: 1.05em; height: 1.05em; }
.meta__author { color: var(--ink); font-weight: 650; }

/* ==========================================================================
   4. Antraštė
   ========================================================================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--paper) 92%, transparent);
	-webkit-backdrop-filter: saturate(1.4) blur(12px);
	backdrop-filter: saturate(1.4) blur(12px);
	border-bottom: 1px solid var(--line);
}

.admin-bar .site-header { top: 32px; }

@media (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
}

@media (max-width: 600px) {
	.admin-bar .site-header { top: 0; }
}

.site-header__row {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 1.75rem;
	min-height: var(--header-h);
}

.brand { margin: 0; font: inherit; line-height: 1; }

.brand-link {
	display: inline-flex;
	align-items: center;
	gap: .7rem;
	text-decoration: none;
	color: var(--ink);
}

.brand-mark { width: 44px; height: 44px; flex: none; }
.brand-logo { max-height: 48px; width: auto; }

.brand-text { display: flex; flex-direction: column; }

.brand-top {
	font-family: var(--f-ui);
	font-weight: 600;
	font-size: .78rem;
	color: var(--ink-2);
	letter-spacing: .01em;
	margin-bottom: .12rem;
}

.brand-main {
	font-family: var(--f-head);
	font-weight: 800;
	font-size: 1.4rem;
	letter-spacing: -.03em;
	line-height: 1;
	white-space: nowrap;
}

.primary-nav { min-width: 0; }

.nav-list {
	list-style: none;
	margin: 0;
	padding: .25rem 0;
	display: flex;
	gap: .25rem;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 2.5rem), transparent);
	mask-image: linear-gradient(90deg, #000 calc(100% - 2.5rem), transparent);
	padding-right: 2.5rem;
}

.nav-list::-webkit-scrollbar { display: none; }

.nav-list a {
	display: block;
	padding: .5rem .85rem;
	border-radius: 999px;
	font-weight: 600;
	font-size: .9375rem;
	text-decoration: none;
	white-space: nowrap;
	color: var(--ink);
}

.nav-list a:hover { background: var(--paper-2); }

.nav-list .current-menu-item > a,
.nav-list .current-cat > a,
.nav-list .current-post-ancestor > a,
.nav-list .current-menu-parent > a {
	background: var(--ink);
	color: var(--paper);
}

.header-actions { display: flex; align-items: center; gap: .5rem; }

.action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .45rem;
	height: 42px;
	min-width: 42px;
	padding: 0 .9rem;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: var(--surface);
	color: var(--ink);
	font-weight: 650;
	font-size: .9rem;
	text-decoration: none;
	cursor: pointer;
}

.action:hover { border-color: var(--ink); }
.action--icon { padding: 0; }
.action .icon { width: 20px; height: 20px; }

.action--random:hover .icon { transform: rotate(-18deg); }
.action--random .icon { transition: transform .25s ease; }

[data-theme-toggle] .icon-sun { display: none; }
[data-theme="dark"] [data-theme-toggle] .icon-sun { display: block; }
[data-theme="dark"] [data-theme-toggle] .icon-moon { display: none; }

.search-panel { border-top: 1px solid var(--line); padding-block: 1rem; }

.search-form { display: flex; gap: .5rem; max-width: 640px; }

.search-form__input {
	flex: 1;
	min-width: 0;
	height: 48px;
	padding: 0 1rem;
	border-radius: var(--r-s);
	border: 2px solid var(--line);
	background: var(--surface);
	color: var(--ink);
	font: inherit;
	font-size: 1rem;
}

.search-form__input:focus { border-color: var(--ink); outline: none; }

@media (max-width: 900px) {
	:root { --header-h: 60px; }

	.site-header__row {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas: "brand actions" "nav nav";
		gap: 0 .75rem;
	}

	.brand { grid-area: brand; }
	.header-actions { grid-area: actions; }
	.primary-nav { grid-area: nav; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); padding-bottom: .5rem; }
	.nav-list { padding-left: 0; }
	.nav-list a { padding: .4rem .75rem; font-size: .9rem; background: var(--paper-2); }
	.brand-mark { width: 38px; height: 38px; }
	.brand-main { font-size: 1.2rem; }
	.action__text { display: none; }
	.action--random { padding: 0; }
}

/* ==========================================================================
   5. Kortelės (bendros)
   ========================================================================== */

.card { position: relative; min-width: 0; }

.card__media {
	display: block;
	text-decoration: none;
	overflow: hidden;
	border-radius: var(--r-m);
	background: var(--paper-2);
	aspect-ratio: 16 / 10;
}

.card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.thumb-empty {
	--c: var(--c0);
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background:
		repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 9%, transparent) 0 10px, transparent 10px 22px),
		color-mix(in srgb, var(--c) 16%, var(--paper));
	color: var(--c);
	font-family: var(--f-head);
	font-weight: 800;
	font-size: clamp(2rem, 6vw, 5rem);
	line-height: 1;
}

.card__body { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; }

.card__title { font-size: 1.25rem; }

.card__title a { text-decoration: none; color: var(--ink); }

.card__excerpt {
	font-family: var(--f-body);
	color: var(--ink-2);
	font-size: 1rem;
	line-height: 1.55;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ==========================================================================
   6. Pagrindinis puslapis
   ========================================================================== */

.section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: .5rem 1.5rem;
	margin-bottom: 1.5rem;
}

.section-title { font-size: clamp(1.55rem, 1.1rem + 1.3vw, 2.1rem); letter-spacing: -.025em; }
.section-title a { text-decoration: none; }

.section-title--topic { display: flex; align-items: center; gap: .6rem; }

.section-title--topic::before {
	content: "";
	width: .62em;
	height: .62em;
	border-radius: 3px;
	transform: rotate(45deg);
	background: var(--c);
	flex: none;
}

.section-note { color: var(--ink-2); font-size: .95rem; }

.section-link {
	font-weight: 650;
	font-size: .95rem;
	color: var(--c, var(--ink));
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: .25em;
}

/* Hero */
.hero {
	display: grid;
	grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
	gap: clamp(1.5rem, 4vw, 3.5rem);
	padding-block: clamp(1.25rem, 3vw, 2.5rem) clamp(2.5rem, 5vw, 4rem);
}

.card--lead .card__media {
	aspect-ratio: 16 / 10;
	border-radius: var(--r-l);
}

.card--lead .card__body {
	position: relative;
	margin-top: -4.5rem;
	margin-right: clamp(0px, 14%, 7rem);
	padding: 1.35rem 1.75rem 0 0;
	background: var(--paper);
	border-top-right-radius: var(--r-l);
	gap: .8rem;
}

.lead__title {
	font-size: clamp(2rem, 1.15rem + 2.9vw, 3.6rem);
	line-height: 1.03;
	letter-spacing: -.035em;
}

.card--lead .card__excerpt {
	font-size: 1.15rem;
	-webkit-line-clamp: 4;
	max-width: 60ch;
}

/* Vienintelis automatinis judesys: auksinis žymeklis perbraukia pagrindinę antraštę. */
.lead__title .mark {
	background-size: 100% .34em;
	animation: bk-sweep 1s .3s cubic-bezier(.2, .75, .25, 1) both;
}

@keyframes bk-sweep {
	from { background-size: 0% .34em; }
	to { background-size: 100% .34em; }
}

.hero__side { display: flex; flex-direction: column; }

.hero__side-title {
	font-size: 1.05rem;
	letter-spacing: -.01em;
	padding-bottom: .85rem;
	border-bottom: 3px solid var(--ink);
}

.card--side {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 96px;
	gap: 1rem;
	padding-block: 1.05rem;
	border-bottom: 1px solid var(--line);
}

.card--side .card__media { order: 2; aspect-ratio: 1; border-radius: var(--r-s); }
.card--side .card__body { order: 1; gap: .4rem; }
.card--side .card__title { font-size: 1.05rem; line-height: 1.22; letter-spacing: -.01em; }
.card--side .chip { font-size: .75rem; }

.hero__random {
	display: flex;
	align-items: center;
	gap: .75rem;
	margin-top: auto;
	padding: 1rem 0 0;
	font-weight: 650;
	font-size: .95rem;
	text-decoration: none;
	color: var(--ink);
}

.hero__random .icon {
	width: 40px;
	height: 40px;
	padding: 9px;
	border-radius: 12px;
	background: var(--gold);
	color: #17241e;
	flex: none;
}

.hero__random:hover span { text-decoration: underline; text-underline-offset: .2em; }

/* Temos */
.topics { padding-block: 1rem clamp(3rem, 6vw, 4.5rem); }

.topics__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: .75rem;
}

.topic {
	display: flex;
	flex-direction: column;
	border-radius: var(--r-m);
	background: color-mix(in srgb, var(--c) 9%, var(--surface));
	border: 1px solid color-mix(in srgb, var(--c) 22%, transparent);
	overflow: hidden;
}

.topic__link {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: .75rem;
	padding: 1rem 1.1rem .5rem;
	text-decoration: none;
	color: var(--c);
}

.topic__name {
	font-family: var(--f-head);
	font-weight: 800;
	font-size: 1.2rem;
	letter-spacing: -.02em;
	line-height: 1.15;
}

.topic__count { font-size: .8rem; font-weight: 600; white-space: nowrap; opacity: .85; }

.topic__link:hover .topic__name { text-decoration: underline; text-underline-offset: .18em; }

.topic__latest {
	margin: 0 1.1rem 1rem;
	font-family: var(--f-body);
	font-size: .95rem;
	line-height: 1.4;
	color: var(--ink-2);
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.topic__latest:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 640px) {
	.topics__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
	.topic__link { flex-direction: column; align-items: flex-start; gap: .2rem; padding: .85rem .9rem; }
	.topic__name { font-size: 1.05rem; }
	.topic__latest { display: none; }
}

@media (min-width: 900px) {
	.topic:first-child { grid-column: span 2; }
	.topic:first-child .topic__name { font-size: 1.6rem; }
}

/* Temų juostos */
.rail { padding-block: 0 clamp(3rem, 6vw, 4.5rem); }

.rail .section-head {
	padding-top: 1.25rem;
	border-top: 3px solid var(--c);
}

.rail__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	gap: clamp(1.5rem, 3vw, 2.75rem);
	align-items: start;
}

.rail--flip .rail__main { order: 2; }

.card--feature { display: flex; flex-direction: column; gap: 1rem; }
.rail .card--feature .card__title { font-size: clamp(1.4rem, 1rem + 1vw, 1.9rem); }

.rail__list { display: flex; flex-direction: column; }

.card--compact {
	display: grid;
	grid-template-columns: 112px minmax(0, 1fr);
	gap: 1rem;
	padding-block: 1rem;
	border-bottom: 1px solid var(--line);
}

.card--compact:first-child { padding-top: 0; }
.card--compact .card__media { aspect-ratio: 1; border-radius: var(--r-s); }
.card--compact .card__title { font-size: 1.1rem; line-height: 1.22; letter-spacing: -.01em; }
.card--compact .thumb-empty { font-size: 2.2rem; }

/* Skaitomiausi */
.popular {
	background: var(--band);
	color: var(--band-ink);
	padding-block: clamp(2.5rem, 5vw, 4rem);
	margin-bottom: clamp(3rem, 6vw, 4.5rem);
}

.popular .section-note { color: color-mix(in srgb, var(--band-ink) 70%, transparent); }

.popular__list {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: pop;
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 1.5rem;
}

.popular__item {
	counter-increment: pop;
	display: flex;
	flex-direction: column;
	gap: .6rem;
	padding-top: 1rem;
	border-top: 1px solid color-mix(in srgb, var(--band-ink) 22%, transparent);
}

.popular__item::before {
	content: counter(pop);
	font-family: var(--f-head);
	font-weight: 800;
	font-size: 3.6rem;
	line-height: .9;
	letter-spacing: -.04em;
	color: var(--gold);
}

.popular__title { font-size: 1.1rem; line-height: 1.25; letter-spacing: -.01em; }
.popular__title a { color: var(--band-ink); text-decoration: none; }
.popular .meta { color: color-mix(in srgb, var(--band-ink) 70%, transparent); }

@media (max-width: 1000px) {
	.popular__list {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: minmax(230px, 70%);
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		padding-bottom: .5rem;
		scrollbar-width: thin;
	}

	.popular__item { scroll-snap-align: start; }
}

/* Daugiau straipsnių / archyvai */
.stream { padding-bottom: clamp(3rem, 6vw, 4.5rem); }

.stream__list { display: flex; flex-direction: column; }

.card--row {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	gap: clamp(1rem, 3vw, 2rem);
	padding-block: 1.5rem;
	border-top: 1px solid var(--line);
}

.card--row:first-child { border-top: 0; padding-top: 0; }
.card--row .card__title { font-size: clamp(1.25rem, 1rem + .7vw, 1.6rem); }
.card--row .card__excerpt { max-width: 68ch; -webkit-line-clamp: 2; }

.stream__more { margin-top: 1.5rem; }

@media (max-width: 1000px) {
	.hero { grid-template-columns: minmax(0, 1fr); }
	.card--lead .card__body { margin-right: 0; margin-top: -3rem; padding-right: 1.25rem; }
	.rail__grid { grid-template-columns: minmax(0, 1fr); }
	.rail--flip .rail__main { order: 0; }
}

@media (max-width: 640px) {
	.card--row { grid-template-columns: 104px minmax(0, 1fr); gap: 1rem; padding-block: 1.1rem; }
	.card--row .card__media { aspect-ratio: 1; border-radius: var(--r-s); }
	.card--row .card__excerpt { display: none; }
	.card--row .card__title { font-size: 1.1rem; line-height: 1.22; }
	.card--row .thumb-empty { font-size: 2.2rem; }
	.card--lead .card__body { margin-top: -2rem; padding: 1rem 1rem 0 0; }
	.card--lead .card__media { border-radius: var(--r-m); }
	.card--lead .card__excerpt { font-size: 1.05rem; }
	.card--compact { grid-template-columns: 88px minmax(0, 1fr); }
}

/* ==========================================================================
   7. Archyvo antraštė
   ========================================================================== */

.archive-head { padding-block: 1.5rem 2rem; }

.archive-head--topic .archive-head__title { color: var(--c); }

.archive-head__title {
	font-size: clamp(2.2rem, 1.3rem + 3vw, 3.8rem);
	letter-spacing: -.035em;
	line-height: 1.02;
	margin-top: 1rem;
}

.archive-head__desc {
	margin-top: 1rem;
	max-width: 62ch;
	font-family: var(--f-body);
	font-size: 1.15rem;
	line-height: 1.6;
	color: var(--ink-2);
}

.archive-head__desc p + p { margin-top: .8em; }

.archive-head__count { margin-top: .9rem; font-weight: 650; color: var(--ink-2); font-size: .95rem; }

.archive-head__children { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }

.archive-list { padding-bottom: clamp(3rem, 6vw, 5rem); }

.archive-list .stream__list { border-top: 3px solid var(--c, var(--ink)); padding-top: 1.5rem; }

.empty { padding-block: 1rem 3rem; }
.empty__text { font-family: var(--f-body); font-size: 1.15rem; }

/* Naršymo kelias */
.crumbs ol {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: .2rem;
	font-size: .85rem;
	color: var(--ink-2);
}

.crumbs li { display: inline-flex; align-items: center; gap: .2rem; }

.crumbs li + li::before {
	content: "";
	width: .35em;
	height: .35em;
	border-top: 1.5px solid currentColor;
	border-right: 1.5px solid currentColor;
	transform: rotate(45deg);
	margin-inline: .35rem .3rem;
	opacity: .6;
}

.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

.crumbs [aria-current] {
	max-width: 32ch;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Puslapiavimas */
.pager { margin-top: 2.5rem; }

.pager .nav-links { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }

.pager .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 .9rem;
	border-radius: var(--r-s);
	border: 1px solid var(--line);
	background: var(--surface);
	font-weight: 650;
	text-decoration: none;
}

.pager a.page-numbers:hover { border-color: var(--ink); }
.pager .page-numbers.current { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pager .page-numbers.dots { border: 0; background: none; }

/* ==========================================================================
   8. Straipsnis
   ========================================================================== */

.post-head { padding-block: 1.5rem 2rem; display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }

.post-head .crumbs { margin-bottom: .5rem; }

.post-title {
	font-size: clamp(2rem, 1.2rem + 3vw, 3.4rem);
	line-height: 1.05;
	letter-spacing: -.035em;
}

.post-lead {
	font-family: var(--f-body);
	font-size: clamp(1.15rem, 1rem + .5vw, 1.35rem);
	line-height: 1.55;
	color: var(--ink-2);
	max-width: 62ch;
}

.meta--post {
	font-size: .875rem;
	padding-top: 1rem;
	border-top: 1px solid var(--line);
	width: 100%;
	gap: .35rem 1.25rem;
}

.post-hero { margin: 0 auto 2.5rem; }

.post-hero img,
.post-hero .thumb-empty {
	width: 100%;
	max-height: 620px;
	object-fit: cover;
	border-radius: var(--r-l);
}

.post-hero figcaption { margin-top: .6rem; font-size: .85rem; color: var(--ink-2); }

.post-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 720px) minmax(0, 1fr);
	gap: 2.5rem;
	align-items: start;
}

.post-layout .entry-content { grid-column: 2; }
.post-layout__toc { grid-column: 1; grid-row: 1; position: sticky; top: calc(var(--header-h) + 1.5rem); justify-self: end; width: 100%; max-width: 260px; }
.post-layout__share { grid-column: 3; grid-row: 1; position: sticky; top: calc(var(--header-h) + 1.5rem); }

.admin-bar .post-layout__toc,
.admin-bar .post-layout__share { top: calc(var(--header-h) + 32px + 1.5rem); }

/* Turinys (TOC) */
.toc__box { border-radius: var(--r-m); }

.toc__title {
	display: flex;
	align-items: center;
	gap: .5rem;
	font-weight: 750;
	font-size: .95rem;
	cursor: pointer;
	list-style: none;
	padding-bottom: .75rem;
}

.toc__title::-webkit-details-marker { display: none; }
.toc__title .icon { color: var(--gold-ink); }

.toc__list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-left: 2px solid var(--line);
	max-height: calc(100vh - var(--header-h) - 8rem);
	overflow-y: auto;
}

.toc__item a {
	display: block;
	padding: .38rem 0 .38rem .9rem;
	margin-left: -2px;
	border-left: 2px solid transparent;
	font-size: .875rem;
	line-height: 1.35;
	color: var(--ink-2);
	text-decoration: none;
}

.toc__item--h3 a { padding-left: 1.75rem; font-size: .83rem; }
.toc__item a:hover { color: var(--ink); }

.toc__item a[aria-current="true"] {
	color: var(--ink);
	font-weight: 650;
	border-left-color: var(--gold);
}

/* Dalijimasis */
.share__list { list-style: none; margin: 0; padding: 0; display: flex; gap: .5rem; }
.share--rail .share__list { flex-direction: column; }

.share__btn {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--line);
	background: var(--surface);
	color: var(--ink);
	cursor: pointer;
	padding: 0;
}

.share__btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.share__btn.is-done { background: var(--gold); border-color: var(--gold); color: #17241e; }

.share--row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem 1.5rem;
	border-radius: var(--r-m);
	background: var(--paper-2);
}

.share__label { font-weight: 700; }

@media (max-width: 1180px) {
	.post-layout,
	.post-layout.has-toc { grid-template-columns: minmax(0, 720px); justify-content: center; gap: 0; }
	.post-layout .entry-content,
	.post-layout__toc { grid-column: 1; grid-row: auto; }
	.post-layout__toc { position: static; max-width: none; margin-bottom: 2rem; }
	.post-layout__share { display: none; }
	.toc__box { background: var(--paper-2); padding: 1rem 1.25rem; }
	.toc__title { padding-bottom: 0; }
	.toc__title::after {
		content: "";
		width: .5em;
		height: .5em;
		margin-left: auto;
		border-right: 2px solid currentColor;
		border-bottom: 2px solid currentColor;
		transform: rotate(45deg) translateY(-25%);
	}
	.toc__box[open] .toc__title::after { transform: rotate(-135deg) translateX(-25%); }
	.toc__box[open] .toc__title { padding-bottom: .75rem; }
	.toc__list { max-height: none; }
}

/* Straipsnio tekstas */
.entry-content {
	font-family: var(--f-body);
	font-size: clamp(1.075rem, 1rem + .25vw, 1.1875rem);
	line-height: 1.75;
	color: var(--ink);
	overflow-wrap: break-word;
}

.entry-content > * { margin-block: 0 1.3em; }
.entry-content > *:last-child { margin-bottom: 0; }

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	scroll-margin-top: calc(var(--header-h) + 1.5rem);
	margin-top: 2.1em;
	margin-bottom: .6em;
}

.entry-content h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.95rem); letter-spacing: -.025em; }
.entry-content h3 { font-size: clamp(1.25rem, 1.1rem + .5vw, 1.45rem); letter-spacing: -.015em; }
.entry-content h4 { font-size: 1.15rem; }

.entry-content a {
	color: var(--ink);
	text-decoration-line: underline;
	text-decoration-color: var(--gold);
	text-decoration-thickness: .14em;
	text-underline-offset: .18em;
}

.entry-content a:hover { background: var(--marker); text-decoration-color: var(--ink); }

.entry-content strong { font-weight: 700; }

.entry-content ul,
.entry-content ol { padding-left: 1.35em; }

.entry-content li { margin-bottom: .45em; padding-left: .2em; }
.entry-content li::marker { color: var(--gold-ink); font-weight: 700; }

.entry-content blockquote {
	margin-inline: 0;
	padding: .25em 0 .25em 1.25em;
	border-left: 4px solid var(--gold);
	font-size: 1.15em;
	line-height: 1.6;
}

.entry-content blockquote cite { display: block; font-size: .8em; color: var(--ink-2); margin-top: .5em; font-style: normal; }

.entry-content figure { margin-inline: 0; }
.entry-content img { border-radius: var(--r-m); height: auto; }

.entry-content figcaption,
.entry-content .wp-element-caption {
	font-family: var(--f-ui);
	font-size: .85rem;
	color: var(--ink-2);
	margin-top: .55rem;
	text-align: left;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-family: var(--f-ui);
	font-size: .95rem;
	line-height: 1.45;
}

.entry-content .wp-block-table { overflow-x: auto; }

.entry-content th,
.entry-content td { padding: .7rem .85rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry-content thead th { background: var(--paper-2); font-weight: 700; border-bottom: 2px solid var(--ink); }

.entry-content code,
.entry-content kbd { font-size: .88em; background: var(--paper-2); padding: .1em .35em; border-radius: 5px; }

.entry-content pre { overflow-x: auto; padding: 1rem 1.25rem; border-radius: var(--r-m); background: var(--paper-2); font-size: .9rem; line-height: 1.55; }
.entry-content pre code { background: none; padding: 0; }

.entry-content hr { border: 0; height: 3px; width: 4rem; background: var(--gold); margin-block: 2.5em; }

.entry-content .alignleft { float: left; margin: .3em 1.5em 1em 0; max-width: 50%; }
.entry-content .alignright { float: right; margin: .3em 0 1em 1.5em; max-width: 50%; }
.entry-content .aligncenter { margin-inline: auto; }
.entry-content .alignwide,
.entry-content .alignfull { max-width: 100%; }

.entry-content iframe,
.entry-content embed,
.entry-content video { max-width: 100%; }

.entry-content .wp-block-button__link { border-radius: var(--r-s); text-decoration: none; background: var(--ink); color: var(--paper); font-family: var(--f-ui); font-weight: 700; }

.entry-content::after { content: ""; display: table; clear: both; }

/* Taip pat skaitykite */
.entry-content .inline-read { margin-block: 2em; }

.entry-content .inline-read__link {
	display: grid;
	grid-template-columns: 80px minmax(0, 1fr);
	gap: 1rem;
	align-items: center;
	padding: .9rem 1.25rem .9rem .9rem;
	border-radius: var(--r-m);
	background: color-mix(in srgb, var(--gold) 18%, var(--surface));
	border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent);
	text-decoration: none;
	color: var(--ink);
}

.entry-content .inline-read__link:hover { background: color-mix(in srgb, var(--gold) 30%, var(--surface)); }

.inline-read__thumb { display: block; text-decoration: none; aspect-ratio: 1; border-radius: var(--r-s); overflow: hidden; }
.inline-read__thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.inline-read__thumb .thumb-empty { font-size: 1.8rem; }
.inline-read__text { display: flex; flex-direction: column; gap: .2rem; }
.inline-read__label { font-family: var(--f-ui); font-size: .8rem; font-weight: 700; color: var(--gold-ink); }
.inline-read__title { font-family: var(--f-head); font-weight: 800; font-size: 1.1rem; line-height: 1.25; letter-spacing: -.01em; }

/* Straipsnio pabaiga */
.post-foot { display: flex; flex-direction: column; gap: 1.75rem; padding-block: 2.5rem 3rem; }

.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }

.tags a {
	display: inline-block;
	padding: .35rem .75rem;
	border-radius: 999px;
	border: 1px solid var(--line);
	font-size: .875rem;
	font-weight: 600;
	color: var(--ink-2);
	text-decoration: none;
}

.tags a:hover { border-color: var(--ink); color: var(--ink); }

.author-box { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 1.1rem; align-items: start; }
.author-box__avatar { border-radius: 50%; width: 64px; height: 64px; }
.author-box__name { font-weight: 800; font-family: var(--f-head); font-size: 1.1rem; }
.author-box__bio { font-family: var(--f-body); color: var(--ink-2); margin-block: .35rem .5rem; line-height: 1.55; }
.author-box__link { font-weight: 650; font-size: .9rem; }

/* Skaitykite toliau */
.next { padding-block: clamp(2rem, 4vw, 3rem) clamp(2.5rem, 5vw, 3.5rem); }
.next .section-title { margin-bottom: 1.5rem; }

.card--next {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: clamp(1.25rem, 4vw, 3rem);
	align-items: center;
}

.card--next .card__media { border-radius: var(--r-l); aspect-ratio: 3 / 2; }
.next__title { font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.5rem); letter-spacing: -.03em; line-height: 1.06; }
.card--next .card__excerpt { font-size: 1.1rem; -webkit-line-clamp: 4; }

.related { padding-block: 0 clamp(3rem, 6vw, 4.5rem); }

.related__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 2rem 1.75rem;
}

@media (max-width: 900px) {
	.related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
	.related__grid { grid-template-columns: minmax(0, 1fr); }
}

.related .card--feature .card__title { font-size: 1.2rem; line-height: 1.22; }

.post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	padding-bottom: clamp(3rem, 6vw, 4.5rem);
}

.post-nav__link {
	display: flex;
	flex-direction: column;
	gap: .35rem;
	padding: 1.25rem 1.4rem;
	border-radius: var(--r-m);
	border: 1px solid var(--line);
	text-decoration: none;
}

.post-nav__link:hover { border-color: var(--ink); }
.post-nav__link--next { grid-column: 2; text-align: right; align-items: flex-end; }
.post-nav__label { font-size: .8rem; font-weight: 650; color: var(--ink-2); }
.post-nav__title { font-family: var(--f-head); font-weight: 800; font-size: 1.05rem; line-height: 1.25; }

@media (max-width: 760px) {
	.card--next { grid-template-columns: minmax(0, 1fr); }
	.post-nav { grid-template-columns: minmax(0, 1fr); }
	.post-nav__link--next { grid-column: 1; }
	.share--row { padding: 1rem; }
}

/* Kitas straipsnis – iššokanti kortelė */
.slide-in {
	position: fixed;
	left: 1rem;
	bottom: 1rem;
	z-index: 40;
	width: min(340px, calc(100% - 6rem));
	display: flex;
	align-items: stretch;
	border-radius: var(--r-m);
	background: var(--surface);
	border: 1px solid var(--line);
	box-shadow: 0 14px 40px -12px rgba(23, 36, 30, .35);
	transform: translateY(calc(100% + 2rem));
	opacity: 0;
	visibility: hidden;
	transition: transform .35s cubic-bezier(.2, .75, .25, 1), opacity .25s ease, visibility 0s .35s;
}

.slide-in.is-open { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }

.slide-in__link {
	flex: 1;
	min-width: 0;
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	gap: .85rem;
	align-items: center;
	padding: .7rem;
	text-decoration: none;
	color: var(--ink);
}

.slide-in__thumb { display: block; aspect-ratio: 1; border-radius: var(--r-s); overflow: hidden; }
.slide-in__thumb img { width: 100%; height: 100%; object-fit: cover; }
.slide-in__thumb .thumb-empty { font-size: 1.6rem; }
.slide-in__text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.slide-in__label { font-size: .75rem; font-weight: 700; color: var(--gold-ink); }

.slide-in__title {
	font-family: var(--f-head);
	font-weight: 800;
	font-size: .98rem;
	line-height: 1.25;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.slide-in__link:hover .slide-in__title { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }

.slide-in__close {
	flex: none;
	width: 44px;
	border: 0;
	border-left: 1px solid var(--line);
	background: none;
	cursor: pointer;
	color: var(--ink-2);
	display: grid;
	place-items: center;
	border-radius: 0 var(--r-m) var(--r-m) 0;
}

.slide-in__close:hover { color: var(--ink); background: var(--paper-2); }
.slide-in__close .icon { width: 18px; height: 18px; }

/* ==========================================================================
   9. Puslapis, 404
   ========================================================================== */

.page-article .entry-content { padding-bottom: 4rem; }

.not-found__head { padding-block: clamp(2.5rem, 7vw, 5rem) 3rem; max-width: 860px; }
.not-found__mark { width: 84px; height: 84px; margin-bottom: 1.5rem; }
.not-found__title { font-size: clamp(2.2rem, 1.3rem + 3.5vw, 4rem); letter-spacing: -.035em; }
.not-found__text { margin-top: 1rem; font-family: var(--f-body); font-size: 1.2rem; line-height: 1.6; color: var(--ink-2); max-width: 56ch; }
.not-found__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* ==========================================================================
   10. Poraštė
   ========================================================================== */

.site-footer {
	margin-top: 1rem;
	background: var(--paper-2);
	border-top: 1px solid var(--line);
	font-size: .95rem;
}

.site-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr));
	gap: 2.5rem;
	padding-block: clamp(2.5rem, 5vw, 4rem);
}

.site-footer__brand {
	display: flex;
	align-items: center;
	gap: .7rem;
	font-family: var(--f-head);
	font-weight: 800;
	font-size: 1.2rem;
	letter-spacing: -.02em;
}

.site-footer__brand .brand-mark { width: 40px; height: 40px; }
.site-footer__text { margin-top: 1rem; font-family: var(--f-body); color: var(--ink-2); line-height: 1.6; max-width: 38ch; }

.site-footer__social { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.site-footer__social a { display: inline-flex; align-items: center; gap: .4rem; font-weight: 650; text-decoration: none; }
.site-footer__social a:hover { text-decoration: underline; }

.site-footer__title { font-size: 1rem; letter-spacing: 0; margin-bottom: 1rem; }

.site-footer__topics,
.site-footer__latest,
.site-footer__menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }

.site-footer__topics li { display: flex; justify-content: space-between; gap: .5rem; }
.site-footer__topics a { color: var(--ink); text-decoration: none; font-weight: 600; }
.site-footer__topics a:hover { color: var(--c); text-decoration: underline; }
.site-footer__topics .count { color: var(--ink-2); font-size: .85rem; }

.site-footer__latest a,
.site-footer__menu a { color: var(--ink-2); text-decoration: none; line-height: 1.4; }

.site-footer__latest a:hover,
.site-footer__menu a:hover { color: var(--ink); text-decoration: underline; }

.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: .5rem 2rem;
	padding-block: 1.25rem 1.5rem;
	border-top: 1px solid var(--line);
	font-size: .85rem;
	color: var(--ink-2);
}

.site-footer__bottom a { color: var(--ink); font-weight: 600; }

@media (max-width: 960px) {
	.site-footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.site-footer__about { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
	.site-footer__grid { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   11. Į viršų (su skaitymo progreso žiedu)
   ========================================================================== */

.to-top {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 45;
	width: 56px;
	height: 56px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--ink);
	color: var(--paper);
	text-decoration: none;
	box-shadow: 0 10px 28px -10px rgba(23, 36, 30, .55);
	transition: opacity .2s ease, transform .2s ease, visibility 0s;
}

.to-top > * { grid-area: 1 / 1; }
.to-top .icon { width: 22px; height: 22px; }

.to-top__ring { width: 56px; height: 56px; transform: rotate(-90deg); }
.to-top__ring circle { fill: none; stroke-width: 3; }
.to-top__track { stroke: color-mix(in srgb, var(--paper) 18%, transparent); }
.to-top__fill { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 144.5; stroke-dashoffset: 144.5; }

.js .to-top:not(.is-visible) {
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: opacity .2s ease, transform .2s ease, visibility 0s .2s;
}

.to-top:hover { background: var(--gold); color: #17241e; }
.to-top:hover .to-top__fill { stroke: #17241e; }

/* ==========================================================================
   12. Judesio mažinimas, spausdinimas
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}

@media print {
	.site-header,
	.site-footer,
	.post-layout__toc,
	.post-layout__share,
	.share,
	.to-top,
	.slide-in,
	.next,
	.related,
	.post-nav,
	.inline-read { display: none !important; }

	body { background: #fff; color: #000; }
	.post-layout { display: block; }
	.entry-content a { text-decoration: underline; }
}

/* Temos archyve kategorijos žymė prie kiekvieno įrašo nereikalinga. */
.archive-head--topic + .archive-list .card .chip { display: none; }
