/*
Theme Name: Amokslas
Theme URI: https://amokslas.lt/
Author: Amokslas
Description: Greita, SEO optimizuota naujienų portalo tema amokslas.lt. Veikia be papildomų įskiepių: įtraukti meta aprašymai, Open Graph, schema.org (NewsArticle, BreadcrumbList), 404 nukreipimai, peržiūrų skaitiklis, turinio sąrašas, skaitymo progresas, tamsus režimas, prisijungimo apsauga. Suderinta su WP Fastest Cache.
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: amokslas
Tags: news, blog, two-columns, right-sidebar, custom-menu, featured-images, translation-ready, accessibility-ready
*/

/* ==========================================================================
   1. Žetonai (spalvos, šriftai, tarpai)
   ========================================================================== */
:root {
	--paper: #F4F6F9;
	--surface: #FFFFFF;
	--ink: #13294B;          /* Prūsų mėlyna — antraštės, logotipas */
	--text: #1C2433;
	--muted: #586580;
	--rule: #DCE3EC;
	--rule-strong: #C3CEDC;
	--accent: #0B7489;       /* Vario sulfatas — nuorodos (AA kontrastas) */
	--accent-bright: #22B8CF;
	--sodium: #F5B700;       /* Natrio liepsna — „Nauja“ žymė */
	--shadow: 0 10px 30px -12px rgba(19, 41, 75, .35);

	--tone-cyan: #0B7F96;
	--tone-indigo: #4152C4;
	--tone-teal: #10806A;
	--tone-amber: #A86A12;
	--tone-rose: #BE3A64;
	--tone-violet: #7448C0;

	--logo-tile: var(--ink);
	--logo-am: #FFFFFF;
	--logo-word: var(--ink);

	--serif: "Amk Schola", "Century Schoolbook", "TeX Gyre Schola", Georgia, "Times New Roman", serif;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	--fs-12: .75rem;
	--fs-14: .875rem;
	--fs-15: .9375rem;
	--fs-17: 1.0625rem;
	--fs-19: 1.1875rem;
	--fs-22: 1.375rem;
	--fs-26: 1.625rem;
	--fs-32: 2rem;
	--fs-40: 2.5rem;
	--fs-48: 3rem;

	--wrap: 1240px;
	--gutter: clamp(16px, 3.5vw, 32px);
	--radius: 6px;
	--header-h: 64px;
	color-scheme: light;
}

:root[data-theme="dark"] {
	--paper: #0C1628;
	--surface: #13203A;
	--ink: #EAF0F8;
	--text: #D5DCE8;
	--muted: #95A3BA;
	--rule: #24365A;
	--rule-strong: #2F446C;
	--accent: #5CD0E2;
	--shadow: 0 10px 30px -10px rgba(0, 0, 0, .6);
	--tone-cyan: #4FC9DD;
	--tone-indigo: #8F9CF2;
	--tone-teal: #47C9A6;
	--tone-amber: #F0B04F;
	--tone-rose: #F07DA0;
	--tone-violet: #B89AF2;
	--logo-tile: #22406F;
	--logo-word: #EAF0F8;
	color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--paper: #0C1628;
		--surface: #13203A;
		--ink: #EAF0F8;
		--text: #D5DCE8;
		--muted: #95A3BA;
		--rule: #24365A;
		--rule-strong: #2F446C;
		--accent: #5CD0E2;
		--shadow: 0 10px 30px -10px rgba(0, 0, 0, .6);
		--tone-cyan: #4FC9DD;
		--tone-indigo: #8F9CF2;
		--tone-teal: #47C9A6;
		--tone-amber: #F0B04F;
		--tone-rose: #F07DA0;
		--tone-violet: #B89AF2;
		--logo-tile: #22406F;
		--logo-word: #EAF0F8;
		color-scheme: dark;
	}
}

/* ==========================================================================
   2. Pagrindai
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-h) + 16px);
}

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

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

a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); font-weight: 700; line-height: 1.18; margin: 0; letter-spacing: -.012em; }
p { margin: 0; }

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

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

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

.site-main { display: block; min-height: 60vh; outline: none; }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 0 20px;
	background: var(--ink); color: var(--paper);
	border: 1px solid var(--ink); border-radius: 999px;
	font: 600 var(--fs-15)/1 var(--sans);
	text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.icon-btn {
	display: inline-grid; place-items: center;
	width: 44px; height: 44px; padding: 0;
	background: none; border: 0; border-radius: 50%;
	color: var(--ink); cursor: pointer;
}
.icon-btn svg { width: 22px; height: 22px; fill: currentColor; }
.icon-btn:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }

/* ==========================================================================
   3. Logotipas
   ========================================================================== */
