/* ==========================================================================
   Socmodelis – pagrindiniai stiliai
   Idėja: vienetų diagramos (Isotype) kalba – kiekviena tema turi spalvą,
   o „vienetas“ (kvadratėlis) žymi temą visoje svetainėje.
   ========================================================================== */

@font-face {
	font-family: "Bitter";
	src: url("../fonts/bitter-var.woff") format("woff");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Bitter";
	src: url("../fonts/bitter-var-italic.woff") format("woff");
	font-weight: 100 900;
	font-style: italic;
	font-display: swap;
}
@font-face {
	font-family: "Bitter Fallback";
	src: local("Georgia"), local("Cambria"), local("Times New Roman");
	size-adjust: 104%;
	ascent-override: 90%;
	descent-override: 24%;
	line-gap-override: 0%;
}

:root {
	--paper: #f1f3f6;
	--surface: #ffffff;
	--ink: #18202b;
	--ink-2: #4a5568;
	--line: #d8dde6;
	--brand: #2340c8;
	--brand-hover: #1a2f96;
	--amber: #f2a900;
	--band: #fbf3df;
	--footer: #18202b;
	--footer-ink: #e7ecf3;
	--cat: var(--brand);

	--serif: "Bitter", "Bitter Fallback", Georgia, "Times New Roman", serif;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	--wrap: 1200px;
	--gutter: clamp(16px, 4vw, 32px);
	--header-h: 64px;
	--r-media: 6px;
	--r-ui: 4px;

	color-scheme: light;
}

[data-theme="dark"] {
	--paper: #0f1622;
	--surface: #162033;
	--ink: #e7ecf3;
	--ink-2: #a8b2c3;
	--line: #28344a;
	--brand: #8fa6ff;
	--brand-hover: #b5c4ff;
	--band: #1b2436;
	--footer: #0a0f18;
	--footer-ink: #cfd7e3;
	color-scheme: dark;
}

/* ---------- Pagrindai ---------- */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: 24px;
}

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

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

a { color: inherit; }

h1, h2, h3, h4 {
	font-family: var(--serif);
	line-height: 1.18;
	margin: 0;
	text-wrap: balance;
	letter-spacing: -0.01em;
}

p { margin: 0; }

button { font: inherit; color: inherit; }

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

.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-link {
	position: absolute;
	left: 12px;
	top: -100px;
	z-index: 1000;
	background: var(--ink);
	color: var(--paper);
	padding: 10px 16px;
	border-radius: var(--r-ui);
	text-decoration: none;
	font-weight: 600;
}
.skip-link:focus { top: 12px; }

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

/* Vienetas – visos svetainės ženklas */
.unit {
	display: inline-block;
	flex: none;
	width: 0.62em;
	height: 0.62em;
	margin-right: 0.5em;
	border-radius: 2px;
	background: var(--cat);
	vertical-align: 0.02em;
}
.unit--lg { width: 0.5em; height: 0.5em; vertical-align: 0.12em; }

.meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	color: var(--ink-2);
	font-family: var(--sans);
	font-size: 0.8125rem;
	line-height: 1.4;
}

.chip {
	display: inline-flex;
	align-items: center;
	position: relative;
	z-index: 2;
	color: var(--ink-2);
	font-family: var(--sans);
	font-size: 0.8125rem;
	font-weight: 600;
	text-decoration: none;
	line-height: 1.3;
}
.chip:hover { color: var(--ink); }
.chip--solid {
	padding: 7px 12px;
	border: 1px solid var(--line);
	border-radius: var(--r-ui);
	background: var(--surface);
	color: var(--ink);
}
.chip--solid:hover { border-color: var(--cat); }

.chip-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 20px 0 0;
	padding: 0;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 10px 22px;
	border: 0;
	border-radius: var(--r-ui);
	background: var(--ink);
	color: var(--paper);
	font-family: var(--sans);
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}
.btn:hover { background: var(--brand); color: #fff; }

.icon-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 44px;
	min-height: 44px;
	justify-content: center;
	padding: 0 10px;
	border: 1px solid transparent;
	border-radius: var(--r-ui);
	background: transparent;
	color: var(--ink);
	cursor: pointer;
}
.icon-btn:hover { border-color: var(--line); background: var(--surface); }
.icon-btn__label { font-size: 0.875rem; font-weight: 600; }

/* ---------- Skaitymo progresas ---------- */

