/*
Theme Name: Paragrafas
Theme URI: https://istatymas.lt/
Author: istatymas.lt
Description: Greita, SEO optimizuota naujienų tema istatymas.lt. Veikia be įskiepių: SEO meta žymės, Open Graph, schema.org, canonical, robots, senų nuorodų nukreipimai, turinio rodyklė, susiję straipsniai, tamsus režimas, mygtukas į viršų su skaitymo progresu.
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: paragrafas
Tags: news, blog, two-columns, custom-logo, custom-menu, featured-images, translation-ready, accessibility-ready
*/

/* =========================================================
   1. Žetonai (spalvos, šriftai, matmenys)
   ========================================================= */
:root {
	--paper: #f2f4f1;      /* popierius: vėsus, šiek tiek žalsvas kaip oficialūs blankai */
	--paper-2: #e6eae6;    /* antrinis fonas */
	--card: #fafbf9;
	--ink: #182033;        /* rašalas: mėlynai juodas */
	--ink-2: #39435a;
	--muted: #5a6474;
	--rule: #c8ced4;
	--stamp: #3e3bb0;      /* antspaudo violetinė mėlyna */
	--stamp-ink: #2d2a8f;
	--marker: #efe46a;     /* žymeklis teisės aktų pakeitimams */
	--marker-soft: rgba(239, 228, 106, .55);
	--foot-bg: #182033;
	--foot-ink: #e9ecf0;

	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
	--serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, "Iowan Old Style", "Noto Serif", Georgia, serif;

	--wrap: 1240px;
	--gutter: clamp(16px, 4vw, 40px);
	--measure: 68ch;
	--fs-step: 1;
	--radius-img: 3px;
	--radius-ui: 6px;
}

[data-theme="dark"] {
	--paper: #12161f;
	--paper-2: #1b2130;
	--card: #161b26;
	--ink: #e8ebef;
	--ink-2: #c6ccd6;
	--muted: #9ea7b5;
	--rule: #2f3748;
	--stamp: #a3a0ff;
	--stamp-ink: #c4c2ff;
	--marker: #6b6516;
	--marker-soft: rgba(150, 140, 40, .45);
	--foot-bg: #0d1017;
	--foot-ink: #d7dce3;
	color-scheme: dark;
}

/* =========================================================
   2. Pagrindai
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 400 1rem/1.55 var(--sans);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--stamp); }
:focus-visible { outline: 3px solid var(--stamp); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--marker); color: #182033; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
time { font-variant-numeric: tabular-nums; }

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

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; word-wrap: normal !important;
}
.skip-link {
	position: absolute; left: 12px; top: -60px; z-index: 100;
	background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--radius-ui);
	font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--paper); }
.site-main { display: block; padding-bottom: 72px; outline: none; }

.icon { width: 20px; height: 20px; flex: none; }

/* =========================================================
   3. Viršus
   ========================================================= */
.site-head { border-bottom: 1px solid var(--rule); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 14px; }

