/*
Theme Name: Piratų naujienos
Theme URI: https://piratupartija.lt/
Author: Piratų naujienos
Description: Jūrlapio stiliaus naujienų portalo tema. Veikia be papildomų įskiepių: SEO meta žymės, Open Graph, schema.org (NewsArticle, BreadcrumbList, WebSite), automatinis turinio planas, susiję įrašai, skaitymo progresas, naktinis režimas, mygtukas „Į viršų“ ir senų /node/ nuorodų nukreipimas. Be jokių užklausos formų.
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: piratu-naujienos
Tags: news, blog, two-columns, custom-menu, featured-images, translation-ready, accessibility-ready
*/

/* ==========================================================================
   Šriftai (OFL licencija, laikomi temoje – jokių išorinių užklausų)
   ========================================================================== */
@font-face {
	font-family: "Bitter";
	src: url("assets/fonts/bitter-var.woff") format("woff");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Fira Sans";
	src: url("assets/fonts/fira-400.woff") format("woff");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Fira Sans";
	src: url("assets/fonts/fira-400i.woff") format("woff");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}
@font-face {
	font-family: "Fira Sans";
	src: url("assets/fonts/fira-600.woff") format("woff");
	font-weight: 600 700;
	font-style: normal;
	font-display: swap;
}

/* ==========================================================================
   Žetonai: jūrlapio spalvos
   ========================================================================== */
:root {
	--water: #eef4f5;     /* gilus vanduo – fonas */
	--shoal: #d8e9ef;     /* sekluma – skydeliai */
	--land: #efdfac;      /* sausuma – pažymėjimai */
	--ink: #0e2a3b;       /* jūrlapio rašalas */
	--ink-2: #3f5868;     /* antrinis tekstas */
	--magenta: #a3146e;   /* nuorodos (kontrastas AA) */
	--route: #e0399b;     /* maršruto linija – dekoratyvi */
	--contour: #9dbccb;   /* gylio izolinijos */
	--line: #c8dae2;
	--surface: #f7fafb;

	--foot-bg: #0e2a3b;
	--foot-ink: #e4eef2;
	--foot-ink-2: #a9c3cf;
	--foot-line: #23465b;

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

	--wrap: 1240px;
	--gutter: clamp(16px, 4vw, 40px);
	--radius: 6px;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--water: #061420;
		--shoal: #0c2232;
		--land: #3a3220;
		--ink: #dce9ef;
		--ink-2: #9fb7c4;
		--magenta: #ff86cf;
		--route: #ff5fbf;
		--contour: #1f3e52;
		--line: #1c3547;
		--surface: #0a1c2a;
		--foot-bg: #030c14;
		--foot-line: #15303f;
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--water: #061420;
	--shoal: #0c2232;
	--land: #3a3220;
	--ink: #dce9ef;
	--ink-2: #9fb7c4;
	--magenta: #ff86cf;
	--route: #ff5fbf;
	--contour: #1f3e52;
	--line: #1c3547;
	--surface: #0a1c2a;
	--foot-bg: #030c14;
	--foot-line: #15303f;
	color-scheme: dark;
}

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

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

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

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

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

h1, h2, h3, h4, h5, h6 {
	font-family: var(--f-head);
	font-weight: 700;
	line-height: 1.15;
	margin: 0;
	text-wrap: balance;
}

p { margin: 0; }

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

::selection { background: var(--land); color: #0e2a3b; }

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

.sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
	margin: -1px;
	padding: 0;
}

.skip {
	position: absolute;
	left: 12px;
	top: -100px;
	z-index: 100;
	background: var(--ink);
	color: var(--water);
	padding: 10px 16px;
	border-radius: var(--radius);
	text-decoration: none;
}
.skip:focus { top: 12px; }

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

/* Bujos ženklas – kategorijos identitetas */
.buoy {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--ink);
	text-decoration: none;
}
.buoy::before,
.chips a::before,
.section-title--buoy::before,
.foot-topics a::before {
	content: "";
	flex: none;
	width: 0.55em;
	height: 0.55em;
	background: var(--buoy, var(--route));
	transform: rotate(45deg);
	border-radius: 1px;
}
a.buoy:hover { color: var(--magenta); }