.progress {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 120;
	height: 3px;
	pointer-events: none;
}
.progress__bar {
	display: block;
	height: 100%;
	background: var(--amber);
	transform-origin: 0 50%;
	transform: scaleX(0);
}

/* ---------- Antraštė ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--paper);
	border-bottom: 1px solid var(--line);
	transition: transform 0.25s ease;
}
.site-header.is-hidden { transform: translateY(calc(-100% + 0px)); }

.topbar {
	border-bottom: 1px solid var(--line);
	font-size: 0.8125rem;
	color: var(--ink-2);
}
.topbar__inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	min-height: 34px;
	gap: 16px;
}
.topbar__date::first-letter { text-transform: uppercase; }
.topbar__random {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	font-weight: 600;
	color: var(--ink);
}
.topbar__random .icon { width: 15px; height: 15px; color: var(--brand); }
.topbar__random:hover span { text-decoration: underline; text-underline-offset: 3px; }

.masthead {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: var(--header-h);
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--ink);
	text-decoration: none;
}
.brand__mark { color: var(--brand); flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
	font-family: var(--serif);
	font-weight: 800;
	font-size: 1.65rem;
	letter-spacing: -0.02em;
}
.brand__sub {
	margin-top: 4px;
	font-size: 0.75rem;
	color: var(--ink-2);
	letter-spacing: 0.01em;
}
.brand__custom { max-height: 48px; width: auto; }

.masthead__actions { display: flex; align-items: center; gap: 4px; }

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

/* Temų juosta */
.topics { position: relative; }
.topics__list {
	display: flex;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
	mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.topics__list::-webkit-scrollbar { display: none; }
.topics__list li { flex: none; }
.topics__list a {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 0 12px 0 0;
	margin-right: 10px;
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	color: var(--ink);
	border-bottom: 3px solid transparent;
	white-space: nowrap;
}
.topics__list a:hover,
.topics__list a[aria-current="page"] { border-bottom-color: var(--cat); }

/* ---------- Paieškos langas ---------- */

.search-dialog {
	width: min(760px, calc(100% - 24px));
	max-height: calc(100vh - 48px);
	margin: 8vh auto auto;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: var(--surface);
	color: var(--ink);
	box-shadow: 0 24px 60px rgba(10, 16, 30, 0.35);
}
.search-dialog::backdrop { background: rgba(15, 22, 34, 0.55); }
.search-dialog__inner { position: relative; padding: 28px 24px 20px; }
.search-close { position: absolute; top: 6px; right: 6px; }
.search-dialog__results { margin-top: 14px; }
.search-dialog__results ul { list-style: none; margin: 0; padding: 0; }
.search-dialog__results li + li { border-top: 1px solid var(--line); }
.search-dialog__results a {
	display: block;
	padding: 12px 4px;
	font-family: var(--serif);
	font-weight: 650;
	text-decoration: none;
}
.search-dialog__results a:hover { color: var(--brand); }
.search-dialog__results p { color: var(--ink-2); font-size: 0.875rem; padding: 8px 4px; }

.search-form {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 6px 6px 14px;
	border: 2px solid var(--ink);
	border-radius: 6px;
	background: var(--surface);
}
.search-form > .icon { color: var(--ink-2); flex: none; }
.search-form__input {
	flex: 1;
	min-width: 0;
	min-height: 44px;
	border: 0;
	background: transparent;
	color: var(--ink);
	font: 500 1.0625rem/1.3 var(--sans);
}
.search-form__input:focus { outline: none; }
.search-form:focus-within { border-color: var(--brand); }
.search-form__submit {
	min-height: 44px;
	padding: 0 18px;
	border: 0;
	border-radius: var(--r-ui);
	background: var(--brand);
	color: #fff;
	font-weight: 700;
	cursor: pointer;
}
[data-theme="dark"] .search-form__submit { color: #0f1622; }

/* ---------- Kortelės ---------- */

.card { position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	border-radius: var(--r-media);
	background: color-mix(in srgb, var(--cat) 9%, var(--surface));
}
.card__img,
.card__media > img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.cover-art { display: block; width: 100%; height: 100%; }

.card__body { display: flex; flex-direction: column; gap: 8px; }
.card__title {
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.25;
}
.card__title a { text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card:hover .card__title a {
	text-decoration: underline;
	text-decoration-color: var(--cat);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}
.card__excerpt {
	color: var(--ink-2);
	font-size: 0.9375rem;
	line-height: 1.55;
}

/* Pagrindinė */
.card--lead { gap: 0; }
.card--lead .card__media { aspect-ratio: 3 / 2; border-radius: var(--r-media) var(--r-media) 0 0; }
.card--lead .card__body {
	gap: 12px;
	padding: 24px 0 0;
}
.card--lead .card__title {
	font-size: clamp(1.75rem, 3.3vw, 2.75rem);
	font-weight: 780;
	line-height: 1.1;
	letter-spacing: -0.02em;
}
.card--lead .card__excerpt {
	font-family: var(--serif);
	font-size: 1.125rem;
	line-height: 1.6;
	max-width: 62ch;
}

/* Eilutė (mažas paveikslėlis dešinėje) */
.card--row {
	display: grid;
	grid-template-columns: 1fr 104px;
	gap: 16px;
	align-items: start;
	padding: 18px 0;
	border-top: 1px solid var(--line);
}
.card--row .card__media { order: 2; aspect-ratio: 4 / 3; border-radius: 4px; }
.card--row .card__body { gap: 6px; }
.card--row .card__title { font-size: 1.0625rem; line-height: 1.3; }

/* Plati kortelė archyve */
.card--wide { grid-column: 1 / -1; }
@media (min-width: 820px) {
	.card--wide { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; }
	.card--wide .card__media { aspect-ratio: 16 / 9; }
	.card--wide .card__title { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 760; }
	.card--wide .card__excerpt { font-family: var(--serif); font-size: 1.0625rem; }
}

/* ---------- Tinkleliai ---------- */

.grid { display: grid; gap: 40px 28px; }
@media (min-width: 640px) {
	.grid--3,
	.grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 980px) {
	.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
	.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.block { padding-block: clamp(40px, 6vw, 72px) 0; }

.section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 28px;
	padding-top: 14px;
	border-top: 3px solid var(--ink);
}
.section-head__title { font-size: clamp(1.4rem, 2.4vw, 1.75rem); font-weight: 760; }
.section-head__title .unit { width: 0.5em; height: 0.5em; vertical-align: 0.1em; }
.section-head__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--brand);
	text-decoration: none;
}
.section-head__more:hover { text-decoration: underline; text-underline-offset: 3px; }
.section-head__more .icon { width: 16px; height: 16px; }

/* ---------- Pradinis: pagrindinė tema ---------- */

.lead {
	display: grid;
	gap: 32px;
	padding-top: clamp(24px, 4vw, 44px);
}
@media (min-width: 900px) {
	.lead { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 48px; }
	.lead__side { padding-left: 32px; border-left: 1px solid var(--line); }
}
.lead__side .card--row:first-child { border-top: 0; padding-top: 0; }

/* ---------- Temų žemėlapis (išskirtinis elementas) ---------- */

.topic-map {
	margin-top: clamp(44px, 6vw, 72px);
	background: var(--surface);
	border-block: 1px solid var(--line);
}
.topic-map__inner {
	display: grid;
	gap: 28px;
	padding-block: clamp(36px, 5vw, 60px);
}
@media (min-width: 900px) {
	.topic-map__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 56px; }
}
.topic-map__title {
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -0.025em;
}
.topic-map__legend {
	display: flex;
	align-items: baseline;
	margin-top: 16px;
	max-width: 34ch;
	color: var(--ink-2);
	font-size: 0.9375rem;
}
.topic-map__legend .unit { --cat: var(--ink-2); flex: none; }

