/*
Theme Name: Tikslios Naujienos
Theme URI: https://ksrf.lt/
Author: ksrf.lt
Description: Išskirtinė, greita ir SEO optimizuota naujienų portalo tema „Tikslios naujienos“ (ksrf.lt). Lietuviškos juostos (tautinės juostos rašto) motyvas, laiko juosta, kategorijų juostos, skaitymo progreso juosta, automatinis straipsnio turinys, susiję straipsniai, skaitomiausi straipsniai, tamsus režimas, mygtukas „į viršų“, JSON-LD struktūriniai duomenys, Open Graph, senų nuorodų peradresavimas. Veikia be papildomų įskiepių.
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: tikslios-naujienos
Tags: news, blog, two-columns, right-sidebar, custom-menu, featured-images, translation-ready, accessibility-ready
*/

/* ==========================================================================
   1. Spalvos, šriftai, matmenys
   ========================================================================== */
:root {
	--ruta: #173A33;
	--ruta-2: #24524A;
	--gintaras: #F2A900;
	--linas: #ECEFEA;
	--popierius: #FAFBF9;

	--bg: var(--linas);
	--surface: var(--popierius);
	--ink: #1C2321;
	--muted: #55625E;
	--rule: #CED6D1;
	--link: #1D5F52;
	--accent: var(--gintaras);
	--rank: var(--ruta);
	--head-bg: var(--ruta);
	--head-ink: #EEF3EF;
	--head-muted: #B5C6BE;
	--btn-bg: var(--ruta);
	--btn-ink: #F4F7F5;

	--sash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12' viewBox='0 0 24 12'%3E%3Crect width='24' height='12' fill='%23173A33'/%3E%3Cpath d='M0 6 6 0 12 6 6 12Z' fill='%23F2A900'/%3E%3Cpath d='M12 6 18 0 24 6 18 12Z' fill='%23ECEFEA'/%3E%3Cpath d='M3 6 6 3 9 6 6 9Z' fill='%23173A33'/%3E%3Crect x='17' y='5' width='2' height='2' fill='%23C8102E'/%3E%3C/svg%3E");

	--f-serif: "Bitter", "Roboto Slab", "Rockwell", Georgia, serif;
	--f-sans: "Fira Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

	--wrap: 77.5rem;
	--entry: 62.5rem;
	--measure: 44rem;
	--pad: clamp(1rem, 4vw, 2rem);
	--radius: 6px;

	color-scheme: light;
}

[data-theme="dark"] {
	--bg: #0F1D1A;
	--surface: #142521;
	--ink: #E3EAE6;
	--muted: #A2B3AC;
	--rule: #284139;
	--link: #F5C451;
	--rank: var(--gintaras);
	--head-bg: #0A1512;
	--btn-bg: var(--gintaras);
	--btn-ink: #10211D;
	color-scheme: dark;
}

/* ==========================================================================
   2. Pagrindai
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 400 1rem/1.6 var(--f-sans);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-wrap: break-word;
}

img,
svg,
video,
iframe { max-width: 100%; }

img { height: auto; display: block; }

a { color: inherit; }

h1, h2, h3, h4 {
	font-family: var(--f-serif);
	line-height: 1.2;
	margin: 0;
	text-wrap: balance;
}

p { margin: 0; }

button { font: inherit; cursor: pointer; }

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

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

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

.skip-link {
	position: absolute;
	left: 1rem;
	top: -4rem;
	z-index: 200;
	background: var(--accent);
	color: #10211D;
	padding: .75rem 1.25rem;
	font-weight: 600;
	border-radius: 0 0 6px 6px;
	text-decoration: none;
}
.skip-link:focus { top: 0; }

.site-main:focus { outline: none; }

/* Juosta – tautinės juostos raštas (pagrindinis temos motyvas) */
.sash {
	height: 12px;
	background: var(--sash) repeat-x left center / 24px 12px;
}

/* ==========================================================================
   3. Mygtukai, žymos, meta
   ========================================================================== */
