/* ==========================================================================
   Farvateris – VVVLI tema
   Idėja: jūrlapis + farvaterio ženklai. Plūdurų spalvos (geltona, žalia, raudona)
   kartu yra ir Lietuvos vėliavos spalvos. Izobatų (gylio linijų) raštas – tik
   pradžios puslapio viršuje ir paveikslėlių neturinčiose kortelėse.
   ========================================================================== */

@font-face {
	font-family: "Bitter";
	src: url("../fonts/bitter.woff") format("woff");
	font-weight: 400 800;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Bitter";
	src: url("../fonts/bitter-italic.woff") format("woff");
	font-weight: 400 800;
	font-style: italic;
	font-display: swap;
}

:root {
	--bg: #F2F6F7;
	--surface: #E3EEF1;
	--surface-2: #D3E4E9;
	--ink: #10293A;
	--ink-2: #3D5768;
	--line: #C3D5DB;
	--green: #006A44;
	--red: #C1272D;
	--yellow: #FDB913;
	--link: #00583A;
	--contour: rgba(16, 41, 58, .11);
	--shadow: 0 6px 20px rgba(16, 41, 58, .16);

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

	--wrap: 1240px;
	--pad: clamp(16px, 3.2vw, 32px);
	--radius: 6px;
	--header-h: 72px;

	--fs-xs: .8125rem;
	--fs-s: .875rem;
	--fs-m: 1rem;
	--fs-l: 1.1875rem;
	--fs-xl: 1.5rem;
	--fs-2xl: 1.875rem;

	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #0C1F2B;
		--surface: #12293A;
		--surface-2: #183447;
		--ink: #E6EFF2;
		--ink-2: #A9C0CA;
		--line: #26465B;
		--green: #3DBE84;
		--red: #FF6F6A;
		--link: #7AD9AC;
		--contour: rgba(169, 192, 202, .12);
		--shadow: 0 6px 20px rgba(0, 0, 0, .45);
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--bg: #0C1F2B;
	--surface: #12293A;
	--surface-2: #183447;
	--ink: #E6EFF2;
	--ink-2: #A9C0CA;
	--line: #26465B;
	--green: #3DBE84;
	--red: #FF6F6A;
	--link: #7AD9AC;
	--contour: rgba(169, 192, 202, .12);
	--shadow: 0 6px 20px rgba(0, 0, 0, .45);
	color-scheme: dark;
}

/* ---------- Pagrindas ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 400 var(--fs-m)/1.55 var(--sans);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 750; line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }

:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
	box-shadow: 0 0 0 5px var(--yellow);
	border-radius: 3px;
}

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

.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: -60px; z-index: 100;
	background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--radius);
	font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }
.site-main:focus { outline: none; }

/* ---------- Mygtukai ir lustai ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 0 22px; border: 0; border-radius: 999px;
	background: var(--ink); color: var(--bg);
	font: 650 var(--fs-m)/1 var(--sans); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--green); color: #fff; }
.btn--wide { min-width: min(100%, 320px); }

.chip {
	display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px;
	border: 1.5px solid var(--line); border-radius: 999px; background: transparent;
	font: 600 var(--fs-s)/1 var(--sans); color: var(--ink); text-decoration: none; cursor: pointer;
}
.chip:hover { border-color: var(--ink); }

.icon-btn {
	display: inline-grid; place-items: center; width: 44px; height: 44px;
	border: 0; border-radius: 50%; background: transparent; cursor: pointer; color: var(--ink);
}
.icon-btn:hover { background: var(--surface); }

/* ---------- Antraštė ---------- */
.site-header {
	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);
	border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; min-height: var(--header-h); }

.brand { margin: 0; font: inherit; flex: 0 0 auto; }
.brand a { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 44px; height: 44px; flex: 0 0 auto; }
.brand-text { display: grid; line-height: 1; }
.brand-name { font: 800 1.625rem/1 var(--serif); letter-spacing: -.01em; }
.brand-tag { font: 500 .78rem/1.2 var(--sans); color: var(--ink-2); margin-top: 4px; max-width: 18ch; }