.topic-map__rows { list-style: none; margin: 0; padding: 0; }
.topic-map__rows li + li { border-top: 1px dashed var(--line); }
.topic-map__rows a {
	display: grid;
	grid-template-columns: minmax(110px, 13rem) 1fr auto;
	align-items: center;
	gap: 16px;
	padding: 11px 0;
	text-decoration: none;
}
.topic-map__name { font-family: var(--serif); font-weight: 700; font-size: 1.0625rem; line-height: 1.25; }
.topic-map__count { color: var(--ink-2); font-size: 0.8125rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.topic-map__units { display: flex; flex-wrap: wrap; gap: 4px; }
.topic-map__units i {
	display: block;
	width: 13px;
	height: 13px;
	border-radius: 2px;
	background: var(--cat);
}
.topic-map__rows a:hover .topic-map__name { text-decoration: underline; text-decoration-color: var(--cat); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.topic-map__rows a:hover .topic-map__units i { filter: brightness(1.15); }

/* Vienkartinė animacija: vienetai „prisipildo“, kai žemėlapis pasirodo */
.js .topic-map.is-pending .topic-map__units i { opacity: 0; transform: scale(0.4); }
.js .topic-map .topic-map__units i {
	transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.3, 1.4, 0.5, 1);
	transition-delay: calc(var(--i, 0) * 18ms + var(--row, 0) * 60ms);
}

@media (max-width: 640px) {
	.topic-map__rows a { grid-template-columns: 1fr auto; gap: 6px 12px; }
	.topic-map__units { grid-column: 1 / -1; grid-row: 2; }
	.topic-map__units i { width: 10px; height: 10px; }
}

/* ---------- Temų blokai ---------- */

.topic-block .section-head { border-top-color: var(--cat); }
.topic-block__grid { display: grid; gap: 28px; }
@media (min-width: 900px) {
	.topic-block__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; }
	.topic-block--flip .card--feature { order: 2; }
	.topic-block__list .card--row:first-child { border-top: 0; padding-top: 0; }
}
.topic-block .chip { display: none; }
.card--feature .card__title { font-size: clamp(1.35rem, 2.2vw, 1.75rem); font-weight: 750; }