.btn {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .7rem 1.25rem;
	border-radius: 999px;
	border: 2px solid var(--btn-bg);
	background: var(--btn-bg);
	color: var(--btn-ink);
	font: 600 .95rem/1.2 var(--f-sans);
	text-decoration: none;
	transition: background-color .15s, color .15s;
}
.btn:hover { background: var(--ruta-2); border-color: var(--ruta-2); }
[data-theme="dark"] .btn:hover { background: #FFC93A; border-color: #FFC93A; }

.btn--ghost {
	background: transparent;
	color: var(--ink);
	border-color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
[data-theme="dark"] .btn--ghost:hover { background: var(--ink); border-color: var(--ink); }

.meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .25rem 1rem;
	font: 400 .82rem/1.4 var(--f-sans);
	color: var(--muted);
}

.cat {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	font: 600 .82rem/1.3 var(--f-sans);
	color: var(--ink);
	text-decoration: none;
}
.cat::before {
	content: "";
	width: .55rem;
	height: .55rem;
	flex: none;
	background: var(--c, var(--ruta));
	transform: rotate(45deg);
}
a.cat:hover { text-decoration: underline; text-underline-offset: 3px; }

.ico { flex: none; }

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.chip {
	display: inline-block;
	padding: .35rem .8rem;
	border: 1px solid var(--rule);
	border-radius: 999px;
	background: var(--surface);
	color: var(--ink);
	font: 400 .85rem/1.3 var(--f-sans);
	text-decoration: none;
}
.chip:hover { border-color: var(--ink); }
.chip[style]::before {
	content: "";
	display: inline-block;
	width: .45rem;
	height: .45rem;
	margin-right: .45rem;
	background: var(--c);
	transform: rotate(45deg) translateY(-1px);
}

/* Paveikslėlių talpyklos */
.card__media,
.tl__media,
.inline-read__media {
	display: block;
	text-decoration: none;
	overflow: hidden;
	border-radius: 4px;
	background: var(--rule);
}
.card__media img,
.tl__media img,
.inline-read__media img,
.noimg {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Paveikslėlio pakaitalas, kai įrašas jo neturi */
.noimg {
	position: relative;
	display: grid;
	place-items: center;
	min-height: 100%;
	background: var(--sash) repeat-x left bottom / 24px 12px, var(--c, var(--ruta));
}
.noimg__l {
	font: 800 clamp(2rem, 5vw, 3.5rem)/1 var(--f-serif);
	color: rgba(255, 255, 255, .92);
	transform: translateY(-6px);
}

/* ==========================================================================
   4. Antraštė
   ========================================================================== */
.masthead {
	background: var(--head-bg);
	color: var(--head-ink);
}

.masthead__bar {
	display: flex;
	align-items: center;
	gap: 1rem 1.5rem;
	padding-block: 1.1rem;
}

.logo { margin: 0; font-size: 1rem; }
.logo a {
	display: inline-flex;
	align-items: center;
	gap: .8rem;
	color: inherit;
	text-decoration: none;
}
.logo__mark { flex: none; border-radius: 8px; }
.masthead .logo__mark rect:first-child { fill: #0F2925; }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__name {
	font: 800 1.65rem/1.05 var(--f-serif);
	letter-spacing: -.01em;
}
.logo__domain {
	margin-top: .3rem;
	font: 600 .78rem/1 var(--f-sans);
	color: var(--gintaras);
	letter-spacing: .02em;
}

.masthead__today {
	margin-left: auto;
	font-size: .9rem;
	color: var(--head-muted);
}
.masthead__today::first-letter { text-transform: uppercase; }

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

.tool {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .45rem;
	min-height: 2.5rem;
	padding: .45rem .9rem;
	border: 1px solid rgba(236, 239, 234, .28);
	border-radius: 999px;
	background: transparent;
	color: var(--head-ink);
	font: 400 .88rem/1 var(--f-sans);
	text-decoration: none;
}
.tool:hover { background: rgba(255, 255, 255, .08); border-color: rgba(236, 239, 234, .5); }
.tool--icon { width: 2.5rem; padding: 0; }
.tool__sun,
[data-theme="dark"] .tool__moon { display: none; }
[data-theme="dark"] .tool__sun { display: inline-flex; }
.tool__moon { display: inline-flex; }

.nav-toggle { display: none; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: inline-flex; }

.mainnav { border-top: 1px solid rgba(236, 239, 234, .12); }
.mainnav__list,
.mainnav ul {
	display: flex;
	gap: .25rem 1.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
}
.mainnav ul::-webkit-scrollbar { display: none; }
.mainnav a {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .85rem 0 .8rem;
	color: var(--head-ink);
	font: 600 .95rem/1.2 var(--f-sans);
	text-decoration: none;
	white-space: nowrap;
	box-shadow: inset 0 -3px 0 transparent;
}
.mainnav a[style]::before {
	content: "";
	width: .5rem;
	height: .5rem;
	background: var(--c);
	transform: rotate(45deg);
	outline: 1px solid rgba(255, 255, 255, .35);
}
.mainnav a:hover,
.mainnav a[aria-current="page"],
.mainnav .current-menu-item > a,
.mainnav .current-menu-parent > a { box-shadow: inset 0 -3px 0 var(--gintaras); }

/* „Ką tik paskelbta“ */
.latest {
	background: var(--surface);
	border-bottom: 1px solid var(--rule);
}
.latest__inner {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	padding-block: .7rem;
}
.latest__label {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	font: 600 .85rem/1 var(--f-sans);
	color: var(--ink);
}
.latest__label::before {
	content: "";
	width: .55rem;
	height: .55rem;
	background: var(--gintaras);
	transform: rotate(45deg);
}
.latest__list {
	display: flex;
	gap: 2rem;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: thin;
	mask-image: linear-gradient(90deg, #000 90%, transparent);
}
.latest__list li {
	display: flex;
	align-items: baseline;
	gap: .5rem;
	white-space: nowrap;
	font-size: .9rem;
}
.latest__list time { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.latest__list a {
	max-width: 34ch;
	overflow: hidden;
	text-overflow: ellipsis;
	color: var(--ink);
	text-decoration: none;
}
.latest__list a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   5. Pradžia: pagrindinis straipsnis ir eilė
   ========================================================================== */
.front { padding-block: 2.25rem 1rem; }

.card { position: relative; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.card__body .meta { margin-bottom: .55rem; }

.card--lead {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
	gap: 2.5rem;
	align-items: center;
}
.card--lead .card__media { aspect-ratio: 16 / 10; border-radius: var(--radius); }
.card--lead .card__title {
	font-size: clamp(1.9rem, 2.9vw, 2.6rem);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -.015em;
}
.card__excerpt {
	margin-top: 1rem;
	max-width: 46ch;
	font: 400 1.12rem/1.6 var(--f-serif);
	color: var(--muted);
}
.card__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.5rem;
	margin-top: 1.5rem;
}
.card__read,
.tl__read {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	font-size: .82rem;
	color: var(--muted);
}
.card__read .ico,
.tl__read .ico { width: 15px; height: 15px; }

.front__row {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 2rem;
	margin-top: 2.5rem;
	padding-top: 2rem;
	border-top: 1px solid var(--rule);
}
.card--row .card__media,
.card--rail .card__media,
.card--related .card__media { aspect-ratio: 3 / 2; margin-bottom: .9rem; }
.card--row .card__title {
	font-size: 1.18rem;
	font-weight: 700;
	line-height: 1.28;
}

/* ==========================================================================
   6. Dviejų kolonų zona, laiko juosta, šoninė kolona
   ========================================================================== */
.split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 20rem;
	gap: 3.5rem;
	padding-block: 3rem;
}
.split__side { position: sticky; top: 1.25rem; align-self: start; }

.sec-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: .5rem 1.5rem;
	margin-bottom: 1.25rem;
}
.sec-head__title {
	display: inline-flex;
	align-items: center;
	gap: .8rem;
	font-size: clamp(1.5rem, 2.6vw, 1.9rem);
	font-weight: 800;
}
.sec-head__title::before {
	content: "";
	width: 36px;
	height: 12px;
	flex: none;
	border-radius: 2px;
	background: var(--sash) repeat-x 0 0 / 24px 12px;
}
.sec-head__note { font-size: .88rem; color: var(--muted); }
.sec-head__link { font-size: .92rem; font-weight: 600; color: var(--link); }

/* Laiko juosta */
.timeline { position: relative; }
.tl {
	display: grid;
	grid-template-columns: 4.25rem minmax(0, 1fr) 12.5rem;
	column-gap: 1.75rem;
	padding-block: 1.25rem;
	background: linear-gradient(var(--rule), var(--rule)) no-repeat calc(4.25rem + .875rem - 1px) 0 / 2px 100%;
}
.tl:first-child { padding-top: .5rem; }
.tl__day { font-family: var(--f-serif); text-align: right; padding-top: .1rem; }
.tl__d { display: block; font-size: 2rem; font-weight: 800; line-height: 1; color: var(--rank); font-variant-numeric: lining-nums; }
.tl__m,
.tl__y { display: block; font: 400 .8rem/1.4 var(--f-sans); color: var(--muted); }
.tl.is-same-day .tl__day { visibility: hidden; }
.tl__body { position: relative; }
.tl__body::before {
	content: "";
	position: absolute;
	left: calc(-.875rem - 6px);
	top: .3rem;
	width: 10px;
	height: 10px;
	background: var(--gintaras);
	border: 2px solid var(--bg);
	box-sizing: content-box;
	transform: rotate(45deg);
}
.tl.is-same-day .tl__body::before { background: var(--rule); }
.tl__title {
	margin: .4rem 0 .45rem;
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.25;
}
.tl__title a { color: var(--ink); text-decoration: none; }
.tl__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.tl__excerpt { max-width: 62ch; color: var(--muted); font-size: .98rem; line-height: 1.55; }
.tl__read { margin-top: .6rem; }
.tl__media { aspect-ratio: 4 / 3; align-self: start; margin-top: .35rem; }

.tl.is-new { animation: tn-in .4s ease-out both; }
@keyframes tn-in { from { opacity: 0; transform: translateY(8px); } }

.more { display: flex; flex-direction: column; align-items: center; gap: .5rem; margin: 1.75rem 0 1rem; }
.more__status { font-size: .85rem; color: var(--muted); min-height: 1.2em; }

/* Puslapiavimas */
.pager .nav-links,
.pager--inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .4rem;
	margin-top: 1.5rem;
}
.page-numbers,
.pager--inner .post-page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 .8rem;
	border: 1px solid var(--rule);
	border-radius: 999px;
	color: var(--ink);
	font-size: .9rem;
	text-decoration: none;
}
.page-numbers.current,
.post-page-numbers.current { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }
.page-numbers.dots { border: 0; }
a.page-numbers:hover { border-color: var(--ink); }