.brand { margin: 0; font-size: 0; line-height: 0; }
.brand a { display: inline-block; }
.brand__svg { width: auto; height: 38px; display: block; }
.brand__tile { fill: var(--logo-tile); }
.brand__band { fill: var(--accent-bright); }
.brand__z { fill: var(--logo-am); fill-opacity: .7; }
.brand__am { fill: var(--logo-am); }
.brand__word { fill: var(--logo-word); }

/* ==========================================================================
   4. Antraštė
   ========================================================================== */
.masthead {
	position: sticky; top: 0; z-index: 50;
	background: var(--surface);
	border-bottom: 1px solid var(--rule);
}
.admin-bar .masthead { top: 32px; }
@media (max-width: 782px) { .admin-bar .masthead { top: 0; } }

.masthead.is-scrolled { box-shadow: 0 6px 18px -14px rgba(19, 41, 75, .5); }

.masthead__bar {
	display: flex; align-items: center; gap: 24px;
	height: var(--header-h);
}
.masthead__menu { display: none; margin-left: -10px; }

.nav { flex: 1; min-width: 0; }
.nav__list, .nav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.nav__list::-webkit-scrollbar { display: none; }
.nav a {
	display: block; padding: 8px 12px; border-radius: 999px;
	color: var(--text); text-decoration: none; white-space: nowrap;
	font-size: var(--fs-15); font-weight: 500;
}
.nav a:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.nav .is-current a, .nav .current-menu-item a, .nav .current-post-ancestor a, .nav .current-category-ancestor a {
	color: var(--ink); font-weight: 650;
	box-shadow: inset 0 -2px 0 var(--accent-bright);
	border-radius: 0;
}

.masthead__tools { display: flex; align-items: center; gap: 2px; margin-left: auto; }

.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 { border-top: 1px solid var(--rule); background: var(--surface); padding: 16px 0 20px; }

.search { position: relative; display: flex; gap: 8px; max-width: 720px; }
.search__icon { position: absolute; left: 16px; top: 50%; translate: 0 -50%; width: 20px; height: 20px; fill: var(--muted); pointer-events: none; }
.search__input {
	flex: 1; min-width: 0; height: 48px; padding: 0 16px 0 46px;
	border: 1px solid var(--rule-strong); border-radius: 999px;
	background: var(--paper); color: var(--text);
	font: 400 var(--fs-17) var(--sans);
}
.search__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-bright) 30%, transparent); }
.search .btn { min-height: 48px; }

/* Mobilusis meniu */
@media (max-width: 960px) {
	.masthead__bar { gap: 8px; }
	.masthead__menu { display: inline-grid; }
	.brand { margin-right: auto; }
	.brand__svg { height: 32px; }
	.nav {
		position: fixed; inset: var(--header-h) 0 auto 0; z-index: 49;
		max-height: calc(100dvh - var(--header-h));
		overflow-y: auto;
		background: var(--surface);
		border-bottom: 1px solid var(--rule);
		padding: 8px var(--gutter) 20px;
		box-shadow: var(--shadow);
		display: none;
	}
	.admin-bar .nav { top: calc(var(--header-h) + 46px); }
	.nav.is-open { display: block; }
	.nav__list, .nav ul { flex-direction: column; gap: 0; overflow: visible; }
	.nav a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--rule); font-size: var(--fs-17); }
	.nav .is-current a, .nav .current-menu-item a { box-shadow: inset 3px 0 0 var(--accent-bright); padding-left: 12px; }
	.masthead__tools .tool-random { display: none; }
}

/* ==========================================================================
   5. „Naujausia“ juosta
   ========================================================================== */