/* ---------- Iš archyvo ---------- */

.archive-band {
	margin-top: clamp(48px, 7vw, 88px);
	padding-block: clamp(36px, 5vw, 56px);
	background: var(--band);
}
.archive-band .section-head { margin-bottom: 8px; --cat: var(--amber); }
.archive-band__lede { color: var(--ink-2); margin-bottom: 28px; max-width: 60ch; }

/* ---------- Populiariausi ---------- */

.ranked {
	counter-reset: rank;
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0 40px;
}
@media (min-width: 900px) { .ranked { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ranked li {
	counter-increment: rank;
	display: grid;
	grid-template-columns: 3.2rem 1fr;
	gap: 4px 12px;
	padding: 16px 0;
	border-top: 1px solid var(--line);
}
.ranked li::before {
	content: counter(rank);
	grid-row: span 2;
	font-family: var(--serif);
	font-weight: 800;
	font-size: 2.4rem;
	line-height: 1;
	color: var(--brand);
	font-variant-numeric: lining-nums;
}
.ranked a { font-family: var(--serif); font-weight: 700; font-size: 1.125rem; line-height: 1.3; text-decoration: none; }
.ranked a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Puslapiavimas ---------- */

.pager { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: 48px; }
.pager__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pager .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid var(--line);
	border-radius: var(--r-ui);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9375rem;
	background: var(--surface);
}
.pager .page-numbers.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pager a.page-numbers:hover { border-color: var(--brand); color: var(--brand); }
.pager .dots { border: 0; background: none; }
.pager__more[aria-busy="true"] { opacity: 0.6; pointer-events: none; }
.more-wrap { margin-top: 40px; text-align: center; }

/* ---------- Archyvo / paieškos antraštė ---------- */

.page-head { padding-top: clamp(24px, 4vw, 44px); }
.page-head__title {
	font-size: clamp(2rem, 5vw, 3.4rem);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.025em;
	margin-top: 12px;
}
.page-head__desc {
	margin-top: 14px;
	max-width: 68ch;
	font-family: var(--serif);
	font-size: 1.125rem;
	line-height: 1.6;
	color: var(--ink-2);
}
.page-head__desc p + p { margin-top: 0.8em; }
.page-head__count { margin-top: 12px; color: var(--ink-2); font-size: 0.875rem; }
.page-head__search { margin-top: 22px; max-width: 640px; }
.page-head--404 { padding-bottom: 8px; }
.empty { padding: 24px 0; color: var(--ink-2); font-size: 1.0625rem; }

/* Duonos trupiniai */
.crumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.8125rem;
	color: var(--ink-2);
}
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--line); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; color: var(--ink); }
.crumbs li:last-child span {
	display: inline-block;
	max-width: 36ch;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	vertical-align: bottom;
}

/* ---------- Straipsnis ---------- */