/* Mygtukas */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.7em 1.3em;
	border: 2px solid var(--ink);
	border-radius: 999px;
	font-weight: 600;
	text-decoration: none;
	color: var(--ink);
	background: transparent;
	transition: background-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--ink); color: var(--water); }

/* ==========================================================================
   Antraštė
   ========================================================================== */
.progress {
	position: fixed;
	inset: 0 0 auto 0;
	height: 3px;
	z-index: 60;
	pointer-events: none;
}
.progress-bar {
	display: block;
	height: 100%;
	background: var(--route);
	transform-origin: 0 50%;
	transform: scaleX(var(--p, 0));
}

.bar {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 40px;
	font-size: 0.875rem;
	color: var(--ink-2);
}
.bar-date::first-letter { text-transform: uppercase; }
.bar-count { margin-right: auto; }
.bar-count strong { color: var(--ink); font-weight: 600; }

.theme-toggle,
.search-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	font: inherit;
	color: var(--ink);
	background: none;
	border: 0;
	padding: 6px 2px;
	cursor: pointer;
}
.theme-toggle svg,
.search-toggle svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
}
.theme-toggle svg path { fill: currentColor; stroke: none; }
.theme-toggle:hover,
.search-toggle:hover { color: var(--magenta); }

.mast {
	display: flex;
	align-items: center;
	gap: 20px;
	padding-block: 18px 20px;
	border-top: 1px solid var(--line);
}
.brand { margin: 0; font-size: inherit; line-height: 1; }
.brand a {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	text-decoration: none;
	color: var(--ink);
}
.brand-mark { width: 52px; height: 52px; flex: none; }
.brand-name {
	font-family: var(--f-head);
	font-weight: 800;
	font-size: clamp(1.65rem, 1.1rem + 2.2vw, 2.5rem);
	letter-spacing: -0.02em;
	line-height: 1;
}
.mark-disc { fill: #0e2a3b; }
.mark-ring { fill: none; stroke: #7fa6b8; stroke-width: 1.6; stroke-dasharray: 2.2 3.2; }
.mark-star { fill: #eef4f5; }
.mark-north { fill: #e0399b; }

.tagline {
	margin-left: auto;
	max-width: 34ch;
	text-align: right;
	font-size: 0.95rem;
	color: var(--ink-2);
	font-style: italic;
}
.search-toggle {
	margin-left: 8px;
	padding: 10px 16px;
	border: 2px solid var(--ink);
	border-radius: 999px;
	font-weight: 600;
}
.tagline + .search-toggle { margin-left: 8px; }
.mast > .brand + .search-toggle { margin-left: auto; }

.topics {
	border-block: 1px solid var(--line);
	background: var(--surface);
}
.topics-inner { position: relative; }
.chips {
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 10px 0;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chips li { flex: none; scroll-snap-align: start; }
.chips a {
	display: inline-flex;
	align-items: center;
	gap: 0.55em;
	padding: 7px 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--water);
	font-size: 0.94rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.chips a:hover { border-color: var(--ink); }
.chips .current-menu-item a,
.chips .current-cat a,
.chips a[aria-current="page"] {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--water);
}

.search-panel {
	padding-block: 18px;
	border-bottom: 1px solid var(--line);
	background: var(--surface);
}
.search {
	display: flex;
	gap: 8px;
	max-width: 720px;
}
.search input {
	flex: 1;
	min-width: 0;
	font: inherit;
	font-size: 1.1rem;
	padding: 12px 18px;
	color: var(--ink);
	background: var(--water);
	border: 2px solid var(--ink);
	border-radius: 999px;
}
.search input::placeholder { color: var(--ink-2); opacity: 0.8; }
.search button {
	font: inherit;
	font-weight: 600;
	padding: 12px 22px;
	border: 2px solid var(--ink);
	border-radius: 999px;
	background: var(--ink);
	color: var(--water);
	cursor: pointer;
}
.search button:hover { background: var(--magenta); border-color: var(--magenta); color: #fff; }

/* ==========================================================================
   Maršrutas – svarbiausias temos ženklas
   ========================================================================== */
.route {
	--dot: 15px;
	position: relative;
	list-style: none;
	margin: 0;
	padding: 0 0 0 30px;
}
.route::before {
	content: "";
	position: absolute;
	left: calc(var(--dot) / 2 - 1.5px);
	top: 10px;
	bottom: 14px;
	border-left: 3px dashed var(--route);
}
.route-stop {
	position: relative;
	padding-bottom: 22px;
}
.route-stop:last-child { padding-bottom: 0; }
.route-stop::before {
	content: "";
	position: absolute;
	left: -30px;
	top: 0.3em;
	width: var(--dot);
	height: var(--dot);
	border: 3px solid var(--route);
	border-radius: 50%;
	background: var(--water);
	z-index: 1;
}

/* Naujausi įrašai pradžioje */
.route--latest .route-stop:first-child::before { background: var(--route); }
.route--latest time {
	display: block;
	font-size: 0.85rem;
	color: var(--ink-2);
	margin-bottom: 2px;
	font-variant-numeric: tabular-nums;
}
.route-link {
	display: block;
	font-family: var(--f-head);
	font-weight: 600;
	font-size: 1.14rem;
	line-height: 1.3;
	text-decoration: none;
	margin-bottom: 6px;
}
.route-link:hover { color: var(--magenta); text-decoration: underline; }
.route--latest .buoy { font-size: 0.8rem; color: var(--ink-2); }

/* ==========================================================================
   Pradžios puslapis
   ========================================================================== */
.hero {
	position: relative;
	isolation: isolate;
	padding-block: clamp(28px, 4vw, 56px);
	border-bottom: 1px solid var(--line);
	overflow: hidden;
}
.hero::before,
.archive-strip::before,
.ph::before,
.site-foot::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--contour);
	-webkit-mask: url("assets/img/contours.svg") center / cover no-repeat;
	mask: url("assets/img/contours.svg") center / cover no-repeat;
	pointer-events: none;
}
.hero::before { opacity: 0.55; }

.hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
	gap: clamp(28px, 4vw, 64px);
	align-items: start;
}
.hero-route {
	padding: 24px 24px 26px;
	background: color-mix(in srgb, var(--water) 82%, transparent);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	backdrop-filter: blur(2px);
}
.hero-route .section-title { margin-bottom: 20px; }

.section-title {
	font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.7rem);
	font-weight: 800;
	letter-spacing: -0.01em;
}
.section-title a { text-decoration: none; }
.section-title a:hover { color: var(--magenta); }
.section-title--buoy { display: flex; align-items: center; gap: 0.5em; }
.section-title--buoy::before { width: 0.45em; height: 0.45em; }

.block,
.topic { padding-block: clamp(36px, 5vw, 64px); }
.topic + .topic { padding-top: 0; }
.block-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
	padding-bottom: 12px;
	margin-bottom: 28px;
	border-bottom: 2px solid var(--ink);
}
.block-link,
.block-note { font-size: 0.95rem; color: var(--ink-2); }
.block-link { font-weight: 600; color: var(--magenta); }
.block-more { margin-top: 36px; text-align: center; }

.grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px 32px;
}
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 28px; }

.topic-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: 40px;
}
.topic-rows { display: grid; align-content: start; }
.topic-rows .card + .card { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 20px; }

.archive-strip {
	position: relative;
	isolation: isolate;
	padding-block: clamp(40px, 5vw, 64px);
	background: var(--shoal);
	overflow: hidden;
}
.archive-strip::before { opacity: 0.6; }
.archive-strip .block-head { border-bottom-color: var(--ink); }

/* ==========================================================================
   Kortelės
   ========================================================================== */
.card { position: relative; min-width: 0; }
.card-media {
	display: block;
	position: relative;
	overflow: hidden;
	border-radius: 4px;
	background: var(--shoal);
	aspect-ratio: 3 / 2;
}
.card-media img,
.card-media .ph {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.card-body { padding-top: 14px; }
.card-kicker { margin-bottom: 8px; }
.card-title {
	font-size: 1.22rem;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.005em;
}
.card-title a { text-decoration: none; }
.card-title a:hover {
	color: var(--magenta);
	text-decoration: underline;
	text-decoration-thickness: 2px;
}
.card-excerpt {
	margin-top: 10px;
	color: var(--ink-2);
	font-size: 0.98rem;
	line-height: 1.55;
}
.card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	margin-top: 12px;
	font-size: 0.85rem;
	color: var(--ink-2);
}
.card-read { padding-left: 14px; border-left: 1px solid var(--line); }