.primary-nav { margin-left: auto; }
.primary-nav .menu { display: flex; flex-wrap: wrap; gap: 2px; list-style: none; }
.primary-nav li { position: relative; }
.primary-nav a {
	display: block; padding: 10px 12px; border-radius: var(--radius);
	font: 600 .9375rem/1.2 var(--sans); text-decoration: none; color: var(--ink);
}
.primary-nav a:hover { background: var(--surface); }
.primary-nav .current-menu-item > a,
.primary-nav .current-menu-ancestor > a,
.primary-nav .current-post-ancestor > a {
	text-decoration: underline; text-decoration-color: var(--yellow);
	text-decoration-thickness: 3px; text-underline-offset: 6px;
}
.primary-nav .sub-menu {
	position: absolute; left: 0; top: 100%; min-width: 220px; padding: 8px; list-style: none;
	background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
	opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .15s, transform .15s, visibility .15s;
}
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }

.header-tools { display: flex; align-items: center; gap: 2px; }
.primary-nav + .header-tools { margin-left: 8px; }
.nav-toggle { display: none; }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .i-sun { display: block; }
	:root:not([data-theme="light"]) .i-moon { display: none; }
}

.search-panel { background: var(--surface); border-top: 1px solid var(--line); padding: 16px 0; }
.search-form { display: flex; gap: 10px; max-width: 760px; }
.search-field {
	flex: 1; min-width: 0; min-height: 48px; padding: 0 20px;
	border: 2px solid var(--ink); border-radius: 999px; background: var(--bg); color: var(--ink);
	font: 400 1.0625rem/1 var(--sans);
}
.search-field::placeholder { color: var(--ink-2); }

/* ---------- Naujausių juosta ---------- */
.ticker { border-bottom: 1px solid var(--line); background: var(--surface); font-size: var(--fs-s); }
.ticker-inner { display: flex; align-items: center; gap: 20px; min-height: 42px; overflow: hidden; }
.ticker-today { flex: 0 0 auto; font-weight: 700; padding-right: 20px; border-right: 1px solid var(--line); }
.ticker-today::first-letter { text-transform: uppercase; }
.ticker-track {
	display: flex; flex: 1; min-width: 0; overflow: hidden;
	mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 48px), transparent);
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 48px), transparent);
}
.ticker-list {
	display: flex; flex: 0 0 auto; gap: 36px; padding-right: 36px; list-style: none;
	animation: ticker 70s linear infinite;
}
.ticker-track:hover .ticker-list,
.ticker-track:focus-within .ticker-list { animation-play-state: paused; }
.ticker-list a { white-space: nowrap; text-decoration: none; }
.ticker-list a:hover { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; }
.ticker-list time { color: var(--red); font-weight: 700; margin-right: 6px; font-variant-numeric: tabular-nums; }
@keyframes ticker { to { transform: translateX(-100%); } }

/* ---------- Kortelės ---------- */
.card { position: relative; min-width: 0; }
.card-media { display: block; text-decoration: none; }
.media {
	position: relative; aspect-ratio: 16 / 10; overflow: hidden;
	border-radius: var(--radius); background: var(--surface);
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--empty { display: grid; place-items: center; }
.media--empty::before {
	content: ""; position: absolute; inset: 0;
	background: var(--c, var(--green)); opacity: .45;
	-webkit-mask: url("../img/contours.svg") center / cover no-repeat;
	mask: url("../img/contours.svg") center / cover no-repeat;
}
.media--empty span {
	position: relative; font: 800 clamp(2.5rem, 6vw, 4.5rem)/1 var(--serif);
	color: var(--c, var(--green));
}
:root[data-theme="dark"] .media--empty span { color: var(--ink-2); }

.card-body { padding-top: 14px; }
.kicker {
	display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px;
	font: 650 var(--fs-xs)/1.2 var(--sans); color: var(--ink); text-decoration: none;
}
.kicker::before {
	content: ""; width: 10px; height: 10px; border-radius: 50%;
	background: var(--c, var(--green)); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--c, var(--green));
	flex: 0 0 auto;
}
a.kicker:hover { text-decoration: underline; }
.card-title { font-weight: 700; font-size: 1.1875rem; line-height: 1.25; letter-spacing: -.005em; }
.card-title a { text-decoration: none; }
.card-title a:hover,
.next-read-link:hover .next-read-title,
.timeline a:hover {
	text-decoration: underline; text-decoration-color: var(--yellow);
	text-decoration-thickness: 3px; text-underline-offset: 4px; text-decoration-skip-ink: none;
}
.card-excerpt { margin-top: 10px; color: var(--ink-2); max-width: 62ch; }