/* Šoninė kolona */
.aside__block { margin-bottom: 2.5rem; }
.aside__title {
	margin-bottom: .75rem;
	padding-bottom: .6rem;
	border-bottom: 2px solid var(--ink);
	font-size: 1.2rem;
	font-weight: 800;
}

.rank { margin: 0; padding: 0; list-style: none; counter-reset: rank; }
.rank__item { counter-increment: rank; border-bottom: 1px solid var(--rule); }
.rank__item a {
	display: grid;
	grid-template-columns: 2.25rem minmax(0, 1fr);
	gap: .1rem .5rem;
	padding: .85rem 0;
	color: var(--ink);
	text-decoration: none;
}
.rank__item a::before {
	content: counter(rank);
	grid-row: span 2;
	font: 800 1.9rem/1 var(--f-serif);
	color: var(--rank);
}
.rank__title { font: 700 1.02rem/1.3 var(--f-serif); }
.rank__item a:hover .rank__title { text-decoration: underline; text-underline-offset: 3px; }
.rank__meta .cat { font-weight: 400; color: var(--muted); }

.recent { margin: 0; padding: 0; list-style: none; display: grid; gap: .75rem; }
.recent a {
	display: grid;
	grid-template-columns: 3.75rem minmax(0, 1fr);
	gap: .75rem;
	align-items: center;
	color: var(--ink);
	text-decoration: none;
	font: 600 .92rem/1.35 var(--f-sans);
}
.recent a:hover span { text-decoration: underline; text-underline-offset: 3px; }
.recent img,
.recent .recent__ph { width: 3.75rem; height: 2.75rem; object-fit: cover; border-radius: 4px; background: var(--sash) repeat-x left bottom / 24px 12px, var(--ruta); }
.recent--row { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }

.discover {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.1rem 1.25rem;
	border-radius: 10px;
	background: var(--ruta);
	color: #EEF3EF;
	text-decoration: none;
}
.discover:hover { background: var(--ruta-2); }
.discover__text { display: flex; flex-direction: column; gap: .15rem; font-size: .88rem; color: #C9D6D0; }
.discover__text strong { font: 700 1.05rem/1.3 var(--f-serif); color: #fff; }
.discover .logo__mark rect:first-child { fill: #0F2925; }

/* ==========================================================================
   7. Kategorijų juostos
   ========================================================================== */
.band {
	padding-block: 2.75rem 3rem;
	background: var(--surface);
	border-top: 1px solid var(--rule);
}
.band--alt { background: var(--bg); }
.band__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .5rem 1.25rem;
	margin-bottom: 1.5rem;
}
.band__title {
	display: inline-flex;
	align-items: center;
	gap: .75rem;
	font-size: clamp(1.6rem, 3vw, 2.1rem);
	font-weight: 800;
}
.band__title::before {
	content: "";
	width: .8rem;
	height: .8rem;
	background: var(--c);
	transform: rotate(45deg);
}
.band__title a { color: var(--ink); text-decoration: none; }
.band__title a:hover { text-decoration: underline; text-underline-offset: 5px; }
.band__count { font-size: .9rem; color: var(--muted); }
.band__nav { margin-left: auto; display: flex; gap: .5rem; align-self: center; }
.band__nav[hidden] { display: none; }
.band__btn {
	display: inline-grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	border: 1px solid var(--rule);
	border-radius: 50%;
	background: var(--surface);
	color: var(--ink);
}
.band__btn:hover { border-color: var(--ink); }
.band__btn:disabled { opacity: .35; cursor: default; }

.rail {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 3 * 1.5rem) / 4);
	gap: 1.5rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
	padding-bottom: .75rem;
	overscroll-behavior-x: contain;
}
.rail > * { scroll-snap-align: start; }
.card--rail .card__title { font-size: 1.1rem; font-weight: 700; line-height: 1.3; }
.rail__all {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: .35rem;
	min-height: 12rem;
	padding: 1.5rem;
	border-radius: var(--radius);
	background: var(--sash) repeat-x left top / 24px 12px, var(--c, var(--ruta));
	color: #fff;
	text-decoration: none;
	font-size: .92rem;
}
.rail__all strong { font: 800 1.45rem/1.15 var(--f-serif); }
.rail__all:hover strong { text-decoration: underline; text-underline-offset: 4px; }