.card--lead .card-media { aspect-ratio: 2 / 1; border-radius: var(--radius); }
@media (max-width: 620px) { .card--lead .card-media { aspect-ratio: 16 / 10; } }
.card--lead .card-body { padding-top: 22px; }
.card--lead .card-title {
	font-size: clamp(1.9rem, 1.15rem + 2.7vw, 3.15rem);
	font-weight: 800;
	line-height: 1.06;
	letter-spacing: -0.022em;
}
.card--lead .card-excerpt { font-size: 1.15rem; max-width: 60ch; margin-top: 14px; }

.card--feature .card-media { aspect-ratio: 16 / 10; }
.card--feature .card-title { font-size: clamp(1.45rem, 1.1rem + 1.2vw, 1.95rem); font-weight: 800; line-height: 1.12; }
.card--feature .card-excerpt { font-size: 1.05rem; }

.card--row {
	display: grid;
	grid-template-columns: 140px minmax(0, 1fr);
	gap: 18px;
	align-items: start;
}
.card--row .card-media { aspect-ratio: 4 / 3; }
.card--row .card-body { padding-top: 0; }
.card--row .card-kicker { margin-bottom: 4px; }
.card--row .card-title { font-size: 1.08rem; }
.card--row .card-meta { margin-top: 8px; }

.card--mini { border-top: 1px solid var(--ink); }
.card--mini .card-body { padding-top: 14px; }
.card--mini .card-title { font-size: 1.08rem; }

/* Vietoj paveikslėlio – jūrlapio fragmentas */
.ph {
	position: relative;
	isolation: isolate;
	display: flex;
	align-items: flex-end;
	padding: 14px 16px;
	background: var(--shoal);
	overflow: hidden;
}
.ph::before { opacity: 0.9; }
.ph::after {
	content: "";
	position: absolute;
	right: 18%;
	top: 22%;
	width: 14px;
	height: 14px;
	background: var(--buoy);
	transform: rotate(45deg);
}
.ph-label {
	font-family: var(--f-head);
	font-weight: 800;
	font-size: clamp(1.1rem, 0.8rem + 1.4vw, 1.8rem);
	line-height: 1.05;
	color: var(--ink);
	opacity: 0.85;
	letter-spacing: -0.01em;
}
.card--row .ph-label,
.next-read .ph-label { font-size: 0.8rem; }

/* ==========================================================================
   Puslapių antraštės
   ========================================================================== */
.page-head { padding-block: clamp(28px, 4vw, 48px) 28px; }
.page-title {
	font-size: clamp(2rem, 1.3rem + 2.6vw, 3.3rem);
	font-weight: 800;
	letter-spacing: -0.022em;
	line-height: 1.06;
}
.page-title.section-title--buoy::before { width: 0.32em; height: 0.32em; }
.page-sub { margin-top: 12px; color: var(--ink-2); max-width: 62ch; }
.page-desc { margin-top: 14px; font-size: 1.12rem; max-width: 65ch; color: var(--ink-2); }
.page-desc p + p { margin-top: 0.8em; }
.page-search { margin-top: 22px; }
.listing { padding-bottom: clamp(40px, 6vw, 80px); }
.grid--list .card--feature { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.grid--list .card--feature .card-body { padding-top: 0; }

.crumbs { margin-bottom: 18px; font-size: 0.88rem; color: var(--ink-2); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin: 0 10px; color: var(--contour); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--magenta); text-decoration: underline; }
.crumbs [aria-current] span {
	display: inline-block;
	max-width: 46ch;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	vertical-align: bottom;
}

.pager { margin-top: 56px; }
.pager ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.pager .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	text-decoration: none;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}
.pager a.page-numbers:hover { border-color: var(--ink); }
.pager .current { background: var(--ink); border-color: var(--ink); color: var(--water); }
.pager .dots { border: 0; }

.empty { padding-block: 40px; max-width: 640px; }
.empty p { margin-bottom: 18px; font-size: 1.1rem; }