.meta {
	display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 10px;
	font: 500 var(--fs-xs)/1.4 var(--sans); color: var(--ink-2);
}
.meta > * + * { padding-left: 12px; border-left: 1px solid var(--line); }

/* Pagrindinė (feature) */
.card--feature .card-title { font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2.125rem); line-height: 1.12; letter-spacing: -.015em; }
.card--feature .card-excerpt { font-size: 1.0625rem; }

/* Kompaktiška */
.card--compact { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: start; }
.card--compact .media { aspect-ratio: 1; }
.card--compact .card-body { padding-top: 0; }
.card--compact .card-title { font-size: 1.0625rem; font-weight: 650; }
.card--compact .meta { margin-top: 6px; }

/* Eilutė (sąrašai) */
.card--row { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 24px; padding: 24px 0; border-top: 1px solid var(--line); }
.card--row:first-child { border-top: 0; padding-top: 0; }
.card--row .card-body { padding-top: 0; }
.card--row .card-title { font-size: 1.375rem; }

/* ---------- Pradžios puslapio „uostas“ (vienintelė drąsi vieta) ---------- */
.harbor { position: relative; isolation: isolate; padding: clamp(24px, 4vw, 48px) 0 clamp(32px, 5vw, 56px); }
.harbor::before {
	content: ""; position: absolute; inset: 0 0 auto 0; height: min(78%, 620px); z-index: -1;
	background: var(--contour);
	-webkit-mask: url("../img/contours.svg") center top / cover no-repeat;
	mask: url("../img/contours.svg") center top / cover no-repeat;
}
.harbor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(24px, 4vw, 56px); align-items: start; }

.harbor .card--feature .card-title { font-size: clamp(1.875rem, 4vw, 3.125rem); line-height: 1.06; letter-spacing: -.02em; }
.harbor .card--feature .card-body {
	position: relative; margin: -96px 14% 0 0; padding: 22px 28px 0 0;
	background: var(--bg); border-top-right-radius: var(--radius);
}
.harbor .card--feature .card-excerpt { font-size: 1.125rem; }
.harbor .card--long .card-title { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.1; }
.harbor .card--feature .media { aspect-ratio: 16 / 9.5; }

.rail-title {
	display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
	font-size: var(--fs-xl); font-weight: 800;
}
.rail-title::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 22%, transparent); }

.timeline { list-style: none; position: relative; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 20px 28px; display: grid; gap: 3px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
	content: ""; position: absolute; left: 0; top: .3em; width: 12px; height: 12px; border-radius: 50%;
	background: var(--c, var(--green)); box-shadow: 0 0 0 3px var(--bg);
}
.timeline time { font: 600 var(--fs-xs)/1.3 var(--sans); color: var(--ink-2); }
.timeline a { font: 650 1.0625rem/1.3 var(--serif); text-decoration: none; }
.timeline-cat { font: 500 var(--fs-xs)/1.3 var(--sans); color: var(--ink-2); }
.timeline--small a { font-size: 1rem; }

