/* ==========================================================================
   Spektras – opendata.lt tema
   Spalvos: miškas, gintaras, raudona (Lietuvos spalvos kaip duomenų diagrama)
   Šriftai: Bitter (antraštės ir straipsnių tekstas), Fira Sans (sąsaja)
   ========================================================================== */

@font-face { font-family: "Bitter"; src: url("../fonts/bitter-var.woff") format("woff"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Bitter"; src: url("../fonts/bitter-italic-var.woff") format("woff"); font-weight: 300 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("../fonts/fira-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("../fonts/fira-600.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
	--bg: #F2F4F1;
	--surface: #FFFFFF;
	--ink: #15241E;
	--text: #26332D;
	--muted: #5A6A63;
	--line: #D6DDD8;
	--soft: #E6EBE7;
	--link: #0B6E4F;
	--forest: #0B6E4F;
	--amber: #F0A202;
	--red: #C8403A;
	--footer-bg: #15241E;
	--footer-text: #C9D5CF;

	--serif: "Bitter", "Iowan Old Style", Georgia, serif;
	--sans: "Fira Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

	--wrap: 1200px;
	--gut: clamp(16px, 4vw, 32px);
	--radius: 6px;
	--head-h: 72px;
	color-scheme: light;
}

:root[data-theme="dark"] {
	--bg: #0F1714;
	--surface: #16211C;
	--ink: #E7EEEA;
	--text: #CFDAD4;
	--muted: #8FA39A;
	--line: #2A3832;
	--soft: #1C2923;
	--link: #5ACFA2;
	--amber: #F5B731;
	--footer-bg: #0A100E;
	--footer-text: #A9BAB2;
	color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #0F1714;
		--surface: #16211C;
		--ink: #E7EEEA;
		--text: #CFDAD4;
		--muted: #8FA39A;
		--line: #2A3832;
		--soft: #1C2923;
		--link: #5ACFA2;
		--amber: #F5B731;
		--footer-bg: #0A100E;
		--footer-text: #A9BAB2;
		color-scheme: dark;
	}
}

/* ---------- Pagrindas ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 16px); }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 400 1.0625rem/1.55 var(--sans);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--link); }
a:hover { text-decoration-color: var(--amber); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); margin: 0; font-weight: 750; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gut)); margin-inline: auto; padding-inline: var(--gut); }
.sr-only, .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip {
	position: absolute; left: 12px; top: -60px; z-index: 100;
	background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--radius);
	font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }
.site-main:focus { outline: none; }

/* Legendos kvadratėlis – kategorijos spalva visoje svetainėje */
.key {
	display: inline-block; flex: none;
	width: .72em; height: .72em; border-radius: 2px;
	background: var(--c, var(--forest));
}
.key--lg { width: .5em; height: .5em; margin-right: .3em; vertical-align: .18em; border-radius: 3px; }

.cat {
	display: inline-flex; align-items: center; gap: .45em;
	font: 600 .84rem/1.2 var(--sans); color: var(--text); text-decoration: none;
}
a.cat:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--c); text-decoration-thickness: 2px; text-underline-offset: 4px; }

.button, .search__btn, .pager__more {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	min-height: 46px; padding: 0 22px; border-radius: var(--radius);
	background: var(--ink); color: var(--bg); border: 0; cursor: pointer;
	font: 600 1rem/1 var(--sans); text-decoration: none;
}
.button:hover, .search__btn:hover, .pager__more:hover { background: var(--forest); color: #fff; }

/* ---------- Antraštė ---------- */
.masthead {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--bg) 92%, transparent);
	backdrop-filter: saturate(1.4) blur(10px);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	transition: transform .25s ease;
}
.masthead.is-hidden { transform: translateY(-100%); }
.masthead.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.masthead__row { display: flex; align-items: center; gap: 28px; min-height: var(--head-h); }
.brand { display: inline-flex; flex: none; }
.brand__img { display: block; height: 38px; width: auto; }
.brand__img--dark { display: none; }
:root[data-theme="dark"] .brand__img--light { display: none; }
:root[data-theme="dark"] .brand__img--dark { display: block; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .brand__img--light { display: none; }
	:root:not([data-theme="light"]) .brand__img--dark { display: block; }
}