/* ==========================================================================
   8. Archyvai
   ========================================================================== */
.archive-head {
	padding-block: 2rem 2.25rem;
	background: var(--surface);
	border-bottom: 1px solid var(--rule);
	box-shadow: inset 0 5px 0 var(--c, transparent);
}
.archive-head__title {
	margin-top: .75rem;
	font-size: clamp(2.2rem, 5vw, 3.6rem);
	font-weight: 800;
	letter-spacing: -.015em;
	line-height: 1.05;
}
.archive-head__hash { color: var(--muted); font-weight: 400; margin-right: .1em; }
.archive-head__desc {
	max-width: 62ch;
	margin-top: 1rem;
	font: 400 1.1rem/1.6 var(--f-serif);
	color: var(--muted);
}
.archive-head__desc p + p { margin-top: .75em; }
.archive-head__count { margin-top: .9rem; font-size: .9rem; color: var(--muted); }
.chips--head { margin-top: 1.25rem; }
.split .card--lead { grid-template-columns: 1fr; gap: 1.25rem; margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--rule); }
.split .card--lead .card__title { font-size: clamp(1.75rem, 3vw, 2.4rem); }
.split .card--lead .card__media { aspect-ratio: 16 / 9; }

.empty { padding: 2rem 0; }
.empty__title { font: 800 1.6rem/1.2 var(--f-serif); margin-bottom: .5rem; }
.empty p + p { margin-top: 1rem; }

/* Naršymo kelias */
.crumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: .2rem .5rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: .82rem;
	color: var(--muted);
}
.crumbs li { display: inline-flex; align-items: center; gap: .5rem; min-width: 0; }
.crumbs li + li::before { content: "/"; color: var(--rule); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current] { max-width: 42ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==========================================================================
   9. Straipsnis
   ========================================================================== */
.progress {
	position: fixed;
	inset: 0 0 auto;
	z-index: 150;
	height: 6px;
	pointer-events: none;
}
.progress__bar {
	display: block;
	height: 100%;
	background: var(--sash) repeat-x left center / 12px 6px;
	clip-path: inset(0 100% 0 0);
}

.wrap--entry,
.wrap--figure,
.entry__layout { max-width: calc(var(--entry) + 2 * var(--pad)); }

.entry__head { padding-block: 1.75rem 0; }
.entry__head .cat { margin-top: 1.5rem; }
.entry__title {
	max-width: 24ch;
	margin-top: .75rem;
	font-size: clamp(2.1rem, 4.6vw, 3.5rem);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -.015em;
}
.entry__deck {
	max-width: 48ch;
	margin-top: 1.1rem;
	font: 400 1.28rem/1.55 var(--f-serif);
	color: var(--muted);
}
.entry__meta {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem 1.5rem;
	margin-top: 1.5rem;
	padding-top: 1rem;
	border-top: 1px solid var(--rule);
	font-size: .9rem;
	color: var(--muted);
}
.entry__meta a { color: var(--ink); font-weight: 600; text-decoration: none; }
.entry__meta a:hover { text-decoration: underline; }
.entry__read { display: inline-flex; align-items: center; gap: .35rem; }
.entry__read .ico { width: 16px; height: 16px; }

.entry__figure { margin-block: 2rem 0; }
.entry__figure img { width: 100%; border-radius: var(--radius); }
.entry__figure figcaption { margin-top: .6rem; font-size: .85rem; color: var(--muted); }

.entry__layout {
	display: grid;
	grid-template-columns: minmax(0, var(--measure));
	justify-content: center;
	gap: 3.5rem;
	padding-block: 2.5rem 1rem;
}
.entry__layout.has-toc { grid-template-columns: 15rem minmax(0, var(--measure)); justify-content: space-between; }

.entry__toc { position: sticky; top: 1.5rem; align-self: start; max-height: calc(100vh - 3rem); overflow-y: auto; }
.toc__title {
	font: 600 .95rem/1.3 var(--f-sans);
	padding-bottom: .6rem;
	cursor: pointer;
	list-style: none;
}
.toc__title::-webkit-details-marker { display: none; }
.toc__list { margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--rule); }
.toc__item a {
	display: block;
	margin-left: -2px;
	padding: .4rem 0 .4rem 1rem;
	border-left: 2px solid transparent;
	color: var(--muted);
	font-size: .88rem;
	line-height: 1.4;
	text-decoration: none;
}
.toc__item--h3 a { padding-left: 1.75rem; font-size: .84rem; }
.toc__item a:hover { color: var(--ink); }
.toc__item a.is-active { border-left-color: var(--gintaras); color: var(--ink); font-weight: 600; }