/* ---------- Temų rodyklė ---------- */
.topics { padding: 8px 0 12px; }
.topics-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.topics-list a {
	display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
	border: 1.5px solid var(--line); border-radius: 999px; text-decoration: none;
	font: 600 var(--fs-s)/1 var(--sans);
}
.topics-list a::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.topics-list a:hover { border-color: var(--c); background: var(--surface); }
.count { color: var(--ink-2); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- Skiltys ---------- */
.section { padding: clamp(36px, 5vw, 64px) 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 26px; }
.section-title { position: relative; padding-left: 18px; font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -.01em; }
.section-title::before { content: ""; position: absolute; left: 0; top: .12em; bottom: .12em; width: 6px; border-radius: 3px; background: var(--c, var(--yellow)); }
.section-title a { text-decoration: none; }
.section-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.section-more { font: 650 var(--fs-s)/1.2 var(--sans); color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.section-more:hover { text-decoration-thickness: 2px; }
.section-note { color: var(--ink-2); flex-basis: 100%; padding-left: 18px; }

.topic-section + .topic-section { padding-top: 0; }
.topic-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px clamp(24px, 4vw, 48px); align-items: start; }
.topic-section--flip .topic-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
.topic-section--flip .topic-grid > .card--feature { order: 2; }
.topic-list { display: grid; gap: 22px; }
.topic-list > .card--compact + .card--compact { padding-top: 22px; border-top: 1px solid var(--line); }

.archive-band { background: var(--surface); }
.archive-band .media { background: var(--surface-2); }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 36px 28px; }

.stream-wrap { max-width: 980px; margin-inline: 0; }
@media (min-width: 1240px) { .stream-wrap { margin-inline: auto; max-width: var(--wrap); } .stream-wrap .stream-list { max-width: 980px; } }
.stream-more { margin-top: 36px; }

/* ---------- Sąrašų puslapiai ---------- */
.crumbs { padding: 20px 0 8px; font: 500 var(--fs-xs)/1.4 var(--sans); color: var(--ink-2); }
.crumbs ol { display: flex; gap: 8px; list-style: none; white-space: nowrap; }
.crumbs li { flex: 0 0 auto; }
.crumbs li:last-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; max-width: 56ch; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--ink-2); opacity: .5; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.list-head { position: relative; padding: 18px 0 34px 26px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.list-head::before { content: ""; position: absolute; left: 0; top: 22px; height: 2.6rem; width: 8px; border-radius: 4px; background: var(--c); }
.list-title { font-size: clamp(2rem, 4.4vw, 3.125rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.08; }
.list-desc { margin-top: 12px; max-width: 70ch; color: var(--ink-2); font-size: 1.0625rem; }
.list-desc p + p { margin-top: .6em; }
.list-count { margin-top: 12px; font: 600 var(--fs-s)/1.3 var(--sans); color: var(--ink-2); }
.list-head .search-form { margin-top: 20px; }

.list-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(32px, 5vw, 72px); align-items: start; padding-bottom: 72px; }
.list-aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 36px; }
.aside-title { font-size: var(--fs-l); font-weight: 800; margin-bottom: 14px; }
.aside-topics { list-style: none; }
.aside-topics a {
	display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line);
	text-decoration: none; font: 600 var(--fs-s)/1.3 var(--sans);
}
.aside-topics a::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: 0 0 auto; }
.aside-topics a span:first-of-type { flex: 1; }
.aside-topics a:hover span:first-of-type,
.aside-topics a[aria-current] span:first-of-type { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 4px; }

.empty { padding: 40px 0; }
.empty-title { font: 800 var(--fs-xl)/1.2 var(--serif); margin-bottom: 8px; }