.ticker { background: var(--ink); color: #DCE6F3; font-size: var(--fs-14); }
:root[data-theme="dark"] .ticker { background: #081020; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ticker { background: #081020; } }

.ticker__inner { display: flex; align-items: center; gap: 16px; height: 44px; }
.ticker__label {
	flex: none; padding: 3px 8px; border-radius: 3px;
	background: var(--sodium); color: #13294B; font-weight: 700; font-size: var(--fs-12);
}
.ticker__list {
	display: flex; gap: 28px; margin: 0; padding: 0; list-style: none;
	overflow-x: auto; scrollbar-width: none; white-space: nowrap;
	mask-image: linear-gradient(90deg, #000 85%, transparent);
}
.ticker__list::-webkit-scrollbar { display: none; }
.ticker__list li { display: flex; gap: 8px; align-items: baseline; }
.ticker time { color: #8FA3C0; font-size: var(--fs-12); font-variant-numeric: tabular-nums; }
.ticker a { color: #fff; text-decoration: none; }
.ticker a:hover { text-decoration: underline; }
.ticker .is-read a { color: #9FB0C8; }

/* ==========================================================================
   6. Kortelės
   ========================================================================== */
.c { position: relative; min-width: 0; }
.c__title a { color: inherit; text-decoration: none; }
.c__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--accent-bright); }
.c__kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; min-height: 20px; }
.c__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 10px; color: var(--muted); font-size: var(--fs-14); }
.c__excerpt { margin-top: 10px; color: var(--muted); font-size: var(--fs-17); line-height: 1.5; }
.c__new { padding: 2px 6px; border-radius: 3px; background: var(--sodium); color: #13294B; font-size: var(--fs-12); font-weight: 700; line-height: 1.3; }

/* Jau skaityta (naršyklės atmintyje) */
.c.is-read .c__title a { color: var(--muted); }
.c.is-read .c__meta::after { content: "Perskaityta"; color: var(--tone-teal); font-weight: 600; }

/* Kategorijos žymė */
.chip {
	display: inline-flex; align-items: center; gap: 7px;
	font: 650 var(--fs-14)/1.2 var(--sans);
	color: var(--chip, var(--tone-cyan)); text-decoration: none;
}
.chip::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: currentColor; }
a.chip:hover { text-decoration: underline; }
.chip--cyan { --chip: var(--tone-cyan); }
.chip--indigo { --chip: var(--tone-indigo); }
.chip--teal { --chip: var(--tone-teal); }
.chip--amber { --chip: var(--tone-amber); }
.chip--rose { --chip: var(--tone-rose); }
.chip--violet { --chip: var(--tone-violet); }

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

/* Vietoj paveikslėlio — periodinės lentelės langelis */
.media__ph {
	--t: var(--tone-cyan);
	position: absolute; inset: 0;
	display: grid; place-items: center;
	background:
		linear-gradient(color-mix(in srgb, var(--t) 10%, transparent) 1px, transparent 1px) 0 0 / 22px 22px,
		linear-gradient(90deg, color-mix(in srgb, var(--t) 10%, transparent) 1px, transparent 1px) 0 0 / 22px 22px,
		color-mix(in srgb, var(--t) 12%, var(--surface));
	color: var(--t);
	font-family: var(--serif);
}
.media__ph-cell {
	position: relative;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	width: min(44%, 150px); aspect-ratio: 1;
	padding: 10% 8%;
	border: 2px solid currentColor; border-radius: 10%;
	background: var(--surface);
}
.media__ph-z { position: absolute; top: 8%; left: 10%; font-size: var(--fs-14); line-height: 1; }
.media__ph-sym { font-size: clamp(26px, 4.4vw, 54px); font-weight: 700; line-height: 1; }
.media__ph-name {
	margin-top: 8%; max-width: 100%;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
	font: 600 var(--fs-12)/1.1 var(--sans);
}
.media__ph--indigo { --t: var(--tone-indigo); }
.media__ph--teal { --t: var(--tone-teal); }
.media__ph--amber { --t: var(--tone-amber); }
.media__ph--rose { --t: var(--tone-rose); }
.media__ph--violet { --t: var(--tone-violet); }

/* Didžioji */
.c--lead .c__media { aspect-ratio: 16 / 9; }
.c--lead .c__body { padding-top: 18px; }
.c--lead .c__title { font-size: clamp(var(--fs-26), 3.4vw, var(--fs-40)); line-height: 1.12; text-wrap: balance; }
.c--lead .c__excerpt { font-family: var(--serif); font-size: var(--fs-19); max-width: 62ch; }

/* Tinklelio */
.c--card .c__body { padding-top: 14px; }
.c--card .c__title { font-size: var(--fs-22); line-height: 1.22; }

/* Eilutė */
.c--row { display: grid; grid-template-columns: 1fr 148px; gap: 20px; align-items: start; padding: 20px 0; border-top: 1px solid var(--rule); }
.c--row .c__media { aspect-ratio: 4 / 3; }
.c--row .c__title { font-size: var(--fs-22); line-height: 1.22; }
.c--row .c__excerpt { font-size: var(--fs-15); }
.c--row .media__ph-cell { width: 64%; padding: 0; }
.c--row .media__ph-z, .c--row .media__ph-name { display: none; }
.c--row .media__ph-sym { font-size: 26px; }

/* Reitingas */
.c--mini { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: start; list-style: none; }
.c__rank {
	display: grid; place-items: center;
	width: 52px; height: 52px; border-radius: 6px;
	background: var(--ink); color: var(--paper);
	font: 700 var(--fs-26)/1 var(--serif);
	position: relative;
}
.c__rank::after { content: ""; position: absolute; top: 6px; right: 6px; width: 11px; height: 3px; border-radius: 2px; background: var(--accent-bright); }
:root[data-theme="dark"] .c__rank { background: #22406F; color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .c__rank { background: #22406F; color: #fff; } }
.c--mini .c__title { font-size: var(--fs-17); line-height: 1.3; }
.c--mini .c__meta { margin-top: 6px; font-size: var(--fs-12); }
.c--mini .chip { font-size: var(--fs-12); }

/* ==========================================================================
   7. Pagrindinio puslapio blokai
   ========================================================================== */
.hero {
	display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
	gap: 40px; padding-top: 32px; padding-bottom: 40px;
}
.hero__side { display: flex; flex-direction: column; }
.hero__side .c--row { grid-template-columns: 1fr 112px; gap: 16px; padding: 16px 0; }
.hero__side .c--row:first-child { border-top: 0; padding-top: 0; }
.hero__side .c--row .c__title { font-size: var(--fs-19); }

.band { padding-top: 40px; padding-bottom: 40px; border-top: 1px solid var(--rule); }
.band__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.band__title { display: flex; align-items: center; gap: 12px; font-size: var(--fs-32); }
.band__title a { color: inherit; text-decoration: none; }
.band__title a:hover { text-decoration: underline; text-decoration-color: var(--accent-bright); }
.band__more { font-size: var(--fs-15); font-weight: 600; text-decoration: none; }
.band__more:hover { text-decoration: underline; }

.band--topic .band__title::before {
	content: ""; width: 14px; height: 14px; border-radius: 3px;
	background: var(--chip, var(--tone-cyan));
}
.band--cyan { --chip: var(--tone-cyan); }
.band--indigo { --chip: var(--tone-indigo); }
.band--teal { --chip: var(--tone-teal); }
.band--amber { --chip: var(--tone-amber); }
.band--rose { --chip: var(--tone-rose); }
.band--violet { --chip: var(--tone-violet); }

.band--popular { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 28px 28px 32px; margin-bottom: 32px; }
.band--popular .band__head { margin-bottom: 20px; }
.band--popular .band__title { font-size: var(--fs-26); }
.ranked { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; margin: 0; padding: 0; list-style: none; }
.ranked--stack { grid-template-columns: 1fr; gap: 18px; }

.grid { display: grid; gap: 32px 28px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--4 .c--card .c__title { font-size: var(--fs-19); }

/* Turinys + šoninė juosta */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; padding-top: 40px; padding-bottom: 56px; }
section.layout { border-top: 1px solid var(--rule); }
.feed .c--row:first-child { border-top: 0; padding-top: 4px; }
.layout__main > .c--lead { margin-bottom: 16px; padding-bottom: 8px; }
.layout__main > .c--lead + .feed .c--row:first-child { border-top: 1px solid var(--rule); padding-top: 20px; }

.more { display: flex; justify-content: center; margin-top: 24px; }
.more .btn { min-width: 260px; }
.more.is-loading .btn { opacity: .6; pointer-events: none; }

.pager ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 28px 0 0; padding: 0; list-style: none; }
.pager a, .pager span {
	display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px;
	border-radius: 999px; text-decoration: none; font-size: var(--fs-15);
	color: var(--text); border: 1px solid var(--rule);
}
.pager .current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pager a:hover { border-color: var(--ink); }
.js .has-more .pager { display: none; }

.sidebar { display: flex; flex-direction: column; gap: 36px; }
.sidebar__title { font-size: var(--fs-22); margin-bottom: 16px; }
.sidebar__box--tile {
	position: relative; padding: 24px; border-radius: 10px;
	background: var(--surface); border: 1px solid var(--rule);
}
.sidebar__box--tile p { color: var(--muted); font-size: var(--fs-15); margin-bottom: 16px; }
.sidebar__box--tile .sidebar__title { padding-right: 56px; }
.tile-mark {
	position: absolute; top: 20px; right: 20px;
	display: grid; place-items: center; width: 44px; height: 44px; border-radius: 6px;
	background: var(--ink); color: var(--paper); font: 700 22px/1 var(--serif);
}
@media (min-width: 1101px) {
	.layout__side { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
}

.catlist { margin: 0; padding: 0; list-style: none; }
.catlist a {
	display: flex; align-items: center; gap: 10px; padding: 10px 0;
	border-bottom: 1px solid var(--rule);
	color: var(--text); text-decoration: none; font-size: var(--fs-15);
}
.catlist a:hover { color: var(--accent); }
.catlist__dot { width: 9px; height: 9px; border-radius: 2px; flex: none; background: var(--tone-cyan); }
.catlist__dot--indigo { background: var(--tone-indigo); }
.catlist__dot--teal { background: var(--tone-teal); }
.catlist__dot--amber { background: var(--tone-amber); }
.catlist__dot--rose { background: var(--tone-rose); }
.catlist__dot--violet { background: var(--tone-violet); }
.catlist__n { margin-left: auto; color: var(--muted); font-size: var(--fs-14); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   8. Archyvo / paieškos antraštė
   ========================================================================== */
.page-head { padding-top: 28px; padding-bottom: 8px; }
.page-head__title { font-size: clamp(var(--fs-32), 4.4vw, var(--fs-48)); line-height: 1.08; margin-top: 8px; }
.page-head__desc { max-width: 66ch; margin-top: 12px; color: var(--muted); font-family: var(--serif); font-size: var(--fs-19); }
.page-head__desc p + p { margin-top: .6em; }
.page-head__count { margin-top: 10px; color: var(--muted); font-size: var(--fs-15); }
.page-head__search { margin-top: 20px; }

.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 0; list-style: none; font-size: var(--fs-14); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--rule-strong); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs [aria-current] { display: inline-block; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

.empty { padding: 24px; border: 1px dashed var(--rule-strong); border-radius: 10px; color: var(--muted); }
.empty .catlist { margin-top: 16px; }

/* ==========================================================================
   9. Straipsnis
   ========================================================================== */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.admin-bar .progress { top: 32px; }
.progress__bar { display: block; height: 100%; background: var(--accent-bright); transform-origin: 0 50%; transform: scaleX(0); }

.wrap--article { max-width: calc(760px + 2 * var(--gutter) + 260px); padding-left: calc(var(--gutter) + 260px); }
.wrap--figure { max-width: calc(1040px + 2 * var(--gutter)); }

.article__head { padding-top: 28px; padding-bottom: 28px; }
.article__kicker { margin-top: 20px; }
.article__title { margin-top: 12px; font-size: clamp(var(--fs-32), 4.6vw, var(--fs-48)); line-height: 1.1; text-wrap: balance; }
.article__deck { margin-top: 16px; font: italic 400 var(--fs-22)/1.45 var(--serif); color: var(--muted); max-width: 60ch; }
.article__meta { display: flex; flex-wrap: wrap; gap: 6px 0; margin-top: 20px; color: var(--muted); font-size: var(--fs-15); }
.article__meta > span:not(:last-child)::after { content: ""; display: inline-block; width: 1px; height: 14px; margin: 0 14px; background: var(--rule-strong); vertical-align: -2px; }
.article__author { color: var(--text); font-weight: 600; }

.article__figure { margin: 0 auto 8px; }
.article__figure img { width: 100%; border-radius: var(--radius); aspect-ratio: 16 / 9; object-fit: cover; }
.article__figure figcaption { margin-top: 8px; color: var(--muted); font-size: var(--fs-14); }

.article__grid { display: grid; grid-template-columns: 220px minmax(0, 760px); gap: 40px; max-width: calc(1040px + 2 * var(--gutter)); padding-top: 24px; padding-bottom: 40px; }
.article__sticky { position: sticky; top: calc(var(--header-h) + 28px); display: flex; flex-direction: column; gap: 28px; }

/* Turinio sąrašas */
.toc ol { margin: 0; padding: 0; list-style: none; }
.toc__title { font: 650 var(--fs-14)/1.3 var(--sans); color: var(--ink); margin-bottom: 10px; }
.toc a { display: block; padding: 6px 0 6px 14px; border-left: 2px solid var(--rule); color: var(--muted); text-decoration: none; font-size: var(--fs-14); line-height: 1.35; }
.toc .toc__l3 a { padding-left: 26px; font-size: var(--fs-12); }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--accent-bright); font-weight: 600; }
.toc--aside { max-height: calc(100vh - var(--header-h) - 180px); overflow-y: auto; scrollbar-width: thin; }
.toc--inline { display: none; margin-bottom: 28px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); }
.toc--inline summary { padding: 14px 18px; cursor: pointer; font-weight: 650; color: var(--ink); }
.toc--inline ol { padding: 0 18px 16px; }

/* Dalijimasis */
.share { display: flex; flex-wrap: wrap; gap: 8px; }
.share__btn {
	display: inline-flex; align-items: center; gap: 8px; height: 40px; min-width: 40px; padding: 0 10px; justify-content: center;
	border: 1px solid var(--rule); border-radius: 999px; background: var(--surface);
	color: var(--ink); font: 600 var(--fs-14) var(--sans); text-decoration: none; cursor: pointer;
}
.share__btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.share__btn:hover { border-color: var(--ink); }
.share__copy-label { display: none; }
.share__copy.is-done { border-color: var(--tone-teal); color: var(--tone-teal); }
.share__copy.is-done .share__copy-label { display: inline; }

/* Teksto tipografija */
.prose { font-family: var(--serif); font-size: var(--fs-19); line-height: 1.7; color: var(--text); overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: var(--fs-32); line-height: 1.2; margin-top: 1.8em; }
.prose h3 { font-size: var(--fs-26); line-height: 1.25; margin-top: 1.6em; }
.prose h4 { font-size: var(--fs-22); margin-top: 1.4em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .6em; }
.prose a { color: var(--accent); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--accent); }
.prose blockquote {
	margin-inline: 0; padding: 4px 0 4px 24px;
	border-left: 3px solid var(--accent-bright);
	font-style: italic; color: var(--ink); font-size: var(--fs-22); line-height: 1.5;
}
.prose figure { margin-inline: 0; }
.prose img { border-radius: var(--radius); }
.prose figcaption, .prose .wp-element-caption { margin-top: 8px; font: 400 var(--fs-14)/1.4 var(--sans); color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; font: 400 var(--fs-15)/1.45 var(--sans); }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.prose th { color: var(--ink); background: var(--surface); }
.prose .wp-block-table { overflow-x: auto; }
.prose hr { border: 0; height: 1px; background: var(--rule); margin: 2.4em 0; }
.prose code { font-size: .88em; padding: .1em .35em; border-radius: 4px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.prose pre { overflow-x: auto; padding: 16px; border-radius: var(--radius); background: #0C1628; color: #E6EBF3; font-size: var(--fs-15); }
.prose .alignwide { margin-inline: -60px; }
.prose .aligncenter { margin-inline: auto; }
.prose .alignleft { float: left; margin: .3em 1.4em 1em 0; max-width: 50%; }
.prose .alignright { float: right; margin: .3em 0 1em 1.4em; max-width: 50%; }
.prose iframe { width: 100%; border: 0; border-radius: var(--radius); }
.prose > p:first-of-type::first-line { font-weight: 700; color: var(--ink); }

/* „Taip pat skaitykite“ */
.inline-read {
	display: grid; gap: 6px;
	margin: 2em 0 !important;
	padding: 18px 20px 18px 22px;
	border-radius: 10px;
	background: var(--surface);
	border: 1px solid var(--rule);
	box-shadow: inset 4px 0 0 var(--accent-bright);
}
.inline-read__label { font: 650 var(--fs-14)/1.2 var(--sans); color: var(--muted); }
.inline-read__link { font: 700 var(--fs-22)/1.25 var(--serif); color: var(--ink) !important; text-decoration: none; }
.inline-read__link:hover { text-decoration: underline; text-decoration-color: var(--accent-bright); }

.article__foot { margin-top: 40px; display: flex; flex-direction: column; gap: 24px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tags a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--rule); color: var(--text); text-decoration: none; font-size: var(--fs-14); }
.tags a:hover { border-color: var(--ink); }
.article__share-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0; border-block: 1px solid var(--rule); }
.article__share-end p { color: var(--muted); font-size: var(--fs-15); }