.lost { padding-block: clamp(40px, 6vw, 80px) 0; max-width: 820px; }
.lost-code {
	font-family: var(--f-head);
	font-weight: 900;
	font-size: clamp(6rem, 3rem + 14vw, 13rem);
	line-height: 0.85;
	color: transparent;
	-webkit-text-stroke: 2px var(--route);
	margin-bottom: 12px;
}
.lost .btn { margin-top: 24px; }

/* ==========================================================================
   Straipsnis
   ========================================================================== */
.post-head { padding-block: clamp(24px, 4vw, 44px) 28px; }
.post-head > * { max-width: 920px; }
.post-kicker { margin-bottom: 14px; }
.post-kicker .buoy { font-size: 0.95rem; }
.post-title {
	font-size: clamp(2.05rem, 1.15rem + 3.4vw, 3.7rem);
	font-weight: 800;
	line-height: 1.06;
	letter-spacing: -0.025em;
}
.post-standfirst {
	margin-top: 18px;
	font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem);
	line-height: 1.5;
	color: var(--ink-2);
	max-width: 62ch;
}
.post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 0;
	margin: 22px 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.95rem;
	color: var(--ink-2);
}
.post-meta li + li { margin-left: 16px; padding-left: 16px; border-left: 1px solid var(--line); }
.post-meta li:first-child { color: var(--ink); font-weight: 600; }

.post-figure { margin: 0 auto; }
.post-figure img {
	width: 100%;
	max-height: 680px;
	object-fit: cover;
	border-radius: var(--radius);
}
.post-figure figcaption { margin-top: 10px; font-size: 0.88rem; color: var(--ink-2); }
.post-figure .ph { aspect-ratio: 21 / 9; border-radius: var(--radius); }

.post-layout {
	display: grid;
	grid-template-columns: minmax(0, 740px);
	justify-content: center;
	gap: 56px;
	padding-block: clamp(28px, 4vw, 48px) clamp(40px, 6vw, 72px);
}
.post-layout.has-toc { grid-template-columns: 250px minmax(0, 740px); justify-content: start; }
.post--page .post-layout { justify-content: start; }

.post-aside { position: relative; }
.toc {
	position: sticky;
	top: 24px;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	padding-right: 6px;
	scrollbar-width: thin;
}
.toc summary {
	font-family: var(--f-head);
	font-weight: 800;
	font-size: 1.1rem;
	margin-bottom: 18px;
	cursor: pointer;
	list-style: none;
}
.toc summary::-webkit-details-marker { display: none; }
.route--toc { --dot: 13px; padding-left: 26px; }
.route--toc::before { border-left-color: var(--contour); }
.route--toc::after {
	content: "";
	position: absolute;
	left: calc(var(--dot) / 2 - 1.5px);
	top: 10px;
	width: 3px;
	height: calc((100% - 24px) * var(--toc-p, 0));
	background: var(--route);
	transition: height 0.2s linear;
}
.route--toc .route-stop { padding-bottom: 14px; }
.route--toc .route-stop::before { left: -26px; top: 0.25em; border-color: var(--contour); border-width: 2px; }
.route--toc .route-stop.is-passed::before { border-color: var(--route); background: var(--route); }
.route--toc .route-stop.is-active::before { border-color: var(--route); background: var(--water); border-width: 3px; }
.route--toc a {
	display: block;
	font-size: 0.93rem;
	line-height: 1.35;
	color: var(--ink-2);
	text-decoration: none;
}
.route--toc .lvl-3 a { font-size: 0.86rem; padding-left: 10px; }
.route--toc a:hover,
.route--toc .is-active a { color: var(--ink); }
.route--toc .is-active a { font-weight: 600; }