/* Puslapiavimas */
.pagination { margin-top: 40px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.page-numbers {
	display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 14px;
	border: 1.5px solid var(--line); border-radius: 999px; text-decoration: none;
	font: 650 var(--fs-s)/1 var(--sans);
}
a.page-numbers:hover { border-color: var(--ink); }
.page-numbers.current { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.page-numbers.dots { border: 0; }

/* ---------- Straipsnis ---------- */
.read-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--yellow); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

.article-head { max-width: 920px; padding: 10px 0 0; }
.article-head .kicker { font-size: var(--fs-s); margin-bottom: 14px; }
.article-title { font-size: clamp(2rem, 4.6vw, 3.375rem); font-weight: 800; line-height: 1.07; letter-spacing: -.022em; }
.article-dek { margin-top: 18px; max-width: 62ch; font: 400 clamp(1.125rem, 1.6vw, 1.3125rem)/1.5 var(--serif); color: var(--ink-2); }
.article-meta { margin-top: 20px; font-size: var(--fs-s); }

.article-figure { margin: 30px 0 0; }
.article-figure img { width: 100%; max-height: 640px; object-fit: cover; border-radius: var(--radius); background: var(--surface); }
.article-figure figcaption { margin-top: 10px; font: 400 var(--fs-xs)/1.45 var(--sans); color: var(--ink-2); max-width: 80ch; }

.article-layout { display: grid; grid-template-columns: minmax(0, 740px); gap: 56px; padding: 40px 0 64px; }
.article-layout.has-toc { grid-template-columns: 250px minmax(0, 740px); }

.article-rail { position: relative; }
.toc { position: sticky; top: calc(var(--header-h) + 28px); }
.toc-title { font: 750 var(--fs-s)/1.2 var(--sans); margin-bottom: 14px; }
.toc ol { position: relative; list-style: none; max-height: calc(100vh - var(--header-h) - 120px); overflow: auto; padding: 2px 4px 2px 0; }
.fairway { position: absolute; left: 5px; top: 38px; bottom: 6px; width: 2px; background: var(--line); }
.fairway-fill { position: absolute; inset: 0; background: var(--yellow); transform-origin: 50% 0; transform: scaleY(var(--p, 0)); }
.toc li { position: relative; padding: 5px 0 5px 24px; }
.toc li::before {
	content: ""; position: absolute; left: 1px; top: .78em; width: 10px; height: 10px; border-radius: 50%;
	background: var(--bg); border: 2px solid var(--line);
}
.toc li.is-passed::before { border-color: var(--yellow); background: var(--yellow); }
.toc li.is-active::before { border-color: var(--ink); background: var(--yellow); }
.toc a { display: block; font: 500 var(--fs-s)/1.35 var(--sans); color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.toc li.is-active > a { color: var(--ink); font-weight: 700; }
.toc .toc-l3 { padding-left: 38px; }
.toc .toc-l3 a { font-size: var(--fs-xs); }

.toc-mobile { display: none; margin-bottom: 28px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.toc-mobile summary { padding: 14px 16px; font: 700 var(--fs-s)/1.3 var(--sans); cursor: pointer; }
.toc-mobile ol { padding: 0 16px 14px 36px; }
.toc-mobile li { padding: 5px 0; }
.toc-mobile a { font: 500 var(--fs-s)/1.4 var(--sans); }
.toc-mobile .toc-l3 { margin-left: 16px; }

/* Turinys */
.entry-content { font: 400 1.1875rem/1.75 var(--serif); overflow-wrap: break-word; }
.entry-content > * + * { margin-top: 1.15em; }
.entry-content h2 { margin-top: 2em; font-size: clamp(1.5rem, 2.4vw, 1.875rem); font-weight: 750; line-height: 1.2; letter-spacing: -.01em; }
.entry-content h3 { margin-top: 1.7em; font-size: 1.375rem; font-weight: 700; line-height: 1.25; }
.entry-content h4 { margin-top: 1.5em; font-size: 1.1875rem; font-weight: 700; }
.entry-content h2 + *, .entry-content h3 + *, .entry-content h4 + * { margin-top: .6em; }
.entry-content a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.entry-content a:hover { text-decoration-thickness: 2px; text-decoration-color: var(--yellow); }
.entry-content strong { font-weight: 700; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li + li { margin-top: .45em; }
.entry-content li::marker { color: var(--green); font-weight: 700; }
.entry-content blockquote {
	margin-inline: 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--yellow);
	font-style: italic; font-size: 1.25rem; line-height: 1.6;
}
.entry-content blockquote cite { display: block; margin-top: 8px; font: normal 600 var(--fs-s)/1.4 var(--sans); color: var(--ink-2); }
.entry-content img { border-radius: var(--radius); }
.entry-content figure { margin-inline: 0; }
.entry-content figcaption, .entry-content .wp-element-caption { margin-top: 8px; font: 400 var(--fs-xs)/1.45 var(--sans); color: var(--ink-2); }
.entry-content hr { border: 0; height: 4px; width: 96px; margin: 2.4em 0; background: linear-gradient(90deg, var(--yellow) 33.3%, var(--green) 33.3% 66.6%, var(--red) 66.6%); border-radius: 2px; }
.entry-content code { font: .9em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface); padding: .1em .35em; border-radius: 4px; }
.entry-content pre { overflow: auto; padding: 16px; background: var(--surface); border-radius: var(--radius); font-size: .9rem; }
.entry-content pre code { background: none; padding: 0; }
.entry-content .table-scroll, .entry-content .wp-block-table { overflow-x: auto; }
.entry-content table { width: 100%; border-collapse: collapse; font: 400 .9375rem/1.5 var(--sans); }
.entry-content th, .entry-content td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry-content th { background: var(--surface); font-weight: 700; }
.entry-content .alignwide, .entry-content .alignfull { max-width: none; }
.entry-content .aligncenter { margin-inline: auto; }
.entry-content .alignleft { float: left; margin: .3em 1.4em 1em 0; max-width: 50%; }
.entry-content .alignright { float: right; margin: .3em 0 1em 1.4em; max-width: 50%; }
.entry-content iframe { max-width: 100%; }
.entry-content::after { content: ""; display: table; clear: both; }

.inline-related { margin-block: 1.8em; padding: 16px; border-radius: var(--radius); background: var(--surface); border-left: 4px solid var(--green); }
.inline-related-label { font: 700 var(--fs-xs)/1.2 var(--sans); color: var(--ink-2); margin-bottom: 10px; }
.inline-related a { display: grid; grid-template-columns: 84px 1fr; gap: 16px; align-items: center; text-decoration: none; color: var(--ink); }
.inline-related .media { aspect-ratio: 1; }
.inline-related-title { font: 700 1.0625rem/1.3 var(--serif); }
.inline-related a:hover .inline-related-title { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; }

.page-links { display: flex; gap: 8px; margin-top: 28px; font-family: var(--sans); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; list-style: none; }

.share { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.share-label { display: block; font: 700 var(--fs-s)/1.2 var(--sans); margin-bottom: 12px; }
.share ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.share-status { display: block; min-height: 1.4em; margin-top: 8px; font: 600 var(--fs-xs)/1.4 var(--sans); color: var(--green); }

/* Kitas straipsnis */
.next-read { background: var(--ink); color: var(--bg); }
.next-read-link { display: grid; gap: 10px; padding: clamp(36px, 5vw, 56px) 0; text-decoration: none; max-width: 900px; }
.next-read-label { display: inline-flex; align-items: center; gap: 10px; font: 700 var(--fs-s)/1.2 var(--sans); color: var(--yellow); }
.next-read-label::after { content: ""; width: 38px; height: 2px; background: currentColor; }
.next-read-title { font: 800 clamp(1.5rem, 3.2vw, 2.375rem)/1.12 var(--serif); letter-spacing: -.015em; }
.next-read-meta { font: 500 var(--fs-s)/1.3 var(--sans); opacity: .78; }

.related { padding-top: clamp(40px, 5vw, 64px); }

/* 404 */
.lost { position: relative; max-width: 720px; padding: 48px 0 24px; }
.lost-code { font: 800 clamp(5rem, 16vw, 10rem)/.9 var(--serif); color: var(--surface-2); margin-bottom: 8px; letter-spacing: -.03em; }
.lost-text { margin: 16px 0 24px; color: var(--ink-2); font-size: 1.125rem; max-width: 60ch; }
.lost .search-form { margin-bottom: 20px; }

/* ---------- Poraštė ---------- */
.site-footer {
	--green: #2FA36B; --red: #E0443E;
	margin-top: 0; background: #0E2433; color: #C9DAE1; font-size: var(--fs-s);
}
:root[data-theme="dark"] .site-footer { background: #071620; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-top: 56px; padding-bottom: 40px; }
.footer-logo { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; margin-bottom: 14px; }
.footer-brand p { max-width: 42ch; line-height: 1.6; }
.footer-title { font: 750 1.0625rem/1.2 var(--serif); color: #fff; margin-bottom: 14px; }
.footer-col ul { list-style: none; display: grid; gap: 8px; }
.footer-col ul + ul { margin-top: 8px; }
.footer-col a { text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.footer-col a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--yellow); text-underline-offset: 4px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid rgba(255, 255, 255, .12); }
.flag-rule { display: flex; }
.flag-rule span { width: 28px; height: 4px; }
.flag-rule span:nth-child(1) { background: var(--yellow); border-radius: 2px 0 0 2px; }
.flag-rule span:nth-child(2) { background: var(--green); }
.flag-rule span:nth-child(3) { background: var(--red); border-radius: 0 2px 2px 0; }
.site-footer :focus-visible { outline-color: #fff; }

/* ---------- Mygtukas „Į viršų“ (žiedas rodo, kiek perskaityta) ---------- */
.to-top {
	position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40;
	display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
	background: var(--bg); color: var(--ink); box-shadow: var(--shadow); text-decoration: none;
	opacity: 0; visibility: hidden; transform: translateY(14px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--ink); color: var(--bg); }
.to-top > svg { grid-area: 1 / 1; }
.to-top-ring { width: 54px; height: 54px; transform: rotate(-90deg); }
.to-top-ring circle {
	fill: none; stroke: var(--yellow); stroke-width: 3.5; stroke-linecap: round;
	stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p, 0) * 100);
}

/* ---------- Prisitaikymas ---------- */
@media (max-width: 1100px) {
	.harbor-grid { grid-template-columns: minmax(0, 1fr) 300px; }
	.article-layout.has-toc { grid-template-columns: 210px minmax(0, 1fr); gap: 40px; }
}

@media (max-width: 960px) {
	:root { --header-h: 64px; }
	.nav-toggle { display: inline-grid; }
	.header-tools { margin-left: auto; }
	.primary-nav {
		position: absolute; left: 0; right: 0; top: 100%; margin: 0;
		background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
		padding: 8px var(--pad) 16px; display: none; max-height: calc(100vh - var(--header-h)); overflow: auto;
	}
	.primary-nav.is-open { display: block; }
	.primary-nav .menu { flex-direction: column; }
	.primary-nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 1.0625rem; }
	.primary-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 16px; }

	.harbor-grid { grid-template-columns: 1fr; }
	.harbor .card--feature .card-body { margin-right: 6%; }
	.harbor-rail { padding-top: 8px; }

	.list-layout { grid-template-columns: 1fr; }
	.list-aside { position: static; }

	.article-layout.has-toc { grid-template-columns: minmax(0, 1fr); }
	.article-rail { display: none; }
	.toc-mobile { display: block; }

	.footer-grid { grid-template-columns: 1fr 1fr; }
	.footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
	.topic-grid, .topic-section--flip .topic-grid { grid-template-columns: 1fr; }
	.topic-section--flip .topic-grid > .card--feature { order: 0; }

	.card--row { grid-template-columns: 1fr 112px; gap: 16px; padding: 20px 0; }
	.card--row .card-media { order: 2; }
	.card--row .media { aspect-ratio: 1; }
	.card--row .card-title { font-size: 1.125rem; }
	.card--row .card-excerpt { display: none; }

	.ticker-today { display: none; }
}

@media (max-width: 560px) {
	.brand-tag { display: none; }
	.brand-mark { width: 38px; height: 38px; }
	.harbor .card--feature .card-body { margin: -40px 0 0; padding: 16px 16px 0 0; }
	.entry-content { font-size: 1.125rem; line-height: 1.72; }
	.entry-content .alignleft, .entry-content .alignright { float: none; margin: 1em 0; max-width: 100%; }
	.footer-grid { grid-template-columns: 1fr; }
	.search-form { flex-direction: column; }
	.article-meta { flex-direction: column; align-items: flex-start; }
	.article-meta > * + * { border-left: 0; padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
	.ticker-track { overflow-x: auto; mask-image: none; -webkit-mask-image: none; }
	.ticker-list { animation: none; }
	.ticker-list[aria-hidden="true"] { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

@media print {
	.site-header, .ticker, .site-footer, .to-top, .share, .article-rail, .toc-mobile, .next-read, .related, .read-progress, .inline-related { display: none !important; }
	body { background: #fff; color: #000; }
	.article-layout, .article-layout.has-toc { grid-template-columns: 1fr; padding: 0; }
	.entry-content a::after { content: " (" attr(href) ")"; font-size: .8em; }
}