/* Straipsnio tekstas */
.prose {
	font: 400 1.1875rem/1.75 var(--f-serif);
	color: var(--ink);
}
.prose > * + * { margin-top: 1.3em; }
.prose h2 { margin-top: 2.2em; font-size: 1.75rem; font-weight: 800; line-height: 1.22; scroll-margin-top: 1.5rem; }
.prose h3 { margin-top: 1.9em; font-size: 1.35rem; font-weight: 700; line-height: 1.3; scroll-margin-top: 1.5rem; }
.prose h4 { margin-top: 1.6em; font-size: 1.15rem; font-weight: 700; }
.prose h2 + *,
.prose h3 + *,
.prose h4 + * { margin-top: .6em; }
.prose a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { font-weight: 700; }
.prose ul,
.prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--muted); font-family: var(--f-sans); }
.prose ul li::marker { color: var(--gintaras); }
.prose blockquote {
	margin-inline: 0;
	padding: .2em 0 .2em 1.3em;
	border-left: 4px solid var(--gintaras);
	font-size: 1.28rem;
	font-style: italic;
}
.prose blockquote cite { display: block; margin-top: .5em; font: normal .9rem var(--f-sans); color: var(--muted); }
.prose figure { margin-inline: 0; }
.prose img { border-radius: 4px; }
.prose figcaption,
.prose .wp-caption-text { margin-top: .5em; font: 400 .85rem/1.5 var(--f-sans); color: var(--muted); }
.prose hr {
	width: 72px;
	height: 12px;
	margin: 2.5em auto;
	border: 0;
	border-radius: 2px;
	background: var(--sash) repeat-x 0 0 / 24px 12px;
}
.prose table { width: 100%; border-collapse: collapse; font: 400 .95rem/1.5 var(--f-sans); }
.prose .wp-block-table { overflow-x: auto; }
.prose th,
.prose td { padding: .6em .75em; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.prose th { font-weight: 600; border-bottom-width: 2px; border-bottom-color: var(--ink); }
.prose code { font-size: .88em; padding: .1em .35em; background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; }
.prose pre { overflow-x: auto; padding: 1em; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; font-size: .9rem; }
.prose pre code { padding: 0; border: 0; background: none; }
.prose iframe,
.prose video { width: 100%; border-radius: 4px; }
.prose .alignleft { float: left; margin: .3em 1.5em 1em 0; max-width: 50%; }
.prose .alignright { float: right; margin: .3em 0 1em 1.5em; max-width: 50%; }
.prose .aligncenter { margin-inline: auto; }
.prose::after { content: ""; display: table; clear: both; }

/* Įterptas „Taip pat skaitykite“ */
.inline-read {
	padding: 1rem 1.25rem;
	border-left: 4px solid var(--c, var(--gintaras));
	border-radius: 0 var(--radius) var(--radius) 0;
	background: var(--surface);
	font-family: var(--f-sans);
}
.prose .inline-read { margin-block: 2em; }
.inline-read__label { display: block; margin-bottom: .6rem; font-size: .82rem; font-weight: 600; color: var(--muted); }
.prose .inline-read__link {
	display: grid;
	grid-template-columns: 6rem minmax(0, 1fr);
	gap: 1rem;
	align-items: center;
	color: var(--ink);
	text-decoration: none;
}
.inline-read__media { aspect-ratio: 4 / 3; }
.inline-read__title { font: 700 1.1rem/1.35 var(--f-serif); }
.inline-read__link:hover .inline-read__title { text-decoration: underline; text-underline-offset: 3px; }

/* Straipsnio pabaiga */
.entry__foot {
	display: grid;
	gap: 1.5rem;
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--rule);
}
.share { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.share__label { font-weight: 600; font-size: .92rem; }
.share__row { display: flex; flex-wrap: wrap; gap: .5rem; }
.share__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .45rem;
	min-width: 2.75rem;
	height: 2.75rem;
	padding: 0 .9rem;
	border: 1px solid var(--rule);
	border-radius: 999px;
	background: var(--surface);
	color: var(--ink);
	font-size: .88rem;
	text-decoration: none;
}
.share__btn:hover { border-color: var(--ink); }
.share__btn[hidden] { display: none; }
.share__btn .ico { width: 18px; height: 18px; }

.postnav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
	max-width: calc(var(--entry) + 2 * var(--pad));
	margin-block: 1.5rem 3rem;
}
.postnav__link {
	display: flex;
	flex-direction: column;
	gap: .35rem;
	padding: 1.25rem 1.5rem;
	border: 1px solid var(--rule);
	border-radius: 8px;
	background: var(--surface);
	color: var(--ink);
	text-decoration: none;
}
.postnav__link--older { grid-column: 2; text-align: right; }
.postnav__label { font-size: .82rem; color: var(--muted); }
.postnav__title { font: 700 1.12rem/1.3 var(--f-serif); }
.postnav__link:hover { border-color: var(--ink); }
.postnav__link:hover .postnav__title { text-decoration: underline; text-underline-offset: 3px; }