.article-head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	padding-top: clamp(20px, 3vw, 36px);
}
.article-head > * { max-width: 960px; }
@media (min-width: 1100px) {
	.article-head { padding-left: calc(var(--gutter) + 92px); }
}
.article-head .crumbs { margin-bottom: 8px; }
.article-head__title {
	font-size: clamp(2rem, 4.6vw, 3.25rem);
	font-weight: 780;
	line-height: 1.08;
	letter-spacing: -0.022em;
}
.article-head__dek {
	font-family: var(--serif);
	font-size: clamp(1.125rem, 1.8vw, 1.3rem);
	line-height: 1.55;
	color: var(--ink-2);
	max-width: 62ch;
}
.article-head__meta { font-size: 0.875rem; }
.byline { color: var(--ink); font-weight: 600; }

.article-hero { margin: clamp(24px, 3vw, 36px) auto 0; max-width: 1200px; }
.article-hero__img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	max-height: 600px;
	object-fit: cover;
	border-radius: var(--r-media);
	background: var(--surface);
}
.article-hero figcaption { margin-top: 10px; font-size: 0.8125rem; color: var(--ink-2); }

.article-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px;
	padding-top: clamp(28px, 4vw, 48px);
}
@media (min-width: 1100px) {
	.article-layout { grid-template-columns: 60px minmax(0, 720px) 1fr; }
	.article-layout .article-body { grid-column: 2; grid-row: 1; }
	.article-layout .share { grid-column: 1; grid-row: 1; }
	.article-layout.has-toc { grid-template-columns: 60px minmax(0, 720px) minmax(220px, 1fr); }
	.article-layout.has-toc .toc { grid-column: 3; grid-row: 1; }
}

/* Turinio planas */
.toc__box {
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--surface);
	padding: 4px 16px;
}
.toc summary {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	font-weight: 700;
	font-size: 0.9375rem;
	cursor: pointer;
	list-style: none;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary .icon { color: var(--cat); }
.toc__list { list-style: none; margin: 0 0 10px; padding: 0; counter-reset: toc; }
.toc__list li { border-top: 1px solid var(--line); }
.toc__list a {
	display: block;
	padding: 8px 0 8px 12px;
	border-left: 3px solid transparent;
	font-size: 0.875rem;
	line-height: 1.4;
	color: var(--ink-2);
	text-decoration: none;
}
.toc__l3 a { padding-left: 26px; font-size: 0.8125rem; }
.toc__list a:hover { color: var(--ink); }
.toc__list a.is-active { color: var(--ink); font-weight: 600; border-left-color: var(--cat); }
@media (min-width: 1100px) {
	.toc { position: sticky; top: 168px; align-self: start; max-height: calc(100vh - 190px); overflow: auto; }
	.toc summary { pointer-events: none; }
}

/* Dalinimasis */
.share__label { font-size: 0.8125rem; font-weight: 700; color: var(--ink-2); margin-bottom: 10px; }
.share__list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.share__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid var(--line);
	border-radius: var(--r-ui);
	background: var(--surface);
	color: var(--ink);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}
.share__btn:hover { border-color: var(--ink); }
.share__btn.is-done { border-color: var(--cat); color: var(--cat); }
@media (min-width: 1100px) {
	.share { position: sticky; top: 168px; align-self: start; }
	.share__label { writing-mode: vertical-rl; transform: rotate(180deg); margin: 0 auto 12px; }
	.share__list { flex-direction: column; align-items: center; }
	.share__btn { width: 44px; padding: 0; justify-content: center; }
	.share__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
}
@media (max-width: 1099px) {
	.article-layout .share { order: 3; padding-top: 24px; border-top: 1px solid var(--line); }
}