.next-up {
	display: grid; gap: 6px; margin-top: 32px; padding: 24px 28px;
	border-radius: 10px; background: var(--ink); color: var(--paper); text-decoration: none;
	position: relative;
}
.next-up::after { content: ""; position: absolute; top: 14px; right: 16px; width: 18px; height: 4px; border-radius: 2px; background: var(--accent-bright); }
:root[data-theme="dark"] .next-up { background: #22406F; color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .next-up { background: #22406F; color: #fff; } }
.next-up__label { font: 600 var(--fs-14) var(--sans); opacity: .75; }
.next-up__title { font: 700 var(--fs-26)/1.2 var(--serif); }
.next-up__meta { font-size: var(--fs-14); opacity: .75; }
.next-up:hover .next-up__title { text-decoration: underline; text-decoration-color: var(--accent-bright); text-decoration-thickness: 2px; }

.band--related { border-top: 0; padding-top: 16px; }
.feed--compact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; margin-top: 28px; }
.feed--compact .c--row { grid-template-columns: 1fr 96px; gap: 14px; }
.feed--compact .c--row .c__title { font-size: var(--fs-17); }
.feed--compact .c--row:first-child { border-top: 1px solid var(--rule); padding-top: 20px; }

/* Plaukiojantis „Skaitykite toliau“ */
.toast {
	position: fixed; left: 20px; bottom: 20px; z-index: 40;
	display: flex; align-items: flex-start; gap: 4px;
	width: min(380px, calc(100vw - 100px));
	padding: 14px 8px 14px 18px;
	background: var(--surface); border: 1px solid var(--rule); border-radius: 10px;
	box-shadow: var(--shadow);
	transform: translateY(16px); opacity: 0;
	transition: transform .3s ease, opacity .3s ease;
}
.toast.is-visible { transform: none; opacity: 1; }
.toast__link { display: grid; gap: 4px; flex: 1; text-decoration: none; color: var(--ink); }
.toast__label { font: 600 var(--fs-12) var(--sans); color: var(--accent); }
.toast__title { font: 700 var(--fs-17)/1.3 var(--serif); }
.toast__link:hover .toast__title { text-decoration: underline; }
.toast__close { flex: none; width: 32px; height: 32px; display: grid; place-items: center; background: none; border: 0; border-radius: 50%; color: var(--muted); cursor: pointer; }
.toast__close svg { width: 18px; height: 18px; fill: currentColor; }
.toast__close:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }

/* ==========================================================================
   10. 404
   ========================================================================== */
.notfound { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 48px; }
.notfound__tile {
	position: relative; display: grid; place-items: center;
	width: 220px; aspect-ratio: 1; border-radius: 18px;
	background: var(--ink); color: var(--paper); font-family: var(--serif);
}
.notfound__tile::after { content: ""; position: absolute; top: 22px; right: 22px; width: 44px; height: 9px; border-radius: 5px; background: var(--accent-bright); }
.notfound__z { position: absolute; top: 18px; left: 22px; font-size: var(--fs-22); opacity: .75; }
.notfound__sym { font-size: 104px; font-weight: 700; line-height: 1; }
.notfound__name { position: absolute; bottom: 20px; font: 600 var(--fs-15) var(--sans); opacity: .8; }
.notfound__text { display: grid; gap: 16px; max-width: 640px; }
.notfound__text > p:first-of-type { color: var(--muted); font-size: var(--fs-19); }

/* ==========================================================================
   11. Poraštė
   ========================================================================== */
.footer { margin-top: 48px; background: #13294B; color: #C9D5E6; font-size: var(--fs-15); }
:root[data-theme="dark"] .footer { background: #081020; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .footer { background: #081020; } }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 48px; padding-top: 56px; padding-bottom: 40px; }
.footer__brand { display: inline-block; margin-bottom: 16px; --logo-tile: #FFFFFF; --logo-am: #13294B; --logo-word: #FFFFFF; }
.footer__brand .brand__svg { height: 40px; }
.footer__about p { max-width: 42ch; line-height: 1.6; }
.footer__title { font: 700 var(--fs-19) var(--serif); color: #fff; margin-bottom: 12px; }
.footer .catlist a { color: #DCE6F3; border-color: rgba(255,255,255,.12); }
.footer .catlist__n { color: #8FA3C0; }
.footer__latest { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.footer__latest a { font-family: var(--serif); font-size: var(--fs-17); line-height: 1.35; }
.footer__social { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 16px 0 0; padding: 0; list-style: none; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid rgba(255,255,255,.12); color: #8FA3C0; font-size: var(--fs-14); }
.footer__links { display: flex; flex-wrap: wrap; gap: 18px; margin: 0; padding: 0; list-style: none; }
.footer__links a { color: #C9D5E6; }

/* Į viršų */
.to-top {
	position: fixed; right: 20px; bottom: 20px; z-index: 41;
	width: 52px; height: 52px; padding: 0;
	display: grid; place-items: center;
	border: 0; border-radius: 50%;
	background: var(--surface); color: var(--ink);
	box-shadow: var(--shadow);
	cursor: pointer;
	opacity: 0; visibility: hidden; transform: translateY(10px);
	transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--ink); color: var(--paper); }
.to-top__ring, .to-top__arrow { grid-area: 1 / 1; }
.to-top__ring { width: 52px; height: 52px; transform: rotate(-90deg); }
.to-top__track { fill: none; stroke: var(--rule); stroke-width: 3; }
.to-top__fill { fill: none; stroke: var(--accent-bright); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 138.2; stroke-dashoffset: 138.2; }
.to-top__arrow { width: 22px; height: 22px; fill: currentColor; }

/* ==========================================================================
   12. Prisitaikymas prie ekrano
   ========================================================================== */
@media (max-width: 1100px) {
	.layout { grid-template-columns: 1fr; gap: 40px; }
	.ranked { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ranked .c--mini:nth-child(n+4) { display: none; }
	.ranked--stack .c--mini:nth-child(n+4) { display: grid; }
	.grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.article__grid { grid-template-columns: minmax(0, 1fr); max-width: calc(760px + 2 * var(--gutter)); }
	.wrap--article { max-width: calc(760px + 2 * var(--gutter)); padding-left: var(--gutter); }
	.article__aside { display: none; }
	.toc--inline { display: block; }
	.feed--compact { grid-template-columns: 1fr; }
	.feed--compact .c--row + .c--row { border-top: 1px solid var(--rule); }
	.feed--compact .c--row:not(:first-child) { padding-top: 20px; }
}

@media (max-width: 860px) {
	.hero { grid-template-columns: 1fr; gap: 24px; padding-top: 20px; }
	.hero__side .c--row:first-child { border-top: 1px solid var(--rule); padding-top: 16px; }
	.grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.footer__grid { grid-template-columns: 1fr 1fr; }
	.footer__about { grid-column: 1 / -1; }
	.notfound { grid-template-columns: 1fr; gap: 28px; padding-top: 32px; }
	.notfound__tile { width: 150px; }
	.notfound__sym { font-size: 72px; }
	.notfound__z { font-size: var(--fs-15); top: 12px; left: 14px; }
	.notfound__tile::after { top: 14px; right: 14px; width: 30px; height: 6px; }
}

@media (max-width: 640px) {
	:root { --header-h: 58px; }
	body { font-size: var(--fs-17); }
	.ranked { grid-template-columns: 1fr; gap: 18px; }
	.ranked .c--mini:nth-child(n+4) { display: grid; }
	.band--popular { padding: 20px; }
	.grid--3, .grid--4 { grid-template-columns: 1fr; }
	.grid--4 .c--card { display: grid; grid-template-columns: 1fr 112px; gap: 16px; padding-top: 18px; border-top: 1px solid var(--rule); }
	.grid--4 .c--card:first-child { display: block; border-top: 0; padding-top: 0; }
	.grid--4 .c--card:not(:first-child) .c__media { order: 2; aspect-ratio: 4 / 3; }
	.grid--4 .c--card:not(:first-child) .c__body { padding-top: 0; }
	.grid--4 .c--card:not(:first-child) .media__ph-z,
	.grid--4 .c--card:not(:first-child) .media__ph-name { display: none; }
	.grid--4 .c--card:not(:first-child) .media__ph-sym { font-size: 24px; }
	.grid--4 .c--card:not(:first-child) .media__ph-cell { width: 64%; padding: 0; }
	.grid { gap: 28px; }
	.grid--4 { gap: 18px; }
	.c--row { grid-template-columns: 1fr 104px; gap: 14px; }
	.c--row .c__title, .c--card .c__title { font-size: var(--fs-19); }
	.c--row .c__excerpt { display: none; }
	.band { padding-top: 32px; padding-bottom: 32px; }
	.band__title { font-size: var(--fs-26); }
	.prose { font-size: var(--fs-17); line-height: 1.68; }
	.prose h2 { font-size: var(--fs-26); }
	.prose h3 { font-size: var(--fs-22); }
	.prose .alignleft, .prose .alignright { float: none; margin: 1em 0; max-width: 100%; }
	.prose .alignwide { margin-inline: 0; }
	.article__deck { font-size: var(--fs-19); }
	.article__figure { padding-inline: 0; }
	.article__figure img { border-radius: 0; }
	.article__figure figcaption { padding-inline: var(--gutter); }
	.footer__grid { grid-template-columns: 1fr; gap: 32px; }
	.toast { left: 12px; bottom: 12px; width: calc(100vw - 88px); }
	.to-top { right: 12px; bottom: 12px; }
	.search .btn { display: none; }
	.crumbs li:last-child { display: none; }
	.crumbs li:nth-last-child(2) a { color: var(--accent); }
	.article__meta { gap: 4px 16px; }
	.article__meta > span:not(:last-child)::after { display: none; }
	.next-up { padding: 20px; }
	.next-up__title { font-size: var(--fs-22); }
}

/* ==========================================================================
   13. Judesys, spausdinimas
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
	.masthead, .ticker, .footer, .article__aside, .share, .article__share-end, .next-up, .band--related, .toast, .to-top, .progress, .crumbs, .toc, .inline-read { display: none !important; }
	body { background: #fff; color: #000; }
	.article__grid, .wrap--article { display: block; max-width: none; padding: 0; }
	.prose { font-size: 12pt; }
	.prose a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}

/* WordPress branduolio klasės */
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: var(--fs-14); color: var(--muted); }