.brand { margin: 0; font-size: inherit; }
.brand a { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 50px; height: 50px; color: var(--stamp); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-size: 1.75rem; font-weight: 800; letter-spacing: -.035em; }
.brand-name span { color: var(--stamp); }
.brand-tag { margin-top: 5px; font-size: .85rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.brand--custom img { max-height: 64px; width: auto; }

.head-tools { display: flex; align-items: center; gap: 6px; position: relative; }
.head-tools summary, .theme-toggle {
	display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px;
	border: 1.5px solid var(--rule); border-radius: var(--radius-ui); background: transparent;
	font-weight: 600; font-size: .95rem; list-style: none; cursor: pointer; color: var(--ink);
}
.head-tools summary::-webkit-details-marker { display: none; }
.head-tools summary:hover, .theme-toggle:hover { border-color: var(--ink); color: var(--ink); }
.theme-toggle { width: 42px; padding: 0; justify-content: center; }
.search-toggle[open] summary { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.search-panel {
	position: absolute; right: 0; top: calc(100% + 10px); z-index: 30;
	width: min(92vw, 440px); padding: 14px; background: var(--card);
	border: 2px solid var(--ink); border-radius: var(--radius-ui);
}

.search-form { display: flex; gap: 8px; }
.search-form input {
	flex: 1; min-width: 0; height: 46px; padding: 0 14px;
	font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper);
	border: 2px solid var(--ink); border-radius: var(--radius-ui);
}
.search-form button {
	height: 46px; padding: 0 18px; border: 0; border-radius: var(--radius-ui);
	background: var(--stamp); color: #fff; font-weight: 700;
}
[data-theme="dark"] .search-form button { color: #12161f; }
.search-form button:hover { background: var(--stamp-ink); }

/* Temų meniu: mobiliuose – horizontaliai slenkama eilutė, be „hamburgerio“. */
.nav { border-top: 1px solid var(--rule); }
.nav .menu { display: flex; gap: 4px; list-style: none; overflow-x: auto; scrollbar-width: none; padding: 6px 0; margin: 0 -10px; }
.nav .menu::-webkit-scrollbar { display: none; }
.nav .menu a {
	display: block; padding: 8px 10px; white-space: nowrap; text-decoration: none;
	font-weight: 600; font-size: .98rem; color: var(--ink-2); border-radius: var(--radius-ui);
}
.nav .menu a:hover { color: var(--ink); background: var(--paper-2); }
.nav .current-menu-item > a, .nav .current-cat > a, .nav .current-menu-ancestor > a {
	color: var(--ink); background: linear-gradient(var(--marker), var(--marker)) 10px 82% / calc(100% - 20px) .38em no-repeat;
}

/* Naujausių straipsnių juosta */
.ticker { background: var(--paper-2); border-top: 1px solid var(--rule); font-size: .92rem; }
.ticker-row { display: flex; align-items: center; gap: 16px; height: 42px; }
.ticker-label { flex: none; font-weight: 800; color: var(--stamp); }
.ticker-viewport { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 48px), transparent); }
.ticker-track { display: flex; width: max-content; animation: ticker 70s linear infinite; }
.ticker-track ul { display: flex; gap: 40px; padding-right: 40px; list-style: none; }
.ticker-track li { display: flex; gap: 10px; white-space: nowrap; }
.ticker-track time { color: var(--muted); }
.ticker-track a { text-decoration: none; font-weight: 600; }
.ticker-track a:hover { text-decoration: underline; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* =========================================================
   4. Kortelės
   ========================================================= */
.card { position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card-media { position: relative; display: block; overflow: hidden; border-radius: var(--radius-img); background: var(--paper-2); aspect-ratio: 16 / 10; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.03); }
.card-body { display: flex; flex-direction: column; gap: 8px; }
.card-cat a { font-size: .88rem; font-weight: 700; color: var(--stamp); text-decoration: none; }
.card-cat a:hover { text-decoration: underline; }
.card-title { font-size: 1.2rem; font-weight: 750; line-height: 1.22; }
.card-title a { text-decoration: none; }
.card-title a:hover { color: inherit; text-decoration: underline; text-decoration-color: var(--stamp); text-decoration-thickness: 2px; }
.card-excerpt { font-family: var(--serif); color: var(--ink-2); font-size: 1.02rem; line-height: 1.55; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: .85rem; color: var(--muted); }
.card-meta span::before { content: ""; display: inline-block; width: 1px; height: .9em; margin-right: 12px; vertical-align: -1px; background: var(--rule); }

/* Tipografinis pakaitalas, kai nėra nuotraukos */
.ph {
	position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: space-between;
	padding: 12px 14px; color: var(--stamp);
	background:
		repeating-linear-gradient(0deg, transparent 0 27px, color-mix(in srgb, var(--rule) 55%, transparent) 27px 28px),
		var(--paper-2);
}
.ph-sign { position: absolute; right: 8%; top: 50%; transform: translateY(-52%); font: 700 clamp(4rem, 9vw, 7rem)/1 var(--serif); opacity: .5; }
.ph-cat { position: relative; font-weight: 700; font-size: .9rem; color: var(--ink-2); }

/* „Perskaityta“ antspaudas */
.read-stamp {
	display: none; position: absolute; left: 10px; top: 10px; z-index: 2;
	padding: 3px 8px; transform: rotate(-7deg);
	border: 2px solid var(--stamp); border-radius: 4px;
	background: color-mix(in srgb, var(--paper) 88%, transparent);
	color: var(--stamp); font-size: .78rem; font-weight: 800; letter-spacing: .02em;
}
.card.is-read .read-stamp { display: block; }
.card.is-read .card-media img { filter: saturate(.55); }
.is-read > a::after, .reg-row.is-read .reg-title::after { content: " ✓"; color: var(--stamp); font-weight: 800; }

/* Pagrindinė kortelė: tekstas „priklijuotas“ ant nuotraukos kaip etiketė */
.card--lead { gap: 0; }
.card--lead .card-media { aspect-ratio: 16 / 9; }
.card--lead .card-body {
	position: relative; z-index: 1; width: min(88%, 760px); margin-top: -76px; margin-left: 0;
	padding: 24px 28px 6px 0; background: var(--paper); gap: 12px;
}
.card--lead .card-title { font-size: clamp(1.85rem, 1.1rem + 2.3vw, 3.05rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.06; }
.card--lead .card-excerpt { font-size: 1.15rem; max-width: 60ch; }
.card--lead .card-cat a { font-size: .95rem; }

/* Maža horizontali kortelė (šoninis stulpelis) */
.card--sm { flex-direction: row; align-items: flex-start; gap: 16px; }
.card--sm .card-media { width: 132px; flex: none; aspect-ratio: 4 / 3; }
.card--sm .card-title { font-size: 1.05rem; }
.card--sm .ph-sign { font-size: 3rem; right: 50%; transform: translate(50%, -52%); }
.card--sm .ph-cat { display: none; }
.card--sm .read-stamp { font-size: .66rem; left: 6px; top: 6px; padding: 2px 5px; }
.card--sm .card-meta span, .cat-block .card-meta span { display: none; }

/* =========================================================
   5. Pradžios puslapis
   ========================================================= */
.section-title { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 20px; }

.front-lead { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 40px; padding-top: 32px; }
.front-side { display: flex; flex-direction: column; gap: 22px; padding-left: 32px; border-left: 1px solid var(--rule); }
.front-side .card + .card { padding-top: 22px; border-top: 1px dotted var(--rule); }

.front-topics { margin-top: 56px; }
.topics { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; }
.topics a {
	display: inline-flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px;
	border: 1.5px solid var(--rule); border-radius: 999px; text-decoration: none; font-weight: 650; background: var(--card);
}
.topics a:hover { border-color: var(--stamp); color: var(--stamp); }
.topic-count { min-width: 28px; padding: 2px 8px; border-radius: 999px; background: var(--paper-2); color: var(--muted); font-size: .82rem; text-align: center; font-variant-numeric: tabular-nums; }
.topics--small { margin-top: 18px; }

/* Registras – naujausi straipsniai, kaip teisės aktų registro įrašai */
.front-register { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 48px; margin-top: 64px; align-items: start; }
.reg-list { list-style: none; border-top: 3px solid var(--ink); }
.reg-row { display: grid; grid-template-columns: 7.2rem minmax(0, 1fr) auto; gap: 18px; align-items: baseline; padding: 14px 0; border-bottom: 1px dotted var(--rule); }
.reg-date { color: var(--muted); font-size: .92rem; }
.reg-title { font-weight: 650; font-size: 1.08rem; line-height: 1.35; text-decoration: none; }
.reg-title:hover { text-decoration: underline; text-decoration-color: var(--stamp); }
.reg-cat { font-size: .85rem; color: var(--stamp); font-weight: 600; text-align: right; white-space: nowrap; }
.more-link { margin-top: 20px; }
.more-link a { font-weight: 700; color: var(--stamp); text-decoration-thickness: 2px; }

.front-note { position: sticky; top: 24px; padding: 28px; background: var(--paper-2); border-radius: var(--radius-ui); }
.note-mark { width: 84px; height: 84px; color: var(--stamp); margin-bottom: 16px; transform: rotate(-8deg); }
.front-note-title { font-weight: 800; font-size: 1.15rem; margin-bottom: 8px; }
.front-note p + p { margin-top: 10px; }
.front-note p:not(.front-note-title) { font-family: var(--serif); color: var(--ink-2); }
.front-note .front-note-small { font-family: var(--sans); font-size: .88rem; color: var(--muted); }

/* Kategorijų skyriai */
.front-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 48px; margin-top: 72px; }
.cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-top: 14px; margin-bottom: 22px; border-top: 3px solid var(--ink); }
.cat-title { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; }
.cat-title a { text-decoration: none; }
.sect { font-family: var(--serif); color: var(--stamp); margin-right: 8px; font-weight: 700; }
.cat-all { flex: none; font-size: .9rem; font-weight: 600; color: var(--muted); }
.cat-block .card--md { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: 20px; align-items: start; }
.cat-block .card--md .card-media { aspect-ratio: 4 / 3; }
.cat-block .card--md .card-title { font-size: 1.15rem; }
.cat-block .card--md .card-excerpt { font-size: .98rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cat-list { list-style: none; margin-top: 18px; }
.cat-list li { border-top: 1px dotted var(--rule); }
.cat-list a { display: block; padding: 12px 0; font-weight: 650; line-height: 1.35; text-decoration: none; }
.cat-list a:hover { text-decoration: underline; text-decoration-color: var(--stamp); }

.front-archive { margin-top: 80px; }

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

/* =========================================================
   6. Archyvai, paieška, 404
   ========================================================= */
.crumbs { padding: 22px 0 0; font-size: .88rem; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--rule); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current] span { color: var(--ink-2); display: inline-block; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

.archive-head { position: relative; padding: 28px 0 40px; margin-bottom: 40px; border-bottom: 1px solid var(--rule); }
.archive-sign { display: block; font: 700 clamp(4rem, 8vw, 6.5rem)/.9 var(--serif); color: var(--stamp); margin-bottom: 8px; }
.archive-title { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.archive-desc { margin-top: 14px; max-width: 64ch; font-family: var(--serif); font-size: 1.15rem; color: var(--ink-2); }
.archive-desc p + p { margin-top: .6em; }
.archive-meta { margin-top: 14px; color: var(--muted); font-weight: 600; display: flex; gap: 14px; }
.archive-lead { margin-bottom: 56px; }
.search-inline { margin-top: 22px; max-width: 560px; }
.nf-head .topics { margin-top: 24px; }
.empty { padding: 24px 0; font-family: var(--serif); font-size: 1.12rem; }
.empty .topics { margin-top: 18px; font-family: var(--sans); font-size: 1rem; }

.pager { margin-top: 56px; }
.pager ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.pager a, .pager span {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 14px;
	border: 1.5px solid var(--rule); border-radius: var(--radius-ui); text-decoration: none; font-weight: 700; font-variant-numeric: tabular-nums;
}
.pager a:hover { border-color: var(--ink); color: var(--ink); }
.pager .current { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pager .dots { border-color: transparent; }

/* =========================================================
   7. Straipsnis
   ========================================================= */
.entry-head { max-width: 920px; padding: 28px 0 32px; }
.entry-cat a { font-weight: 700; color: var(--stamp); text-decoration: none; }
.entry-cat a:hover { text-decoration: underline; }
.entry-title { margin-top: 12px; font-size: clamp(2rem, 1.2rem + 2.9vw, 3.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.06; }
.entry-lede { margin-top: 20px; max-width: 62ch; font-family: var(--serif); font-size: clamp(1.15rem, 1.05rem + .4vw, 1.35rem); line-height: 1.5; color: var(--ink-2); }
.entry-meta { display: flex; flex-wrap: wrap; gap: 14px 36px; margin: 26px 0 0; padding: 14px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.entry-meta dt { font-size: .8rem; color: var(--muted); }
.entry-meta dd { margin: 2px 0 0; font-weight: 650; }

.entry-figure { margin: 0 0 44px; }
.entry-figure img { width: 100%; aspect-ratio: 2 / 1; max-height: 560px; object-fit: cover; border-radius: var(--radius-img); }
.entry-figure figcaption { margin-top: 10px; font-size: .88rem; color: var(--muted); }

.entry-layout { display: grid; grid-template-columns: 236px minmax(0, 720px); gap: 56px; align-items: start; }
.entry-layout--single { grid-template-columns: minmax(0, 760px); }
.entry-margin { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 28px; font-size: .92rem; max-height: calc(100vh - 48px); overflow-y: auto; scrollbar-width: thin; }
.margin-title { font-weight: 800; font-size: .95rem; margin-bottom: 10px; color: var(--ink); }

.toc summary { list-style: none; cursor: pointer; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "–"; float: right; color: var(--muted); }
.toc:not([open]) summary::after { content: "+"; }
.toc ol { list-style: none; counter-reset: toc; border-left: 2px solid var(--rule); }
.toc li { counter-increment: toc; }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; color: var(--ink-2); line-height: 1.35; }
.toc .toc-l2 > a::before { content: counter(toc) ". "; color: var(--muted); font-variant-numeric: tabular-nums; }
.toc .toc-l3 > a { padding-left: 28px; font-size: .88rem; }
.toc .toc-l3 { counter-increment: none; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { border-left-color: var(--stamp); color: var(--ink); font-weight: 650; }

.text-size { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.text-size .margin-title { width: 100%; margin-bottom: 4px; }
.text-size button { width: 44px; height: 38px; border: 1.5px solid var(--rule); border-radius: var(--radius-ui); background: transparent; font-weight: 700; }
.text-size button:hover { border-color: var(--ink); }

.share ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.share a, .share button {
	display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 0; border: 0; background: none;
	text-decoration: none; color: var(--ink-2); font-size: .92rem; text-align: left;
}
.share a:hover, .share button:hover { color: var(--stamp); }
.share .is-done span { color: var(--stamp); font-weight: 700; }

/* Teksto tipografija */
.entry-content {
	font-family: var(--serif); font-size: calc(1.15rem * var(--fs-step)); line-height: 1.72; color: var(--ink);
	max-width: var(--measure); overflow-wrap: break-word;
}
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2 { margin-top: 2.1em; font-family: var(--sans); font-size: 1.55em; font-weight: 800; letter-spacing: -.02em; scroll-margin-top: 24px; }
.entry-content h3 { margin-top: 1.8em; font-family: var(--sans); font-size: 1.22em; font-weight: 750; scroll-margin-top: 24px; }
.entry-content h4 { margin-top: 1.6em; font-family: var(--sans); font-size: 1.05em; font-weight: 750; }
.entry-content h2 + *, .entry-content h3 + *, .entry-content h4 + * { margin-top: .6em; }
.entry-content a {
	color: inherit; text-decoration: none;
	background: linear-gradient(var(--marker), var(--marker)) 0 88% / 100% .3em no-repeat;
	transition: background-size .2s ease;
}
.entry-content a:hover { background-size: 100% 100%; color: inherit; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li + li { margin-top: .45em; }
.entry-content li::marker { color: var(--stamp); }
.entry-content strong { font-weight: 700; }
.entry-content mark { background: var(--marker-soft); color: inherit; padding: 0 .1em; }
.entry-content blockquote {
	margin-left: 0; margin-right: 0; padding: .2em 0 .2em 1.2em; border-left: 4px solid var(--stamp);
	font-size: 1.08em; color: var(--ink-2);
}
.entry-content blockquote cite { display: block; margin-top: .5em; font-family: var(--sans); font-size: .8em; font-style: normal; color: var(--muted); }
.entry-content img { border-radius: var(--radius-img); }
.entry-content figure { margin-left: 0; margin-right: 0; }
.entry-content figcaption, .entry-content .wp-element-caption { margin-top: .6em; font-family: var(--sans); font-size: .82em; color: var(--muted); }
.entry-content hr { border: 0; height: 0; border-top: 1px solid var(--rule); margin: 2.4em 0; }
.entry-content table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: .9em; line-height: 1.45; }
.entry-content th, .entry-content td { padding: .65em .8em; border: 1px solid var(--rule); text-align: left; vertical-align: top; }
.entry-content th { background: var(--paper-2); font-weight: 700; }
.entry-content tr:nth-child(even) td { background: color-mix(in srgb, var(--paper-2) 45%, transparent); }
.table-scroll, .wp-block-table { overflow-x: auto; }
.entry-content .alignwide { max-width: none; width: min(100vw - var(--gutter) * 2, 1000px); }
.entry-content iframe, .entry-content .wp-block-embed { max-width: 100%; }
.entry-content code { font-size: .88em; padding: .1em .3em; background: var(--paper-2); border-radius: 3px; }
.entry-content pre { overflow-x: auto; padding: 1em; background: var(--paper-2); border-radius: var(--radius-ui); font-size: .85em; }

.also { margin: 2em 0; padding: 18px 22px; background: var(--paper-2); border-radius: var(--radius-ui); font-family: var(--sans); }
.also-title { font-size: .85rem; font-weight: 800; color: var(--stamp); margin-bottom: 8px; }
.also ul { list-style: none; padding: 0; }
.also li + li { margin-top: 6px; }
.entry-content .also a { background: none; font-weight: 700; font-size: 1.02rem; line-height: 1.35; }
.entry-content .also a:hover { text-decoration: underline; text-decoration-color: var(--stamp); }

.note { margin-top: 2.4em; padding: 16px 20px; border: 1.5px dashed var(--rule); border-radius: var(--radius-ui); font-family: var(--sans); font-size: .9rem; color: var(--muted); line-height: 1.55; }
.note p::before { content: "Pastaba. "; font-weight: 800; color: var(--ink); }

.entry-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0 !important; font-family: var(--sans); }
.entry-tags li { margin: 0 !important; }
.entry-content .entry-tags a { display: inline-block; padding: 5px 12px; border: 1.5px solid var(--rule); border-radius: 999px; background: none; font-size: .85rem; font-weight: 600; }
.entry-content .entry-tags a:hover { border-color: var(--stamp); color: var(--stamp); }

.page-links { font-family: var(--sans); font-weight: 700; display: flex; gap: 8px; }

.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 64px; padding-top: 18px; border-top: 3px solid var(--ink); }
.pn { display: flex; flex-direction: column; gap: 6px; text-decoration: none; }
.pn-next { text-align: right; grid-column: 2; }
.pn-label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.pn-title { font-weight: 750; font-size: 1.1rem; line-height: 1.3; }
.pn:hover .pn-title { text-decoration: underline; text-decoration-color: var(--stamp); }

.related { margin-top: 80px; }
.widgets { margin-top: 48px; }
.widget + .widget { margin-top: 32px; }
.widget-title { font-size: 1.1rem; margin-bottom: 12px; }

/* =========================================================
   8. Apačia
   ========================================================= */
.site-foot { background: var(--foot-bg); color: var(--foot-ink); padding-top: 64px; }
.site-foot a { color: var(--foot-ink); text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr 1fr; gap: 40px; }
.foot-mark { width: 64px; height: 64px; color: #b9b7ff; margin-bottom: 14px; }
.foot-name { font-weight: 800; font-size: 1.3rem; margin-bottom: 8px; }
.foot-about p:last-child { font-family: var(--serif); opacity: .85; max-width: 38ch; }
.foot-title { font-size: 1rem; font-weight: 800; margin-bottom: 14px; color: #fff; }
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; font-size: .95rem; }
.foot-col .count { opacity: .55; font-size: .85em; font-variant-numeric: tabular-nums; }
.foot-latest a { line-height: 1.35; display: block; }
.foot-extra { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .15); }
.foot-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 56px; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: .88rem; opacity: .75; }

/* =========================================================
   9. Mygtukas „Į viršų“ (antspaudas su skaitymo progresu) ir „Tęsti skaitymą“
   ========================================================= */
.to-top {
	position: fixed; right: 20px; bottom: 20px; z-index: 40;
	display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
	background: var(--paper); color: var(--stamp); text-decoration: none;
	box-shadow: 0 0 0 4px var(--paper);
	transition: opacity .25s ease, transform .25s ease;
}
.to-top .icon { grid-area: 1 / 1; width: 24px; height: 24px; }
.to-top-ring { grid-area: 1 / 1; width: 58px; height: 58px; transform: rotate(-90deg); }
.to-top-ring circle { fill: none; stroke-width: 3; }
.ring-bg { stroke: var(--rule); }
.ring-fg { stroke: var(--stamp); stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--progress, 0)); stroke-linecap: round; }
.to-top:hover { color: var(--stamp-ink); transform: translateY(-2px); }
.js .to-top { opacity: 0; pointer-events: none; transform: translateY(10px); }
.js .to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }

.resume {
	position: fixed; left: 20px; bottom: 20px; z-index: 39; display: flex; gap: 14px; align-items: flex-start;
	width: min(380px, calc(100vw - 110px)); padding: 14px 14px 14px 18px; border-radius: var(--radius-ui);
	background: var(--ink); color: var(--paper);
}
.resume p { font-size: .8rem; opacity: .75; margin-bottom: 3px; }
.resume a { color: var(--paper); font-weight: 700; line-height: 1.3; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.resume a:hover { text-decoration: underline; color: var(--paper); }
.resume button { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: var(--paper); }
[data-theme="dark"] .resume button { background: rgba(0, 0, 0, .12); }

/* =========================================================
   10. Prisitaikymas
   ========================================================= */
@media (max-width: 1100px) {
	.foot-grid { grid-template-columns: 1fr 1fr; }
	.entry-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 40px; }
}

@media (max-width: 960px) {
	.front-lead { grid-template-columns: 1fr; gap: 32px; }
	.front-side { padding-left: 0; border-left: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
	.front-side .card + .card { padding-top: 0; border-top: 0; }
	.front-register { grid-template-columns: 1fr; }
	.front-note { position: static; }
	.front-sections { grid-template-columns: 1fr; }
	.grid-3 { grid-template-columns: 1fr 1fr; }

	.entry-layout { grid-template-columns: 1fr; gap: 28px; }
	.entry-margin { position: static; max-height: none; overflow: visible; order: -1; gap: 18px; }
	.toc { padding: 14px 18px; background: var(--paper-2); border-radius: var(--radius-ui); }
	.toc ol { margin-top: 6px; }
	.share { order: 2; }
	.share ul { flex-direction: row; flex-wrap: wrap; gap: 6px; }
	.share a, .share button { width: auto; padding: 8px 12px; border: 1.5px solid var(--rule); border-radius: 999px; }
	.share span { font-size: .85rem; }
	.entry-margin .share, .entry-margin .text-size { display: none; }
	.entry-content { max-width: none; }
}

@media (max-width: 640px) {
	.head-row { padding-top: 14px; padding-bottom: 10px; }
	.brand-mark { width: 40px; height: 40px; }
	.brand-name { font-size: 1.4rem; }
	.brand-tag { font-size: .78rem; }
	.tool-label { display: none; }
	.head-tools summary { padding: 0; width: 42px; justify-content: center; }
	.search-panel { position: fixed; left: var(--gutter); right: var(--gutter); top: 76px; width: auto; }
	.ticker-label { display: none; }
	.crumbs li[aria-current] { display: none; }

	.card--lead .card-body { width: 100%; margin-top: 0; padding: 18px 0 0; }
	.front-side { grid-template-columns: 1fr; }
	.card--sm .card-media { width: 104px; }
	.grid-3 { grid-template-columns: 1fr; gap: 36px; }

	.reg-row { grid-template-columns: 1fr; gap: 4px; }
	.cat-block .card--md { grid-template-columns: minmax(0, 38%) minmax(0, 1fr); gap: 14px; }
	.cat-block .card--md .card-excerpt { display: none; }
	.entry-figure img { aspect-ratio: 3 / 2; }
	.reg-cat { text-align: left; }

	.entry-meta { gap: 10px 22px; }
	.entry-figure { margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); }
	.entry-figure img { border-radius: 0; }
	.entry-figure figcaption { padding: 0 var(--gutter); }
	.prevnext { grid-template-columns: 1fr; gap: 20px; }
	.pn-next { grid-column: auto; text-align: left; }

	.foot-grid { grid-template-columns: 1fr; }
	.to-top { right: 14px; bottom: 14px; width: 52px; height: 52px; }
	.to-top-ring { width: 52px; height: 52px; }
	.resume { left: 14px; bottom: 14px; width: calc(100vw - 92px); }
}

/* Dalinimosi mygtukai straipsnio apačioje (mobiliems) */
.entry-content .share ul { padding: 0; }
.entry-content .share li { margin: 0; }
.entry-content .share a { background: none; }
.share-bottom { display: none; }
@media (max-width: 960px) {
	.share-bottom { display: block; margin-top: 28px; font-family: var(--sans); }
	.share-bottom .share { display: block; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
	.ticker-track { animation: none; }
	.ticker-viewport { overflow-x: auto; mask-image: none; }
	.ticker-track ul[aria-hidden] { display: none; }
}

@media print {
	.site-head, .site-foot, .entry-margin, .to-top, .resume, .related, .prevnext, .also, .crumbs { display: none !important; }
	body { background: #fff; color: #000; }
	.entry-layout { display: block; }
	.entry-content a { background: none; text-decoration: underline; }
}