/* Straipsnio tekstas */
.prose {
	font-family: var(--serif);
	font-size: 1.15rem;
	line-height: 1.75;
	color: var(--ink);
	overflow-wrap: break-word;
	min-width: 0;
}
.prose > * + * { margin-top: 1.15em; }
.prose p,
.prose ul,
.prose ol { margin-bottom: 0; }
.prose h2,
.prose h3,
.prose h4 { scroll-margin-top: 150px; }
.prose h2 { font-size: 1.65rem; font-weight: 750; margin-top: 2em; line-height: 1.22; }
.prose h3 { font-size: 1.3rem; font-weight: 700; margin-top: 1.7em; }
.prose h4 { font-size: 1.1rem; font-weight: 700; margin-top: 1.5em; }
.prose > h2 + *,
.prose > h3 + * { margin-top: 0.6em; }
.prose a {
	color: var(--brand);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
.prose a:hover { text-decoration-thickness: 2px; color: var(--brand-hover); }
.prose strong { font-weight: 700; }
.prose ul,
.prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }
.prose ul li::marker { color: var(--cat); }
.prose ol li::marker { color: var(--ink-2); font-weight: 700; }
.prose blockquote,
.prose .wp-block-quote {
	margin-inline: 0;
	padding: 4px 0 4px 22px;
	border-left: 4px solid var(--cat);
	font-size: 1.25rem;
	font-style: italic;
}
.prose blockquote cite { display: block; margin-top: 8px; font-size: 0.9rem; font-style: normal; color: var(--ink-2); }
.prose figure { margin-inline: 0; }
.prose img { border-radius: 4px; }
.prose figcaption,
.prose .wp-caption-text { margin-top: 8px; font-family: var(--sans); font-size: 0.8125rem; color: var(--ink-2); }
.prose .wp-caption { max-width: 100%; }
.prose hr { border: 0; height: 1px; background: var(--line); margin-block: 2.4em; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 0.9375rem; line-height: 1.45; }
.prose th,
.prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--surface); font-weight: 700; }
.prose .wp-block-table,
.prose .table-scroll { overflow-x: auto; }
.prose code { font-size: 0.9em; padding: 2px 5px; background: var(--surface); border-radius: 3px; }
.prose iframe { max-width: 100%; }
.prose .alignleft { float: left; margin: 0.3em 1.4em 1em 0; max-width: 50%; }
.prose .alignright { float: right; margin: 0.3em 0 1em 1.4em; max-width: 50%; }
.prose .aligncenter { margin-inline: auto; display: block; }
.prose .wp-block-button__link { background: var(--ink); color: var(--paper); text-decoration: none; border-radius: var(--r-ui); }
.prose::after { content: ""; display: table; clear: both; }
/* Ištrintų įskiepių blokų likučiai neturi išeiti už teksto ribų */
.prose [class*="blockspare"],
.prose [class*="elespare"] { max-width: 100%; }

/* „Taip pat skaitykite“ */
.inline-read {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-block: 1.8em;
	padding: 16px 20px;
	border-left: 4px solid var(--cat);
	background: var(--surface);
	border-radius: 0 6px 6px 0;
}
.inline-read__label { font-family: var(--sans); font-size: 0.8125rem; font-weight: 700; color: var(--ink-2); }
.prose .inline-read a { color: var(--ink); font-weight: 700; text-decoration: none; line-height: 1.35; font-size: 1.125rem; }
.prose .inline-read a:hover { text-decoration: underline; text-decoration-color: var(--cat); }

.page-links { font-family: var(--sans); font-weight: 600; }

/* Straipsnio apačia */
.article-foot { max-width: 880px; padding-top: 40px; }
@media (min-width: 1100px) {
	.article-foot { padding-left: calc(var(--gutter) + 92px); max-width: calc(720px + 92px + var(--gutter) * 2); margin-left: max(0px, calc((100% - var(--wrap)) / 2)); }
}
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 32px; padding: 0; }
.tag-list a {
	display: inline-block;
	padding: 6px 12px;
	border-radius: var(--r-ui);
	background: var(--surface);
	border: 1px solid var(--line);
	font-size: 0.875rem;
	text-decoration: none;
	color: var(--ink-2);
}
.tag-list a:hover { color: var(--ink); border-color: var(--ink); }

.post-nav { display: grid; gap: 16px; }
@media (min-width: 700px) { .post-nav { grid-template-columns: 1fr 1fr; } }
.post-nav__link {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 18px 20px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--surface);
	text-decoration: none;
}
.post-nav__link--next { text-align: right; grid-column: -2; }
.post-nav__label { font-size: 0.8125rem; color: var(--ink-2); font-weight: 600; }
.post-nav__title { font-family: var(--serif); font-weight: 700; line-height: 1.3; }
.post-nav__link:hover { border-color: var(--ink); }

.related {
	margin-top: clamp(48px, 7vw, 80px);
	padding-block: clamp(36px, 5vw, 56px);
	background: var(--surface);
	border-top: 1px solid var(--line);
}
.related .section-head { border-top-color: var(--cat); }