.related {
	padding-block: 3rem 4rem;
	background: var(--surface);
	border-top: 1px solid var(--rule);
}
.related__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 2.25rem 2rem;
}
.card--related .card__title { font-size: 1.15rem; font-weight: 700; line-height: 1.3; margin-bottom: .4rem; }
.related__recent { margin-top: 3rem; }
.notfound__cats-title { margin-top: 3rem; }

/* Plaukiojantis „Skaitykite toliau“ */
.nextup {
	position: fixed;
	left: 1.25rem;
	bottom: 1.25rem;
	z-index: 120;
	display: flex;
	max-width: 22rem;
	border-radius: 10px;
	background: var(--ruta);
	color: #EEF3EF;
	box-shadow: 0 12px 32px rgba(8, 26, 22, .28);
	transform: translateY(0);
	transition: transform .3s ease, opacity .3s ease;
}
.nextup[hidden] { display: flex; opacity: 0; transform: translateY(140%); pointer-events: none; visibility: hidden; }
.nextup__link { display: flex; flex-direction: column; gap: .25rem; padding: .95rem 1rem .95rem 1.15rem; color: inherit; text-decoration: none; }
.nextup__label { font: 600 .78rem/1.2 var(--f-sans); color: var(--gintaras); }
.nextup__title { font: 700 1rem/1.3 var(--f-serif); }
.nextup__link:hover .nextup__title { text-decoration: underline; text-underline-offset: 3px; }
.nextup__close {
	flex: none;
	align-self: flex-start;
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	margin: .4rem .4rem 0 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #C9D6D0;
}
.nextup__close:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nextup__close .ico { width: 16px; height: 16px; }

/* Mygtukas „į viršų“ */
.totop {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 120;
	display: grid;
	place-items: center;
	width: 3.25rem;
	height: 3.25rem;
	border: 0;
	border-radius: 50%;
	background: var(--ruta);
	color: #EEF3EF;
	box-shadow: 0 6px 18px rgba(8, 26, 22, .25);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity .25s, transform .25s, visibility .25s;
}
.totop.is-visible { opacity: 1; visibility: visible; transform: none; }
.totop:hover { background: var(--ruta-2); }
.totop .ico { width: 20px; height: 20px; }
.totop__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.totop__ring circle { fill: none; stroke: var(--gintaras); stroke-width: 3; stroke-dasharray: 100; stroke-dashoffset: 100; stroke-linecap: round; }
[data-theme="dark"] .totop { box-shadow: 0 0 0 1px #2C4A42, 0 6px 18px rgba(0, 0, 0, .4); }

/* 404 */
.notfound { padding-block: 4rem 3.5rem; }
.notfound__inner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3rem; align-items: center; }
.notfound__code { font: 600 1rem/1 var(--f-sans); color: var(--muted); }
.notfound__title { margin-top: .5rem; font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -.015em; }
.notfound__text { max-width: 52ch; margin-top: 1rem; font: 400 1.15rem/1.6 var(--f-serif); color: var(--muted); }
.notfound__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* ==========================================================================
   10. Poraštė
   ========================================================================== */