.mainnav__list { list-style: none; display: flex; gap: 4px 22px; flex-wrap: wrap; }
.mainnav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 6px 0; }
.mainnav a:hover, .mainnav .current-menu-item > a { text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 6px; }

.masthead__tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.tool {
	display: inline-flex; align-items: center; gap: 8px;
	height: 40px; padding: 0 12px; border-radius: var(--radius);
	background: transparent; color: var(--ink); border: 1px solid var(--line); cursor: pointer;
	font: 600 .92rem/1 var(--sans);
}
.tool:hover, .tool[aria-expanded="true"] { background: var(--surface); border-color: var(--ink); }
.tool--icon { width: 40px; padding: 0; justify-content: center; }
.tool__sun { display: none; }
:root[data-theme="dark"] .tool__sun { display: inline-flex; }
:root[data-theme="dark"] .tool__moon { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .tool__sun { display: inline-flex; }
	:root:not([data-theme="light"]) .tool__moon { display: none; }
}
.tool--menu { display: none; }

.searchpanel { border-top: 1px solid var(--line); padding: 18px 0 22px; background: var(--bg); }
.search__label { display: block; font-weight: 600; font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.search__row { display: flex; gap: 8px; max-width: 760px; }
.search__input {
	flex: 1; min-width: 0; height: 50px; padding: 0 16px;
	font: 400 1.1rem/1 var(--sans); color: var(--ink);
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.search__input:focus { border-color: var(--forest); outline: 3px solid color-mix(in srgb, var(--forest) 25%, transparent); outline-offset: 0; }
.search__btn { min-height: 50px; }

/* ---------- Turinio spektras ---------- */
.spectrum { padding: 6px 0 18px; }
.spectrum__bar { display: flex; gap: 3px; height: 10px; align-items: stretch; }
.spectrum__seg {
	display: block; min-width: 6px; flex-basis: 0;
	background: var(--c, var(--line)); border-radius: 2px;
	transform-origin: bottom; transition: transform .2s ease, opacity .2s ease;
}
.spectrum__seg--rest { background: var(--line); }
.spectrum__bar:hover .spectrum__seg { opacity: .55; }
.spectrum__bar .spectrum__seg:hover, .spectrum__seg.is-current { opacity: 1; transform: scaleY(1.7); }
.spectrum__legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 12px; }
.spectrum__legend .cat { font-weight: 600; font-size: .9rem; padding: 4px 0; }
.spectrum__legend .cat.is-current { color: var(--ink); box-shadow: inset 0 -3px 0 var(--c); }
.cat__n { font-weight: 400; color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }

/* ---------- Vaizdai ---------- */
.media {
	position: relative; aspect-ratio: 16 / 9; overflow: hidden;
	border-radius: var(--radius); background: var(--soft);
}
.media img, .media .gen-cover { display: block; width: 100%; height: 100%; object-fit: cover; }
.card__media { display: block; }

/* ---------- Kortelės ---------- */
.card { position: relative; }
.card__body { display: flex; flex-direction: column; gap: 8px; }
.card__title { font-weight: 750; line-height: 1.2; letter-spacing: -.005em; text-wrap: pretty; }
.card__title a { color: var(--ink); text-decoration: none; background-image: linear-gradient(var(--amber), var(--amber)); background-size: 0 3px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .25s ease; }
.card__title a:hover, .card__title a:focus-visible { background-size: 100% 3px; }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card .cat { position: relative; z-index: 2; align-self: flex-start; }
.card__dek { color: var(--text); font-size: 1rem; line-height: 1.55; }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: .84rem; color: var(--muted); }
.meta > * + *::before {
	content: ""; display: inline-block; width: 1px; height: .9em; background: var(--line);
	margin-right: 14px; vertical-align: -.1em;
}