/* „Skaitykite toliau“ iššokantis langelis */
.next-up {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 90;
	width: min(360px, calc(100% - 96px));
	padding: 16px 44px 16px 18px;
	border-left: 4px solid var(--cat);
	border-radius: 6px;
	background: var(--surface);
	box-shadow: 0 14px 40px rgba(10, 16, 30, 0.22);
	transform: translateY(calc(100% + 24px));
	transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.next-up.is-visible { transform: none; }
.next-up__label { display: block; font-size: 0.75rem; font-weight: 700; color: var(--ink-2); margin-bottom: 4px; }
.next-up__link {
	display: block;
	font-family: var(--serif);
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	margin-bottom: 6px;
}
.next-up__link:hover { text-decoration: underline; text-decoration-color: var(--cat); }
.next-up__close { position: absolute; top: 4px; right: 4px; }

/* Komentarai */
.comments-wrap { max-width: 880px; padding-top: 48px; }
.comments__list { list-style: none; padding: 0; }
.comments__list .comment-body { padding: 16px 0; border-top: 1px solid var(--line); }

/* ---------- Mygtukas „Į viršų“ ---------- */

.to-top {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 95;
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--surface);
	color: var(--ink);
	box-shadow: 0 6px 20px rgba(10, 16, 30, 0.18);
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--ink); color: var(--paper); }
.to-top .icon { position: relative; }
.to-top__ring {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}
.to-top__ring circle {
	fill: none;
	stroke: var(--amber);
	stroke-width: 3;
	stroke-dasharray: 100;
	stroke-dashoffset: calc(100 - var(--p, 0));
}

/* ---------- Poraštė ---------- */

.site-main { padding-bottom: clamp(56px, 8vw, 96px); }
.site-main:has(> .related),
.site-main:has(> .archive-band:last-of-type) { padding-bottom: 0; }
.site-footer {
	background: var(--footer);
	color: var(--footer-ink);
	font-size: 0.9375rem;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-footer__grid {
	display: grid;
	gap: 36px;
	padding-block: 56px 40px;
}
@media (min-width: 800px) {
	.site-footer__grid { grid-template-columns: 1.3fr 1fr 1.5fr; gap: 48px; }
	.site-footer__grid:has(> :nth-child(4)) { grid-template-columns: 1.3fr 1fr 1.5fr 1fr; }
}
.site-footer .brand { color: #fff; margin-bottom: 18px; }
.site-footer .brand__mark { color: #8fa6ff; }
.site-footer .brand__sub { color: #a8b2c3; }
.site-footer__about p { max-width: 42ch; line-height: 1.6; color: #c3ccd9; }
.site-footer__social { display: flex; gap: 16px; margin-top: 16px; }
.site-footer__social a { display: inline-flex; align-items: center; gap: 6px; }
.site-footer__title { font-family: var(--sans); font-size: 0.875rem; font-weight: 700; color: #fff; margin-bottom: 14px; letter-spacing: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 10px; }
.site-footer li a { color: #c3ccd9; line-height: 1.4; }
.site-footer li a:hover { color: #fff; }
.site-footer__bottom::before {
	content: "";
	position: absolute;
	top: 0;
	left: var(--gutter);
	right: var(--gutter);
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	position: relative;
	padding-block: 20px 28px;
	font-size: 0.8125rem;
	color: #a8b2c3;
}

/* ---------- Mažesni ekranai ---------- */

@media (max-width: 640px) {
	:root { --header-h: 56px; }
	.brand__name { font-size: 1.4rem; }
	.brand__sub { display: none; }
	.brand__mark { width: 26px; height: 34px; }
	.icon-btn__label { display: none; }
	.topbar__random span { display: none; }
	.topbar__random::after { content: "Atsitiktinis"; }
	.card--row { grid-template-columns: 1fr 88px; }
	.prose { font-size: 1.0625rem; line-height: 1.72; }
	.article-head__title { line-height: 1.12; }
	.card--lead .card__title { line-height: 1.14; }
	.to-top { width: 48px; height: 48px; right: 12px; bottom: 12px; }
	.next-up { left: 12px; bottom: 12px; }
	.crumbs li:last-child { display: none; }
	.crumbs li:nth-last-child(2)::after { content: none; }
}

/* ---------- Judesys ---------- */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		transition-delay: 0s !important;
		animation-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

/* ---------- Spausdinimas ---------- */

@media print {
	.site-header,
	.site-footer,
	.share,
	.toc,
	.related,
	.next-up,
	.to-top,
	.progress,
	.inline-read { display: none !important; }
	body { background: #fff; color: #000; }
	.prose { font-size: 12pt; }
}