.footer {
	margin-top: 0;
	background: var(--head-bg);
	color: #C3D1CA;
	font-size: .92rem;
}
.footer__grid {
	display: grid;
	grid-template-columns: 1.5fr 1fr 1.5fr 1fr;
	gap: 2.5rem;
	padding-block: 3rem 2.5rem;
}
.footer .logo__name { color: #EEF3EF; font-size: 1.4rem; }
.footer .logo__mark rect:first-child { fill: #0F2925; }
.footer__about { margin-top: 1rem; max-width: 40ch; line-height: 1.6; }
.footer__title { margin-bottom: .9rem; font-size: 1.05rem; font-weight: 700; color: #EEF3EF; }
.footer ul { margin: 0; padding: 0; list-style: none; }
.footer li + li { margin-top: .5rem; }
.footer a { color: #C3D1CA; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer__count { font-size: .8rem; color: #839A91; }
.footer__social { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 1rem !important; }
.footer__social li + li { margin-top: 0; }
.footer__meta-links { margin-top: 1rem !important; }
.footer__meta-links a { display: inline-flex; align-items: center; gap: .35rem; }
.footer__meta-links .ico { width: 15px; height: 15px; }
.footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: .5rem 2rem;
	padding-block: 1.25rem 5rem;
	border-top: 1px solid rgba(236, 239, 234, .12);
	font-size: .82rem;
	color: #94AAA1;
}

/* ==========================================================================
   11. Prisitaikymas prie ekrano
   ========================================================================== */
@media (max-width: 1100px) {
	.split { grid-template-columns: minmax(0, 1fr) 17rem; gap: 2.5rem; }
	.tl { grid-template-columns: 4.25rem minmax(0, 1fr) 10rem; }
	.rail { grid-auto-columns: calc((100% - 2 * 1.5rem) / 3); }
	.entry__layout.has-toc { grid-template-columns: 13rem minmax(0, var(--measure)); gap: 2.5rem; }
	.footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 920px) {
	.masthead__today,
	.tool__text { display: none; }
	.masthead .tool:not(.tool--icon) { width: 2.5rem; padding: 0; }
	.nav-toggle { display: inline-flex; }
	.js .mainnav { display: none; }
	.js .mainnav.is-open { display: block; }
	.js .mainnav.is-open ul { flex-direction: column; gap: 0; padding-bottom: .75rem; }
	.js .mainnav.is-open a { width: 100%; padding: .8rem 0; border-bottom: 1px solid rgba(236, 239, 234, .1); box-shadow: none; }
	.masthead__tools { margin-left: auto; }

	.card--lead { grid-template-columns: 1fr; gap: 1.25rem; }
	.front__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.split { grid-template-columns: 1fr; }
	.split__side { position: static; }
	.related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	.entry__layout.has-toc { grid-template-columns: minmax(0, var(--measure)); justify-content: center; gap: 1.5rem; }
	.entry__toc { position: static; max-height: none; }
	.toc { padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; }
	.toc__title { padding-bottom: 0; display: flex; justify-content: space-between; }
	.toc__title::after { content: "+"; font-weight: 400; color: var(--muted); }
	.toc[open] .toc__title { padding-bottom: .75rem; }
	.toc[open] .toc__title::after { content: "–"; }
}

@media (max-width: 640px) {
	body { font-size: .98rem; }
	.logo__name { font-size: 1.12rem; white-space: nowrap; }
	.logo__domain { font-size: .7rem; }
	.logo a { gap: .6rem; }
	.logo__mark { width: 36px; height: 36px; }
	.masthead__tools { gap: .35rem; }
	.masthead__bar { gap: .75rem; padding-block: .85rem; }
	.latest__label { display: none; }

	.front { padding-top: 1.25rem; }
	.front__row { grid-template-columns: 1fr; gap: 0; margin-top: 1.5rem; padding-top: 0; border-top: 0; }
	.front__row .card {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 6.5rem;
		gap: 1rem;
		padding-block: 1rem;
		border-top: 1px solid var(--rule);
	}
	.front__row .card__media { order: 2; aspect-ratio: 1; margin: 0; }
	.front__row .card__title { font-size: 1.08rem; }

	.tl {
		grid-template-columns: 2.6rem minmax(0, 1fr) 5.25rem;
		column-gap: 1.25rem;
		background-position: calc(2.6rem + .625rem - 1px) 0;
	}
	.tl__body::before { left: calc(-.625rem - 6px); }
	.tl__media { aspect-ratio: 1; margin-top: .2rem; margin-left: -.25rem; }
	.tl__excerpt { display: none; }
	.tl__d { font-size: 1.5rem; }
	.tl__title { font-size: 1.08rem; margin-bottom: .2rem; }

	.rail { grid-auto-columns: 78%; }
	.related__grid { grid-template-columns: 1fr; }
	.related__grid .card { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem; align-items: start; }
	.related__grid .card__media { aspect-ratio: 1; margin: 0; }
	.postnav { grid-template-columns: 1fr; }
	.postnav__link--older { grid-column: auto; text-align: left; }
	.prose { font-size: 1.1rem; line-height: 1.72; }
	.prose .alignleft,
	.prose .alignright { float: none; margin: 1em 0; max-width: 100%; }
	.notfound__inner { grid-template-columns: 1fr; gap: 1.5rem; }
	.notfound__mark svg { width: 72px; height: 72px; }
	.footer__grid { grid-template-columns: 1fr; gap: 2rem; }
	.nextup { left: .75rem; right: 4.75rem; bottom: .9rem; max-width: none; }
	.totop { right: .9rem; bottom: .9rem; }
}

@media (max-width: 400px) {
	.masthead .tool:not(.tool--icon) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*,
	*::before,
	*::after { animation: none !important; transition: none !important; }
}

@media print {
	.masthead,
	.latest,
	.split__side,
	.band,
	.related,
	.postnav,
	.share,
	.entry__toc,
	.nextup,
	.totop,
	.progress,
	.footer,
	.inline-read { display: none !important; }
	body { background: #fff; color: #000; }
	.prose a::after { content: " (" attr(href) ")"; font-size: .8em; }
}