/* Pagrindinė */
.card--lead { display: flex; flex-direction: column; gap: 18px; }
.card--lead .card__title { font-size: clamp(1.75rem, 3.2vw, 2.6rem); line-height: 1.1; font-weight: 800; letter-spacing: -.015em; }
.card--lead .card__dek { font-size: 1.1rem; max-width: 62ch; }

/* Plytelė */
.card--tile { display: flex; flex-direction: column; gap: 14px; }
.card--tile .media { aspect-ratio: 16 / 10; }
.card--tile .card__title { font-size: 1.22rem; }

/* Eilutė */
.card--row {
	display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 28px; align-items: start;
	padding: 26px 0; border-top: 1px solid var(--line);
}
.card--row .card__media { order: 2; }
.card--row .media { aspect-ratio: 3 / 2; }
.card--row .card__title { font-size: 1.38rem; }

/* Mini */
.card--mini { padding: 14px 0; border-top: 1px solid var(--line); }
.card--mini .card__title { font-size: 1.05rem; line-height: 1.3; }
.card--mini .cat { display: none; }

/* Reitingas */
.card--rank { display: grid; grid-template-columns: 2.2rem 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.card__rank { font: 800 1.9rem/1 var(--serif); color: var(--amber); font-variant-numeric: lining-nums; }
.card--rank .card__title { font-size: 1.02rem; line-height: 1.3; }

/* ---------- Pradžios puslapis ---------- */
.hero {
	display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 40px;
	padding-top: 14px; padding-bottom: 48px;
}
.hero__side { display: grid; gap: 32px; align-content: start; }

.layout {
	display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px;
	padding-bottom: 64px; align-items: start;
}
.layout__main { min-width: 0; }
.section-title {
	display: flex; align-items: center; gap: 10px;
	font-size: 1.45rem; font-weight: 800; margin-bottom: 6px;
}
.section-title::before {
	content: ""; width: 14px; height: 14px; border-radius: 3px; flex: none;
	background: conic-gradient(var(--amber) 0 38%, var(--forest) 0 74%, var(--red) 0);
}

.rail { position: sticky; top: calc(var(--head-h) + 16px); display: grid; gap: 40px; }
.ranklist { list-style: none; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tags a {
	display: inline-block; padding: 6px 12px; border-radius: 999px;
	background: var(--surface); border: 1px solid var(--line);
	color: var(--text); font-size: .88rem; text-decoration: none;
}
.tags a:hover { border-color: var(--ink); color: var(--ink); }

.topics {
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 56px;
	padding-top: 56px; padding-bottom: 72px; border-top: 1px solid var(--line);
}
.topic { border-top: 5px solid var(--c); padding-top: 16px; }
.topic__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.topic__title { font-size: 1.5rem; font-weight: 800; }
.topic__title a { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: .4em; }
.topic__title .key { width: .5em; height: .5em; }
.topic__title a:hover { text-decoration: underline; text-decoration-color: var(--c); text-underline-offset: 5px; }
.topic__all { font-size: .88rem; font-weight: 600; white-space: nowrap; }
.topic__grid { display: grid; }
.topic .card .cat { display: none; }
.topic__grid > .card--row:first-child { border-top: 0; padding-top: 0; grid-template-columns: minmax(0, 1fr) 180px; gap: 20px; }
.topic__grid > .card--row .card__title { font-size: 1.25rem; }

/* ---------- Puslapio antraštė (archyvai, paieška) ---------- */
.pagehead { padding-top: 18px; padding-bottom: 32px; }
.pagehead__title { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 800; line-height: 1.08; letter-spacing: -.015em; margin-top: 10px; }
.pagehead__title .key { background: var(--c); }
.pagehead__desc { margin-top: 14px; max-width: 70ch; font-size: 1.1rem; color: var(--text); }
.pagehead__desc p + p { margin-top: .7em; }
.pagehead__stat { display: flex; align-items: center; gap: 14px; margin-top: 16px; color: var(--muted); font-size: .95rem; }
.pagehead__search { margin-top: 24px; width: 100%; max-width: 760px; }
.share-bar { flex: none; width: 160px; height: 8px; border-radius: 2px; background: var(--soft); overflow: hidden; }
.share-bar span { display: block; height: 100%; background: var(--c, var(--forest)); border-radius: 2px; }
.pagehead--404 { padding-top: 48px; padding-bottom: 48px; display: grid; gap: 16px; justify-items: start; }
.pagehead__code {
	font: 900 clamp(5rem, 16vw, 10rem)/.9 var(--serif);
	background: linear-gradient(90deg, var(--amber) 0 33%, var(--forest) 33% 66%, var(--red) 66%);
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.empty { padding: 32px 0; color: var(--muted); font-size: 1.05rem; }

/* Naršymo kelias */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: .85rem; color: var(--muted); }
.crumbs li:not(:last-child)::after { content: "/"; margin: 0 .6em; color: var(--line); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* Puslapiavimas */
.pager { display: grid; gap: 20px; justify-items: center; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.pager__more { width: 100%; background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.pager__more:hover { background: var(--ink); color: var(--bg); }
.pager__more[aria-busy="true"] { opacity: .6; cursor: progress; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.nav-links .page-numbers {
	min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px;
	border-radius: var(--radius); color: var(--text); text-decoration: none; font-size: .92rem;
}
.nav-links a.page-numbers:hover { background: var(--surface); }
.nav-links .current { background: var(--ink); color: var(--bg); font-weight: 600; }

/* ---------- Straipsnis ---------- */
.article__head { max-width: calc(1040px + 2 * var(--gut)); padding-top: 18px; padding-bottom: 28px; display: grid; gap: 16px; justify-items: start; }
.article__title { font-size: clamp(2rem, 4.6vw, 3.35rem); font-weight: 800; line-height: 1.08; letter-spacing: -.018em; max-width: 24ch; }
.article--page .article__title { max-width: none; }
.article__dek { font-size: clamp(1.1rem, 1.8vw, 1.3rem); line-height: 1.5; color: var(--text); max-width: 60ch; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: .9rem; color: var(--muted); padding-top: 4px; }
.byline__author { color: var(--ink); font-weight: 600; }
.byline > * + *::before { content: ""; display: inline-block; width: 1px; height: .9em; background: var(--line); margin-right: 18px; vertical-align: -.1em; }

.article__hero { margin: 0 auto 40px; max-width: calc(1140px + 2 * var(--gut)); }
.article__hero .media { aspect-ratio: 16 / 8; }
.article__hero figcaption { margin-top: 10px; font-size: .85rem; color: var(--muted); }

.article__body { max-width: calc(1040px + 2 * var(--gut)); }
.article__body.has-toc { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; align-items: start; }

.toc { position: sticky; top: calc(var(--head-h) + 20px); font-size: .9rem; }
.toc__box summary { cursor: pointer; font-weight: 600; color: var(--ink); padding: 4px 0 10px; list-style: none; display: flex; align-items: center; gap: 8px; }
.toc__box summary::-webkit-details-marker { display: none; }
.toc__box summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); margin-left: auto; transition: transform .2s; }
.toc__box[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.toc__list { list-style: none; border-left: 2px solid var(--line); }
.toc__list a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc__list a:hover { color: var(--ink); }
.toc__list a.is-active { color: var(--ink); font-weight: 600; border-left-color: var(--amber); }

/* Straipsnio tekstas */
.prose { font: 430 1.1875rem/1.75 var(--serif); color: var(--text); max-width: 720px; min-width: 0; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: 1.7rem; line-height: 1.2; margin-top: 2em; font-weight: 800; }
.prose h3 { font-size: 1.32rem; line-height: 1.3; margin-top: 1.7em; font-weight: 750; }
.prose h4 { font-size: 1.1rem; margin-top: 1.5em; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; text-decoration-color: var(--amber); }
.prose strong { font-weight: 700; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--forest); font-weight: 700; }
.prose blockquote { margin-left: 0; margin-right: 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--amber); font-style: italic; color: var(--ink); }
.prose blockquote cite { display: block; margin-top: .5em; font: normal .9rem var(--sans); color: var(--muted); }
.prose img { border-radius: 4px; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figcaption, .prose .wp-element-caption { margin-top: 8px; font: .85rem/1.45 var(--sans); color: var(--muted); }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.prose table { width: 100%; border-collapse: collapse; font: .95rem/1.45 var(--sans); font-variant-numeric: tabular-nums; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--ink); }
.prose .wp-block-table, .prose figure.wp-block-table { overflow-x: auto; }
.prose code { font-size: .88em; background: var(--soft); padding: .1em .35em; border-radius: 3px; }
.prose pre { overflow-x: auto; background: var(--soft); padding: 16px; border-radius: var(--radius); font-size: .9rem; line-height: 1.5; }
.prose .alignwide { max-width: none; }
.prose iframe { max-width: 100%; }
.prose > p:first-child::first-line { font-weight: 600; color: var(--ink); }

.inline-read {
	display: grid; gap: 4px; padding: 16px 20px; margin-block: 1.8em;
	background: var(--surface); border-left: 4px solid var(--forest); border-radius: 0 var(--radius) var(--radius) 0;
}
.inline-read__label { font: 600 .82rem/1.2 var(--sans); color: var(--muted); }
.inline-read a { font: 750 1.12rem/1.3 var(--serif); color: var(--ink); text-decoration: none; }
.inline-read a:hover { text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 2px; }

.page-links { font-family: var(--sans); font-size: .95rem; }

.article__foot { margin-top: 2.6em; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 22px; font-family: var(--sans); }
.article__foot .tags { margin-top: 0; }
.article__foot ul { padding-left: 0; }
.article__foot li + li { margin-top: 0; }
.article__foot li::marker { content: none; }
.share { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.share__label { font-weight: 600; color: var(--ink); font-size: .95rem; }
.share ul { list-style: none; display: flex; gap: 8px; }
.share__btn {
	display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px;
	border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
}
.share__btn:hover { border-color: var(--ink); }
.share__btn.is-done { border-color: var(--forest); color: var(--forest); }

.adjacent {
	display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
	max-width: calc(1040px + 2 * var(--gut)); margin-top: 56px;
}
.adjacent__link {
	display: grid; gap: 6px; padding: 20px 0; border-top: 3px solid var(--ink);
	text-decoration: none; color: var(--ink);
}
.adjacent__link--next { grid-column: 2; text-align: right; }
.adjacent__label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.adjacent__title { font: 750 1.15rem/1.3 var(--serif); }
.adjacent__link:hover .adjacent__title { text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 4px; }

.related { padding-top: 56px; padding-bottom: 72px; }
.related__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 28px; margin-top: 18px; }
.related .card--tile .card__title { font-size: 1.1rem; }

/* ---------- Poraštė ---------- */
.footer { border-top: 1px solid var(--line); background: var(--footer-bg); color: var(--footer-text); padding: 56px 0 28px; font-size: .95rem; }
.footer a { color: #EEF3F0; text-decoration: none; }
.footer a:hover { text-decoration: underline; text-decoration-color: var(--amber); }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1.4fr 1fr; gap: 40px; }
.footer__about { display: grid; gap: 16px; align-content: start; }
.footer__about p { max-width: 38ch; line-height: 1.6; }
.footer .brand__img--light { display: none; }
.footer .brand__img--dark { display: block; }
.footer__title { font: 600 1rem/1.3 var(--sans); color: #fff; margin-bottom: 14px; }
.footer__col ul { list-style: none; display: grid; gap: 9px; }
.footer__col .cat { color: #EEF3F0; font-weight: 400; font-size: .95rem; }
.footer__latest a { line-height: 1.35; display: inline-block; }
.footer__social { list-style: none; display: flex; gap: 8px; }
.footer__social a { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); }
.footer__social a:hover { border-color: var(--amber); }
.footer__base { margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; }

/* ---------- Į viršų (su skaitymo progreso žiedu) ---------- */
.totop {
	position: fixed; right: 20px; bottom: 20px; z-index: 60;
	width: 54px; height: 54px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--surface); color: var(--ink); border: 0; cursor: pointer;
	box-shadow: 0 6px 18px -6px rgba(21, 36, 30, .35), 0 0 0 1px var(--line);
	opacity: 0; transform: translateY(12px); visibility: hidden;
	transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}
.totop.is-visible { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.totop:hover { color: var(--forest); }
.totop__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.totop__track { fill: none; stroke: var(--soft); stroke-width: 3; }
.totop__fill { fill: none; stroke: var(--amber); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: var(--p, 100); }
.totop .icon { position: relative; }
.totop__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- WordPress lygiavimai ---------- */
.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font: .85rem/1.45 var(--sans); color: var(--muted); margin-top: 8px; }
.sticky, .bypostauthor, .gallery-caption { }

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

@media (max-width: 980px) {
	.hero { grid-template-columns: 1fr; gap: 32px; }
	.hero__side { grid-template-columns: 1fr 1fr; gap: 24px; }
	.layout { grid-template-columns: 1fr; gap: 48px; }
	.rail { position: static; grid-template-columns: 1fr 1fr; gap: 40px; }
	.topics { grid-template-columns: 1fr; }
	.article__body.has-toc { grid-template-columns: 1fr; gap: 28px; }
	.toc { position: static; padding: 14px 18px; background: var(--surface); border-radius: var(--radius); }
	.toc__list { margin-bottom: 6px; }
	.prose { margin-inline: auto; }
}

@media (max-width: 860px) {
	:root { --head-h: 62px; }
	.brand__img { height: 32px; }
	.tool__label { display: none; }
	.js-search-toggle { width: 40px; padding: 0; justify-content: center; }
	.tool--menu { display: inline-flex; }
	.mainnav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px var(--gut) 16px; }
	.mainnav.is-open { display: block; }
	.mainnav__list { flex-direction: column; gap: 2px; }
	.mainnav a { display: block; padding: 10px 0; font-size: 1.05rem; }

	.spectrum__legend { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--gut); padding-bottom: 6px; margin-inline: calc(var(--gut) * -1); padding-inline: var(--gut); scrollbar-width: none; }
	.spectrum__legend::-webkit-scrollbar { display: none; }
	.spectrum__legend li { flex: none; scroll-snap-align: start; }
}

@media (max-width: 640px) {
	body { font-size: 1rem; }
	.hero__side { grid-template-columns: 1fr; }
	.rail { grid-template-columns: 1fr; }
	.card--row { grid-template-columns: minmax(0, 1fr) 112px; gap: 16px; padding: 20px 0; }
	.card--row .media { aspect-ratio: 1; }
	.card--row .card__title { font-size: 1.12rem; }
	.card--row .card__dek { display: none; }
	.card--row .meta__read { display: none; }
	.byline { gap: 4px 14px; }
	.byline > * + *::before { display: none; }
	.byline__upd { flex-basis: 100%; order: 5; }
	.article__title { font-size: 1.85rem; }
	.topic__grid > .card--row:first-child { grid-template-columns: minmax(0, 1fr) 112px; }
	.related__grid { grid-template-columns: 1fr; }
	.prose { font-size: 1.125rem; line-height: 1.7; }
	.prose h2 { font-size: 1.45rem; }
	.article__hero .media { aspect-ratio: 16 / 10; border-radius: 0; }
	.article__hero { padding-inline: 0; }
	.article__hero figcaption { padding-inline: var(--gut); }
	.adjacent { grid-template-columns: 1fr; }
	.adjacent__link--next { grid-column: auto; text-align: left; }
	.footer__grid { grid-template-columns: 1fr; gap: 32px; }
	.share-bar { width: 90px; }
	.search__row { flex-direction: column; }
	.totop { right: 14px; bottom: 14px; width: 50px; height: 50px; }
}

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

@media print {
	.masthead, .spectrum, .footer, .totop, .share, .related, .adjacent, .toc, .rail, .pager { display: none !important; }
	body { background: #fff; color: #000; }
	.prose { max-width: none; font-size: 12pt; }
	.prose a::after { content: " (" attr(href) ")"; font-size: .8em; }
}