/* Straipsnio tekstas */
.entry {
	font-size: 1.15rem;
	line-height: 1.72;
	overflow-wrap: break-word;
}
.entry > * + * { margin-top: 1.15em; }
.entry h2,
.entry h3,
.entry h4 { scroll-margin-top: 28px; }
.entry h2 {
	margin-top: 2em;
	font-size: clamp(1.5rem, 1.25rem + 0.9vw, 1.9rem);
	font-weight: 800;
	letter-spacing: -0.012em;
}
.entry h3 { margin-top: 1.7em; font-size: 1.35rem; }
.entry h4 { margin-top: 1.5em; font-size: 1.15rem; }
.entry h2 + *,
.entry h3 + *,
.entry h4 + * { margin-top: 0.6em; }
.entry a {
	color: var(--magenta);
	text-decoration: underline;
	text-decoration-thickness: 1px;
}
.entry a:hover { text-decoration-thickness: 2px; }
.entry strong { font-weight: 600; }
.entry ul,
.entry ol { padding-left: 1.4em; }
.entry li + li { margin-top: 0.4em; }
.entry ul li::marker { color: var(--route); }
.entry ol li::marker { color: var(--ink-2); font-weight: 600; }
.entry blockquote,
.entry .wp-block-quote {
	margin: 1.8em 0;
	padding: 4px 0 4px 24px;
	border-left: 4px solid var(--route);
	font-style: italic;
	font-size: 1.22rem;
	line-height: 1.55;
}
.entry blockquote cite { display: block; margin-top: 10px; font-size: 0.95rem; font-style: normal; color: var(--ink-2); }
.entry .wp-block-pullquote { border-block: 2px solid var(--ink); padding: 24px 0; text-align: left; }
.entry .wp-block-pullquote blockquote { border: 0; padding: 0; margin: 0; font-family: var(--f-head); font-style: normal; font-weight: 700; font-size: 1.6rem; }
.entry img { border-radius: 4px; }
.entry figure { margin-inline: 0; }
.entry figcaption,
.entry .wp-element-caption { margin-top: 8px; font-size: 0.88rem; color: var(--ink-2); line-height: 1.45; }
.entry hr { border: 0; height: 12px; margin: 2.5em 0; background: radial-gradient(circle, var(--route) 2px, transparent 2.5px) center / 18px 12px repeat-x; }
.entry table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.entry .wp-block-table { overflow-x: auto; }
.entry th,
.entry td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry th { font-weight: 600; border-bottom: 2px solid var(--ink); }
.entry pre,
.entry code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.9em; }
.entry pre { padding: 16px; background: var(--shoal); border-radius: var(--radius); overflow-x: auto; }
.entry :not(pre) > code { padding: 0.1em 0.35em; background: var(--shoal); border-radius: 3px; }
.entry .alignleft { float: left; margin: 0.3em 1.5em 1em 0; max-width: 50%; }
.entry .alignright { float: right; margin: 0.3em 0 1em 1.5em; max-width: 50%; }
.entry .aligncenter { margin-inline: auto; }
.entry .alignwide { margin-inline: min(-6vw, -60px); max-width: none; }
.entry::after { content: ""; display: table; clear: both; }
.entry iframe { width: 100%; border: 0; }
.entry .wp-block-embed__wrapper iframe { aspect-ratio: 16 / 9; height: auto; }
.entry mark { background: var(--land); color: inherit; padding: 0 0.15em; }
.entry .has-drop-cap:not(:focus)::first-letter { font-family: var(--f-head); font-weight: 800; color: var(--magenta); }

.page-links { display: flex; gap: 8px; align-items: center; margin-top: 2em; font-weight: 600; }

.post-foot { margin-top: 48px; padding-top: 24px; border-top: 2px solid var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 22px; padding: 0; }
.tags a {
	display: inline-block;
	padding: 5px 12px;
	background: var(--shoal);
	border-radius: 999px;
	font-size: 0.9rem;
	text-decoration: none;
}
.tags a:hover { background: var(--land); }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share-label { margin-right: 6px; font-weight: 600; }
.share-btn {
	display: inline-flex;
	align-items: center;
	padding: 7px 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: transparent;
	color: var(--ink);
	font: inherit;
	font-size: 0.92rem;
	text-decoration: none;
	cursor: pointer;
}
.share-btn:hover { border-color: var(--ink); }
.share-copy.is-done { background: var(--ink); color: var(--water); border-color: var(--ink); }

.post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-top: 40px;
}
.post-nav-link {
	display: block;
	padding: 16px 18px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	text-decoration: none;
}
.post-nav-link.next { grid-column: 2; text-align: right; }
.post-nav-link:hover { border-color: var(--ink); }
.post-nav-dir { display: block; font-size: 0.85rem; color: var(--ink-2); margin-bottom: 4px; }
.post-nav-title { font-family: var(--f-head); font-weight: 700; line-height: 1.3; }
.post-nav-link:hover .post-nav-title { color: var(--magenta); }

.after-post { margin-top: 40px; }
.comments { margin-top: 48px; }
.comment-list { list-style: none; margin: 20px 0 0; padding: 0; }
.comment-list li { padding: 16px 0; border-top: 1px solid var(--line); }
.comment-meta { font-size: 0.88rem; color: var(--ink-2); margin-bottom: 6px; }
.comment-meta a { text-decoration: none; }

.related { padding-block: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); }

/* Pasiūlymas skaityti toliau */
.next-read {
	position: fixed;
	left: 20px;
	bottom: 20px;
	z-index: 50;
	display: flex;
	align-items: center;
	gap: 6px;
	width: min(400px, calc(100% - 112px));
	padding: 10px 8px 10px 10px;
	background: #0e2a3b;
	color: #eef4f5;
	border-radius: 10px;
	border: 1px solid #23465b;
	box-shadow: 0 10px 30px rgb(6 20 32 / 0.28);
	transform: translateY(calc(100% + 40px));
	transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.next-read.is-in { transform: translateY(0); }
.next-read-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.next-read-media { flex: none; width: 64px; height: 64px; border-radius: 6px; overflow: hidden; }
.next-read-media img,
.next-read-media .ph { width: 100%; height: 100%; object-fit: cover; padding: 6px; }
.next-read-media img { padding: 0; }
.next-read-text { min-width: 0; }
.next-read-label { display: block; font-size: 0.8rem; color: #ff9bd6; }
.next-read-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-family: var(--f-head);
	font-weight: 700;
	line-height: 1.25;
}
.next-read-link:hover .next-read-title { text-decoration: underline; }
.next-read-close {
	flex: none;
	width: 36px;
	height: 36px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
}
.next-read-close:hover { background: rgb(255 255 255 / 0.12); }
.next-read-close svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; fill: none; }

/* Į viršų */
.to-top {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 55;
	width: 58px;
	height: 58px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--water);
	box-shadow: 0 6px 20px rgb(6 20 32 / 0.18);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top svg { width: 100%; height: 100%; display: block; }
.to-top-track { fill: none; stroke: var(--line); stroke-width: 3; }
.to-top-ring {
	fill: none;
	stroke: var(--route);
	stroke-width: 3;
	stroke-linecap: round;
	stroke-dasharray: 100;
	stroke-dashoffset: calc(100 - var(--p, 0) * 100);
	transform: rotate(-90deg);
	transform-origin: 50% 50%;
}
.to-top-needle { fill: var(--magenta); transition: transform 0.2s; transform-origin: 50% 50%; }
.to-top-tail { fill: var(--ink); }
.to-top:hover .to-top-needle { transform: translateY(-2px); }
.to-top-text { display: none; }

/* ==========================================================================
   Poraštė
   ========================================================================== */
.site-foot {
	position: relative;
	isolation: isolate;
	margin-top: 0;
	padding-top: clamp(48px, 6vw, 80px);
	background: var(--foot-bg);
	color: var(--foot-ink);
	overflow: hidden;
}
.site-foot::before { background: var(--foot-line); opacity: 0.9; }
.site-foot a { color: var(--foot-ink); text-decoration: none; }
.site-foot a:hover { color: #ff9bd6; text-decoration: underline; }
.foot-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
	gap: 48px;
	padding-bottom: 48px;
}
.foot-about p { color: var(--foot-ink-2); max-width: 42ch; }
.brand--foot { margin-bottom: 18px; }
.brand--foot .brand-mark { width: 44px; height: 44px; }
.brand--foot .brand-name { font-size: 1.7rem; color: var(--foot-ink); }
.site-foot .mark-disc { fill: #eef4f5; }
.site-foot .mark-star { fill: #0e2a3b; }
.site-foot .mark-ring { stroke: #5d8396; }
.foot-title { font-size: 1.1rem; font-weight: 800; margin-bottom: 18px; color: var(--foot-ink); }
.foot-topics ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 24px; }
.foot-topics li { break-inside: avoid; margin-bottom: 8px; }
.foot-topics a { display: inline-flex; align-items: center; gap: 0.55em; }
.foot-topics .n { color: var(--foot-ink-2); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.site-foot .route::before { border-left-color: #c2307f; }
.site-foot .route-stop::before { background: var(--foot-bg); border-color: #e0399b; }
.route--compact .route-stop { padding-bottom: 14px; }
.route--compact a { font-size: 0.95rem; line-height: 1.35; display: block; }
.social { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 18px 0 0; padding: 0; }
.social a { display: inline-block; padding: 6px 12px; border: 1px solid var(--foot-line); border-radius: 999px; font-size: 0.9rem; }
.foot-base {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 28px;
	padding-block: 22px 90px;
	border-top: 1px solid var(--foot-line);
	font-size: 0.9rem;
	color: var(--foot-ink-2);
}
.foot-base ul,
.foot-menu ul { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; margin: 0; padding: 0; }
.foot-links { margin-left: auto !important; }

/* ==========================================================================
   Prisitaikymas
   ========================================================================== */
@media (max-width: 1080px) {
	.grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.post-layout.has-toc { grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
	.tagline { display: none; }
	.mast > .brand + .search-toggle,
	.tagline + .search-toggle { margin-left: auto; }
}

@media (max-width: 900px) {
	.hero-grid,
	.topic-grid { grid-template-columns: 1fr; }
	.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
	.grid--list .card--feature { grid-template-columns: 1fr; gap: 0; }
	.grid--list .card--feature .card-body { padding-top: 16px; }
	.foot-grid { grid-template-columns: 1fr 1fr; }
	.foot-about { grid-column: 1 / -1; }

	.post-layout.has-toc { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.post-aside { margin-bottom: 28px; }
	.toc {
		position: static;
		max-height: none;
		padding: 14px 18px;
		background: var(--surface);
		border: 1px solid var(--line);
		border-radius: var(--radius);
	}
	.toc summary { margin-bottom: 0; display: flex; justify-content: space-between; align-items: center; }
	.toc summary::after { content: "+"; font-size: 1.4rem; font-weight: 400; line-height: 1; }
	.toc[open] summary { margin-bottom: 16px; }
	.toc[open] summary::after { content: "−"; }
	.entry .alignwide { margin-inline: 0; }
}

@media (max-width: 620px) {
	.bar-count,
	.theme-toggle-text { display: none; }
	.bar { gap: 12px; }
	.theme-toggle { margin-left: auto; }
	.mast { padding-block: 14px; gap: 12px; }
	.brand a { gap: 10px; }
	.brand-mark { width: 40px; height: 40px; }
	.search-toggle { padding: 10px; }
	.search-toggle span { display: none; }
	.grid,
	.grid--4 { grid-template-columns: 1fr; }
	.card--row { grid-template-columns: 104px minmax(0, 1fr); gap: 14px; }
	.hero-route { padding: 20px 18px; }
	.entry { font-size: 1.08rem; }
	.entry .alignleft,
	.entry .alignright { float: none; margin: 1em 0; max-width: 100%; }
	.post-meta li + li { margin-left: 0; padding-left: 0; border: 0; }
	.post-meta { flex-direction: column; }
	.post-nav { grid-template-columns: 1fr; }
	.post-nav-link.next { grid-column: auto; }
	.foot-grid { grid-template-columns: 1fr; gap: 36px; }
	.foot-links { margin-left: 0 !important; }
	.next-read { left: 12px; bottom: 12px; width: calc(100% - 90px); }
	.to-top { right: 12px; bottom: 12px; width: 54px; height: 54px; }
	.search { flex-wrap: wrap; }
	.search button { flex: 1; }
	.crumbs [aria-current] span { max-width: 22ch; }
}

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

@media print {
	.site-head,
	.site-foot,
	.post-aside,
	.share,
	.post-nav,
	.related,
	.archive-strip,
	.next-read,
	.to-top,
	.progress { display: none !important; }
	body { background: #fff; color: #000; }
	.post-layout.has-toc { grid-template-columns: 1fr; }
	.entry a::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}

/* WordPress būtinos klasės */
.wp-caption { max-width: 100%; }
.wp-caption-text,
.gallery-caption { font-size: 0.88rem; color: var(--ink-2); }
.bypostauthor { display: block; }
.sticky { display: block; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
