/* ==========================================================================
   Kreida – languoto sąsiuvinio ir mokyklinės lentos tema
   1. Šriftai  2. Spalvos ir dydžiai  3. Pagrindas  4. Antraštė  5. Kortelės
   6. Pagrindinis  7. Šoninė  8. Archyvai  9. Įrašas  10. Turinys  11. Poraštė
   12. Pagalbinės  13. Prisitaikymas  14. Spausdinimas
   ========================================================================== */

/* 1. Šriftai (savo serveryje, be Google užklausų; tik lotyniški + lietuviški simboliai) */
@font-face {
	font-family: "Bitter";
	src: url("../fonts/bitter-var.woff") format("woff");
	font-weight: 300 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Bitter";
	src: url("../fonts/bitter-italic-var.woff") format("woff");
	font-weight: 300 900;
	font-style: italic;
	font-display: swap;
}
@font-face {
	font-family: "Fira Sans";
	src: url("../fonts/fira-sans-400.woff") format("woff");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Fira Sans";
	src: url("../fonts/fira-sans-600.woff") format("woff");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

/* 2. Spalvos ir dydžiai. Šviesus režimas – „sąsiuvinis“, tamsus – „lenta“. */
:root {
	--paper: #F6F8FB;
	--sheet: #FFFFFF;
	--grid-line: #E2E9F2;
	--ink: #18264A;
	--ink-soft: #3E4C6D;
	--muted: #59667F;
	--line: #D3DCE8;
	--red: #CF3341;
	--hl: #FFE14D;
	--focus: #2456B3;
	--board: #1F3A32;
	--board-deep: #18302A;
	--chalk: #EEF2EA;
	--chalk-soft: #BCC9BC;
	--chalk-yellow: #F3D36B;
	--shadow: 0 1px 0 var(--line), 0 18px 32px -24px rgba(24, 38, 74, .45);

	--serif: "Bitter", Georgia, Cambria, "Times New Roman", serif;
	--sans: "Fira Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

	--cell: 24px;
	--wrap: 1240px;
	--gutter: clamp(22px, 4vw, 48px);
	--rule-gap: clamp(10px, 1.6vw, 22px);

	color-scheme: light;
}

[data-mode="lenta"] {
	--paper: #1C3029;
	--sheet: #213830;
	--grid-line: rgba(238, 242, 234, .055);
	--ink: #EEF2EA;
	--ink-soft: #D2DCD1;
	--muted: #A9B9AB;
	--line: rgba(238, 242, 234, .16);
	--red: #FF8E85;
	--hl: rgba(243, 211, 107, .38);
	--focus: #F3D36B;
	--board: #15261F;
	--board-deep: #111F1A;
	--shadow: 0 0 0 1px var(--line);

	color-scheme: dark;
}

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

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

body {
	margin: 0;
	font: 400 1.0625rem/1.6 var(--sans);
	color: var(--ink);
	background-color: var(--paper);
	background-image:
		linear-gradient(var(--grid-line) 1px, transparent 1px),
		linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
	background-size: var(--cell) var(--cell);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	overflow-wrap: break-word;
}

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

img {
	height: auto;
	display: block;
}

a {
	color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--serif);
	line-height: 1.18;
	margin: 0;
	color: var(--ink);
	text-wrap: balance;
}

p {
	margin: 0;
}

ul,
ol {
	margin: 0;
	padding: 0;
}

button,
input {
	font: inherit;
	color: inherit;
}

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

::selection {
	background: var(--hl);
	color: #18264A;
}

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

/* Sąsiuvinio paraštės linija – eina per visą turinį. */
.site-main {
	position: relative;
	display: block;
	padding-bottom: 72px;
	outline: none;
}

.site-main::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: calc(max(0px, (100% - var(--wrap)) / 2) + var(--gutter) - var(--rule-gap));
	width: 2px;
	background: var(--red);
	opacity: .55;
	pointer-events: none;
}

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

.skip-link {
	position: absolute;
	left: 12px;
	top: -100px;
	z-index: 1000;
	padding: 10px 16px;
	background: var(--ink);
	color: var(--paper);
	font-weight: 600;
	text-decoration: none;
}

.skip-link:focus {
	top: 12px;
}

.button {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	padding: .75em 1.3em;
	border: 0;
	border-radius: 4px;
	background: var(--ink);
	color: var(--paper);
	font: 600 1rem/1.2 var(--sans);
	text-decoration: none;
	cursor: pointer;
}

.button:hover {
	background: var(--red);
	color: #fff;
}

.icon {
	flex: none;
	width: 1.15em;
	height: 1.15em;
}

/* Raudonu tušinuku pabrauktos skilčių antraštės. */
.section-title,
.side-block__title,
.hero__side-title {
	position: relative;
	font-weight: 700;
	padding-bottom: .5em;
	margin-bottom: 1.1em;
}

.section-title {
	font-size: clamp(1.5rem, 2.4vw, 1.875rem);
}

.section-title::after,
.side-block__title::after,
.hero__side-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 4.2em;
	max-width: 160px;
	height: 8px;
	background: var(--red);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8'%3E%3Cpath d='M2 5.5c14-3 26-3.6 38-2.2s22 2.6 36 1.4S104 2 118 3' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8'%3E%3Cpath d='M2 5.5c14-3 26-3.6 38-2.2s22 2.6 36 1.4S104 2 118 3' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}

/* Kategorijos skirtukas – kaip spalvotas sąsiuvinio skyriklis. */
.tab {
	--c: var(--ink);
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: .5em;
	font: 600 .8125rem/1.3 var(--sans);
	color: var(--c);
	text-decoration: none;
}

.tab::before {
	content: "";
	flex: none;
	width: .55em;
	height: 1.1em;
	background: var(--c);
	border-radius: 0 3px 3px 0;
}

a.tab:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

[data-mode="lenta"] .tab,
.pertrauka .tab,
[data-mode="lenta"] .cat-block__title a {
	color: color-mix(in srgb, var(--c) 38%, #fff);
}

[data-mode="lenta"] .tab::before,
.pertrauka .tab::before {
	background: color-mix(in srgb, var(--c) 55%, #fff);
}

.meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 16px;
	font-size: .8125rem;
	color: var(--muted);
}

.meta__read {
	display: inline-flex;
	align-items: center;
	gap: .35em;
}

/* 4. Antraštė */
.topline {
	background: #18264A;
	color: #DDE4F2;
	font-size: .8125rem;
}

[data-mode="lenta"] .topline {
	background: var(--board-deep);
	color: var(--chalk-soft);
}

.topline__inner {
	display: flex;
	align-items: center;
	gap: 20px;
	min-height: 40px;
}

.topline__date {
	flex: none;
	font-weight: 600;
	color: #fff;
}

.topline__date::first-letter {
	text-transform: uppercase;
}

.topline__rss {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: .35em;
	margin-left: auto;
	text-decoration: none;
}

.topline__rss:hover {
	color: #fff;
}

.ticker {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 14px;
}

.ticker__label {
	flex: none;
	padding: 2px 8px;
	background: var(--chalk-yellow);
	color: #18264A;
	font-weight: 600;
	border-radius: 2px;
}

.ticker__viewport {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 40px), transparent);
	mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 40px), transparent);
}

.ticker__track {
	display: flex;
	width: max-content;
	animation: kreida-ticker 70s linear infinite;
}

.ticker:hover .ticker__track,
.ticker:focus-within .ticker__track {
	animation-play-state: paused;
}

.ticker__list {
	display: flex;
	list-style: none;
}

.ticker__list li {
	white-space: nowrap;
	padding-right: 40px;
}

.ticker__list a {
	text-decoration: none;
}

.ticker__list a:hover {
	color: #fff;
	text-decoration: underline;
}

.ticker__list time {
	color: var(--chalk-yellow);
	margin-right: .35em;
	font-variant-numeric: tabular-nums;
}

@keyframes kreida-ticker {
	to {
		transform: translateX(-50%);
	}
}

.masthead__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding-block: 22px 18px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	text-decoration: none;
	color: var(--ink);
	min-width: 0;
}

.brand__mark {
	flex: none;
	width: 52px;
	height: 52px;
}

.brand__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.brand__name {
	font: 800 clamp(1.5rem, 3vw, 2.125rem)/1 var(--serif);
	letter-spacing: -.01em;
}

.brand__tld {
	color: var(--red);
	font-weight: 600;
}

.brand__tag {
	margin-top: 6px;
	font-size: .875rem;
	color: var(--muted);
}

.custom-logo-link img {
	max-height: 64px;
	width: auto;
}

.masthead__tools {
	display: flex;
	align-items: center;
	gap: 8px;
}

.tool {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 42px;
	padding: 0 14px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--sheet);
	color: var(--ink);
	font-size: .875rem;
	font-weight: 600;
	cursor: pointer;
}

.tool:hover {
	border-color: var(--ink);
}

.tool__icon {
	display: inline-flex;
}

.tool__icon--page,
.tool__icon--close,
[data-mode="lenta"] .tool__icon--board,
.tool[aria-expanded="true"] .tool__icon--open {
	display: none;
}

[data-mode="lenta"] .tool__icon--page,
.tool[aria-expanded="true"] .tool__icon--close {
	display: inline-flex;
}

.tool--menu {
	display: none;
}

.nav {
	border-block: 1px solid var(--line);
	background: color-mix(in srgb, var(--sheet) 82%, transparent);
}

.nav__list {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	gap: 0 4px;
}

.nav__list a {
	--c: var(--ink);
	display: block;
	padding: 14px 12px 12px;
	border-top: 4px solid transparent;
	margin-top: -1px;
	font-weight: 600;
	font-size: .9375rem;
	text-decoration: none;
	color: var(--ink);
}

.nav__list a:hover,
.nav__list a[aria-current="page"],
.nav__list .current-menu-item > a {
	border-top-color: var(--c);
}

[data-mode="lenta"] .nav__list a:hover,
[data-mode="lenta"] .nav__list a[aria-current="page"] {
	border-top-color: color-mix(in srgb, var(--c) 50%, #fff);
}

.search-panel {
	background: var(--sheet);
	border-bottom: 1px solid var(--line);
	padding-block: 24px;
}

.search__label {
	display: block;
	font: 700 1.125rem/1.3 var(--serif);
	margin-bottom: 10px;
}

.search__row {
	display: flex;
	gap: 8px;
	max-width: 720px;
}

.search__input {
	flex: 1;
	min-width: 0;
	height: 52px;
	padding: 0 16px;
	border: 2px solid var(--ink);
	border-radius: 4px;
	background: var(--sheet);
	color: var(--ink);
	font: 400 1.125rem var(--serif);
}

.search__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 52px;
	padding: 0 20px;
	border: 0;
	border-radius: 4px;
	background: var(--ink);
	color: var(--paper);
	font-weight: 600;
	cursor: pointer;
}

.search__btn:hover {
	background: var(--red);
	color: #fff;
}

/* Skaitymo eiga (įraše) */
.progress {
	position: fixed;
	inset: 0 0 auto;
	z-index: 100;
	height: 4px;
	pointer-events: none;
}

.progress__bar {
	display: block;
	height: 100%;
	background: var(--red);
	transform-origin: 0 50%;
	transform: scaleX(var(--p, 0));
}

/* 5. Kortelės */
.card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
}

.card__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	min-width: 0;
}

.card__title {
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.25;
}

.card__link {
	color: inherit;
	text-decoration: none;
	background-image: linear-gradient(transparent 60%, var(--hl) 60%, var(--hl) 94%, transparent 94%);
	background-repeat: no-repeat;
	background-size: 0 100%;
	transition: background-size .35s ease-out;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

.card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.card:hover .card__link,
.card__link:focus-visible {
	background-size: 100% 100%;
}

.card__link:focus-visible {
	outline: none;
}

.card:focus-within {
	outline: 3px solid var(--focus);
	outline-offset: 6px;
}

.card__excerpt {
	color: var(--ink-soft);
	font-size: .9688rem;
	line-height: 1.55;
}

.card__media {
	position: relative;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--sheet);
}

.media__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Paveikslėlio pakaitalas – spalvotas langeliais lapas su temos pavadinimu */
.ph {
	--c: #18264A;
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	padding: 18px 20px;
	background-color: var(--c);
	background-image:
		linear-gradient(rgba(255, 255, 255, .1) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, .1) 1px, transparent 1px);
	background-size: 16px 16px;
	color: #fff;
	overflow: hidden;
}

.ph__word {
	font: italic 700 clamp(1.25rem, 2.4vw, 2rem)/1.05 var(--serif);
	max-width: 85%;
}

.ph .icon {
	position: absolute;
	top: 14px;
	right: 16px;
	width: 34px;
	height: 34px;
	color: var(--chalk-yellow);
	stroke-width: 2.6;
}

/* Pagrindinis įrašas */
.card--lead {
	gap: 0;
}

.card--lead .card__media {
	aspect-ratio: 16 / 9;
}

.card--lead .ph {
	align-items: flex-start;
	padding: 24px 28px;
}

.card--lead .ph__word {
	font-size: clamp(2rem, 4vw, 3.25rem);
}

.card--lead .card__body {
	position: relative;
	z-index: 2;
	margin: -72px 12% 0 0;
	padding: 24px 28px 26px;
	background: var(--sheet);
	box-shadow: var(--shadow);
	gap: 12px;
}

.card--lead .card__title {
	font-size: clamp(1.75rem, 3.3vw, 2.625rem);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -.012em;
}

.card--lead .card__excerpt {
	font: 400 1.0625rem/1.6 var(--serif);
	max-width: 60ch;
}

/* Tvarkaraštis (šalia pagrindinio) */
.card--side {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	gap: 16px;
	padding: 18px 0;
	border-top: 1px dashed var(--line);
}

.card--side:last-child {
	border-bottom: 1px dashed var(--line);
}

.card__when time {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.card__day {
	font: 800 2.125rem/1 var(--serif);
	color: var(--red);
	font-variant-numeric: lining-nums tabular-nums;
}

.card__month {
	margin-top: 4px;
	font-size: .75rem;
	color: var(--muted);
}

.card--side .card__title {
	font-size: 1.1875rem;
}

.card__read {
	font-size: .8125rem;
	color: var(--muted);
}

/* Platus (pirmas sąraše) */
.card--wide {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	gap: 28px;
	align-items: center;
	padding-bottom: 32px;
	border-bottom: 1px solid var(--line);
}

.card--wide .card__title {
	font-size: clamp(1.4rem, 2.2vw, 1.75rem);
	font-weight: 800;
}

/* Mažas */
.card--mini {
	display: grid;
	grid-template-columns: 84px minmax(0, 1fr);
	gap: 14px;
	align-items: start;
}

.card--mini .card__media {
	aspect-ratio: 1;
}

.card--mini .card__title {
	font-size: 1rem;
	line-height: 1.3;
}

.card--mini .ph {
	padding: 8px;
}

.card--mini .ph__word,
.card--mini .ph .icon {
	display: none;
}

/* Kreida ant lentos */
.card--chalk {
	gap: 10px;
	padding-top: 20px;
	border-top: 1px dashed rgba(238, 242, 234, .3);
}

.card__year {
	font: italic 700 2.75rem/1 var(--serif);
	color: var(--chalk-yellow);
	letter-spacing: -.01em;
}

.card__year span {
	font-size: .45em;
	font-style: normal;
	font-weight: 600;
	letter-spacing: 0;
}

.card--chalk .card__title {
	color: var(--chalk);
	font-size: 1.375rem;
	font-weight: 600;
}

.card--chalk .card__link {
	background-image: linear-gradient(transparent 62%, rgba(243, 211, 107, .35) 62%, rgba(243, 211, 107, .35) 94%, transparent 94%);
}

.card--chalk .card__excerpt {
	color: var(--chalk-soft);
}

/* 6. Pagrindinis puslapis */
.hero {
	display: grid;
	grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
	gap: clamp(28px, 4vw, 56px);
	padding-top: 32px;
	padding-bottom: 40px;
}

.hero__side-title {
	font-size: 1.5rem;
	margin-bottom: .4em;
}

.hero__side-note {
	color: var(--muted);
	font-size: .875rem;
	margin-bottom: 14px;
}

.subjects {
	padding-bottom: 48px;
}

.subjects__title {
	font: 600 .9375rem/1.3 var(--sans);
	color: var(--muted);
	margin-bottom: 12px;
}

.subjects__list {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
	gap: 10px;
}

.subject {
	--c: var(--ink);
	display: flex;
	flex-direction: column;
	gap: 4px;
	height: 100%;
	padding: 14px 16px 14px;
	border-top: 6px solid var(--c);
	background: var(--sheet);
	box-shadow: 0 1px 0 var(--line);
	text-decoration: none;
	transition: transform .2s ease;
}

.subject:hover {
	transform: translateY(-3px);
}

.subject__name {
	font: 700 1.0625rem/1.25 var(--serif);
}

.subject__count {
	font-size: .8125rem;
	color: var(--muted);
}

[data-mode="lenta"] .subject {
	border-top-color: color-mix(in srgb, var(--c) 55%, #fff);
}

.layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 304px;
	gap: clamp(32px, 4vw, 64px);
	align-items: start;
}

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

.pertrauka {
	position: relative;
	z-index: 1;
	margin-block: 72px;
	padding-block: 64px 72px;
	color: var(--chalk);
	background-color: var(--board);
	background-image:
		radial-gradient(ellipse 60% 50% at 20% 30%, rgba(255, 255, 255, .06), transparent 70%),
		radial-gradient(ellipse 40% 60% at 85% 80%, rgba(255, 255, 255, .045), transparent 70%),
		linear-gradient(rgba(238, 242, 234, .045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(238, 242, 234, .045) 1px, transparent 1px);
	background-size: auto, auto, var(--cell) var(--cell), var(--cell) var(--cell);
	border-block: 10px solid #6B4F35;
}

[data-mode="lenta"] .pertrauka {
	border-block-color: #4A3828;
}

.pertrauka__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 24px;
	margin-bottom: 36px;
}

.pertrauka__title {
	font: italic 700 clamp(2.25rem, 5vw, 3.5rem)/1 var(--serif);
	color: var(--chalk);
	text-shadow: 0 0 1px rgba(238, 242, 234, .5);
}

.pertrauka__note {
	color: var(--chalk-soft);
	font-size: 1rem;
}

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

.cat-blocks {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 48px clamp(28px, 3vw, 44px);
}

.cat-block {
	--c: var(--ink);
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
}

.cat-block__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding-top: 12px;
	border-top: 6px solid var(--c);
}

.cat-block__title {
	font-size: 1.5rem;
}

.cat-block__title a {
	color: var(--c);
	text-decoration: none;
}

.cat-block__all {
	flex: none;
	font-size: .8125rem;
	font-weight: 600;
	color: var(--muted);
}

.cat-block__list {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.cat-block .card--grid .card__excerpt {
	display: none;
}

/* Puslapiavimas – langeliai */
.pager {
	margin-top: 56px;
}

.pager .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.pager .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 48px;
	height: 48px;
	padding: 0 14px;
	border: 1px solid var(--line);
	background: var(--sheet);
	font-weight: 600;
	text-decoration: none;
	font-variant-numeric: tabular-nums;
}

.pager a.page-numbers:hover {
	border-color: var(--ink);
}

.pager .page-numbers.current {
	background: var(--ink);
	color: var(--paper);
	border-color: var(--ink);
}

.pager .page-numbers.dots {
	border: 0;
	background: none;
}

/* 7. Šoninė juosta */
.sidebar {
	display: flex;
	flex-direction: column;
	gap: 44px;
	min-width: 0;
}

.side-block__title {
	font-size: 1.25rem;
	margin-bottom: 18px;
}

.topic-list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.topic {
	--c: var(--ink);
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 9px 12px;
	border-left: 5px solid var(--c);
	background: var(--sheet);
	text-decoration: none;
	font-weight: 600;
	font-size: .9375rem;
}

.topic:hover,
.topic[aria-current="page"] {
	background: color-mix(in srgb, var(--c) 10%, var(--sheet));
}

[data-mode="lenta"] .topic {
	border-left-color: color-mix(in srgb, var(--c) 55%, #fff);
}

.topic__count {
	font-size: .8125rem;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

.mini-list {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.tag-list {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tag-list a {
	display: inline-block;
	padding: 4px 11px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--sheet);
	font-size: .875rem;
	text-decoration: none;
}

.tag-list a:hover {
	border-color: var(--ink);
}

.widget ul {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* 8. Archyvai */
.archive-head {
	--c: var(--ink);
	padding-top: 28px;
	padding-bottom: 44px;
}

.archive-head__title {
	display: flex;
	align-items: center;
	gap: .35em;
	margin-top: 18px;
	font-size: clamp(2.25rem, 5vw, 3.5rem);
	font-weight: 800;
	letter-spacing: -.015em;
}

.archive-head__title::before {
	content: "";
	flex: none;
	width: .28em;
	height: .9em;
	background: var(--c);
	border-radius: 0 4px 4px 0;
}

[data-mode="lenta"] .archive-head__title::before {
	background: color-mix(in srgb, var(--c) 55%, #fff);
}

.archive-head__desc {
	max-width: 65ch;
	margin-top: 14px;
	font: 400 1.125rem/1.6 var(--serif);
	color: var(--ink-soft);
}

.archive-head__count {
	margin-top: 12px;
	font-size: .875rem;
	color: var(--muted);
}

.archive-head__search {
	margin-top: 24px;
}

.crumbs ol {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 0;
	font-size: .8125rem;
	color: var(--muted);
}

.crumbs li + li::before {
	content: "/";
	margin: 0 .55em;
	opacity: .6;
}

.crumbs a {
	text-decoration: none;
}

.crumbs a:hover {
	text-decoration: underline;
}

.crumbs [aria-current] {
	display: inline-block;
	max-width: 46ch;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	vertical-align: bottom;
}

.empty {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.empty__lead {
	font: 400 1.25rem/1.5 var(--serif);
}

/* 9. Įrašas */
.article-head {
	padding-top: 28px;
	padding-bottom: 32px;
}

.article-head__grid {
	max-width: 860px;
	margin-top: 22px;
}

/* Įrašo numeris – lyg mokytojos užrašas paraštėje (rodomas plačiuose ekranuose) */
.article-head__no {
	display: none;
	padding-top: 10px;
	text-align: right;
	font: italic 700 1.375rem/1 var(--serif);
	color: var(--red);
	transform: rotate(-4deg);
	font-variant-numeric: lining-nums;
}

.article-head__no span {
	display: block;
	font-size: .7em;
	font-weight: 600;
}

.article-head__main {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
}

.article-title {
	font-size: clamp(2rem, 4.4vw, 3.375rem);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -.015em;
}

.article-dek {
	max-width: 62ch;
	font: 400 clamp(1.125rem, 1.6vw, 1.3125rem)/1.55 var(--serif);
	color: var(--ink-soft);
}

.byline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 22px;
	margin-top: 4px;
	font-size: .875rem;
	color: var(--muted);
}

.byline__author {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--ink);
	font-weight: 600;
	text-decoration: none;
}

.byline__author:hover span {
	text-decoration: underline;
}

.byline__avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
}

.byline__item {
	display: inline-flex;
	align-items: center;
	gap: .4em;
}

.article-figure {
	margin: 0 auto 40px;
	max-width: var(--wrap);
}

.article-figure img {
	width: 100%;
	max-height: 640px;
	object-fit: cover;
}

.article-figure figcaption {
	margin-top: 10px;
	font-size: .8125rem;
	color: var(--muted);
}

.article-figure .ph {
	position: relative;
	aspect-ratio: 21 / 9;
}

.article-layout {
	display: grid;
	grid-template-columns: 200px minmax(0, 760px);
	gap: clamp(28px, 4vw, 56px);
	align-items: start;
}

.article-layout--page {
	grid-template-columns: minmax(0, 820px);
}

.article-rail__sticky {
	position: sticky;
	top: 28px;
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.article-body {
	min-width: 0;
	padding: clamp(22px, 4.5vw, 56px);
	background: var(--sheet);
	box-shadow: var(--shadow);
}

.article-figure--inline {
	margin: 0 0 28px;
}

/* Turinio planas */
.toc__title {
	display: flex;
	align-items: center;
	gap: 8px;
	font: 600 .875rem/1.3 var(--sans);
	color: var(--muted);
	margin-bottom: 10px;
}

.toc__list {
	list-style: none;
	border-left: 2px solid var(--line);
	font-size: .875rem;
	line-height: 1.4;
}

.toc__item a {
	display: block;
	padding: 6px 0 6px 14px;
	margin-left: -2px;
	border-left: 2px solid transparent;
	color: var(--ink-soft);
	text-decoration: none;
}

.toc__item--h3 a {
	padding-left: 28px;
	font-size: .8125rem;
}

.toc__item a:hover {
	color: var(--ink);
}

.toc__item a.is-active {
	border-left-color: var(--red);
	color: var(--ink);
	font-weight: 600;
}

.toc--mobile {
	display: none;
	margin-bottom: 28px;
	padding: 14px 16px;
	border: 1px solid var(--line);
	background: var(--paper);
}

.toc--mobile summary {
	cursor: pointer;
	margin: 0;
	list-style: none;
}

.toc--mobile summary::-webkit-details-marker {
	display: none;
}

.toc--mobile[open] summary {
	margin-bottom: 10px;
}

/* Dalijimasis */
.share__title {
	font-size: .875rem;
	font-weight: 600;
	color: var(--muted);
	margin-bottom: 10px;
}

.share__list {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.share__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 42px;
	height: 42px;
	padding: 0 14px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--sheet);
	color: var(--ink);
	font-size: .875rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

.share--compact .share__btn {
	padding: 0;
}

.share__btn:hover {
	border-color: var(--ink);
}

.share__btn.is-done {
	border-color: #1F7047;
	color: #1F7047;
}

[data-mode="lenta"] .share__btn.is-done {
	color: #8FD8AE;
	border-color: #8FD8AE;
}

html:not(.js) .share__js {
	display: none;
}

.article-end {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px dashed var(--line);
}

.article-end__label {
	margin-bottom: 12px;
	font: 600 1.0625rem/1.4 var(--serif);
}

.tag-list--article {
	margin-top: 32px;
}

.author-box {
	display: grid;
	grid-template-columns: 80px minmax(0, 1fr);
	gap: 20px;
	margin-top: 32px;
	padding: 22px;
	background: var(--paper);
	border-left: 5px solid var(--red);
}

.author-box__avatar {
	width: 80px;
	height: 80px;
	border-radius: 50%;
}

.author-box__name {
	font: 700 1.1875rem/1.3 var(--serif);
}

.author-box__bio {
	margin-top: 6px;
	color: var(--ink-soft);
	font-size: .9375rem;
}

.author-box__more {
	display: inline-block;
	margin-top: 8px;
	font-size: .875rem;
	font-weight: 600;
}

.post-nav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	margin-top: 56px;
}

.post-nav__link {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 20px 22px;
	border: 1px solid var(--line);
	background: var(--sheet);
	text-decoration: none;
}

.post-nav__link:hover {
	border-color: var(--ink);
}

.post-nav__link--next {
	grid-column: 2;
	text-align: right;
}

.post-nav__label {
	font-size: .8125rem;
	color: var(--muted);
}

.post-nav__title {
	font: 700 1.125rem/1.3 var(--serif);
}

.related {
	padding-top: 64px;
}

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

.related__grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.related .card__excerpt {
	display: none;
}

/* 404 – lenta */
.lost {
	padding-top: 28px;
	padding-bottom: 48px;
}

.lost__board {
	margin-top: 22px;
	padding: clamp(28px, 6vw, 64px);
	color: var(--chalk);
	background-color: var(--board);
	background-image:
		radial-gradient(ellipse 60% 60% at 25% 30%, rgba(255, 255, 255, .07), transparent 70%),
		linear-gradient(rgba(238, 242, 234, .05) 1px, transparent 1px),
		linear-gradient(90deg, rgba(238, 242, 234, .05) 1px, transparent 1px);
	background-size: auto, var(--cell) var(--cell), var(--cell) var(--cell);
	border: 10px solid #6B4F35;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 18px;
}

.lost__code {
	font: italic 800 clamp(4rem, 12vw, 8rem)/.9 var(--serif);
	color: var(--chalk-yellow);
}

.lost__title {
	color: var(--chalk);
	font-size: clamp(1.75rem, 3.6vw, 2.75rem);
}

.lost__text {
	max-width: 56ch;
	color: var(--chalk-soft);
	font-size: 1.0625rem;
}

.lost .button {
	background: var(--chalk-yellow);
	color: #18264A;
}

.lost .search__label {
	color: var(--chalk);
}

.lost__search {
	width: 100%;
	max-width: 640px;
}

/* 10. Įrašo turinys */
.entry-content {
	font: 400 1.1875rem/1.75 var(--serif);
	color: var(--ink);
	font-variant-numeric: oldstyle-nums proportional-nums;
}

.entry-content > * {
	margin-block: 0 1.15em;
}

.entry-content > :last-child {
	margin-bottom: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	scroll-margin-top: 28px;
	font-variant-numeric: lining-nums;
}

.entry-content h2 {
	margin-top: 1.9em;
	margin-bottom: .6em;
	font-size: 1.75rem;
	font-weight: 750;
}

.entry-content h3 {
	margin-top: 1.6em;
	margin-bottom: .5em;
	font-size: 1.375rem;
	font-weight: 700;
}

.entry-content h4 {
	margin-top: 1.4em;
	margin-bottom: .4em;
	font-size: 1.1875rem;
}

.entry-content a {
	color: var(--ink);
	text-decoration-line: underline;
	text-decoration-color: var(--red);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.entry-content a:hover {
	background: var(--hl);
	text-decoration-color: var(--ink);
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.4em;
}

.entry-content li {
	margin-bottom: .4em;
}

.entry-content li::marker {
	color: var(--red);
	font-weight: 700;
}

.entry-content blockquote {
	margin-inline: 0;
	padding: 4px 0 4px 24px;
	border-left: 4px solid var(--c, var(--ink));
	font-style: italic;
	font-size: 1.25rem;
	color: var(--ink-soft);
}

.entry-content blockquote p:last-child {
	margin-bottom: 0;
}

.entry-content figure {
	margin-inline: 0;
}

.entry-content figcaption,
.entry-content .wp-caption-text,
.entry-content .wp-element-caption {
	margin-top: 8px;
	font: 400 .8125rem/1.5 var(--sans);
	color: var(--muted);
}

.entry-content img {
	max-width: 100%;
	height: auto;
}

.entry-content hr {
	border: 0;
	height: 1px;
	background: var(--line);
	margin-block: 2.5em;
}

.entry-content table {
	display: block;
	overflow-x: auto;
	width: 100%;
	border-collapse: collapse;
	font: 400 .9375rem/1.5 var(--sans);
}

.entry-content th,
.entry-content td {
	padding: 10px 12px;
	border: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
}

.entry-content th {
	background: var(--paper);
	font-weight: 600;
}

.entry-content code,
.entry-content pre,
.entry-content kbd {
	font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	font-size: .875em;
}

.entry-content pre {
	overflow-x: auto;
	padding: 18px;
	background: var(--paper);
	border: 1px solid var(--line);
	line-height: 1.5;
}

.entry-content mark {
	background: var(--hl);
	color: inherit;
}

.entry-content iframe,
.entry-content video {
	width: 100%;
}

.entry-content .wp-block-embed__wrapper iframe {
	aspect-ratio: 16 / 9;
	height: auto;
}

.entry-content .wp-block-button__link {
	background: var(--ink);
	color: var(--paper);
	text-decoration: none;
	border-radius: 4px;
}

.alignleft {
	float: left;
	margin: .3em 1.5em 1em 0;
	max-width: 50%;
}

.alignright {
	float: right;
	margin: .3em 0 1em 1.5em;
	max-width: 50%;
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.entry-content::after {
	content: "";
	display: table;
	clear: both;
}

.wp-caption {
	max-width: 100%;
}

.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 10px;
}

.gallery-item {
	margin: 0;
}

.page-links {
	margin-top: 28px;
	display: flex;
	gap: 8px;
	font-weight: 600;
}

/* 11. Poraštė */
.board-footer {
	position: relative;
	z-index: 1;
	color: var(--chalk-soft);
	background-color: var(--board);
	background-image:
		linear-gradient(rgba(238, 242, 234, .04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(238, 242, 234, .04) 1px, transparent 1px);
	background-size: var(--cell) var(--cell);
	border-top: 10px solid #6B4F35;
	font-size: .9375rem;
}

[data-mode="lenta"] .board-footer {
	border-top-color: #4A3828;
}

.board-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
	gap: 40px;
	padding-top: 56px;
	padding-bottom: 44px;
}

.board-footer__brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
	color: var(--chalk);
	font: 800 1.5rem/1 var(--serif);
	text-decoration: none;
}

.board-footer__mark {
	width: 44px;
	height: 44px;
}

.board-footer__about p {
	max-width: 42ch;
}

.board-footer__title {
	margin-bottom: 14px;
	font: italic 700 1.25rem/1.2 var(--serif);
	color: var(--chalk-yellow);
}

.board-footer ul {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.board-footer a {
	text-decoration: none;
}

.board-footer a:hover {
	color: var(--chalk);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.board-footer .count {
	font-size: .8125rem;
	opacity: .65;
}

.board-footer__social {
	flex-direction: row !important;
	margin-top: 18px;
}

.board-footer__social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid rgba(238, 242, 234, .25);
	border-radius: 50%;
}

.board-footer__base {
	padding-block: 18px 22px;
	border-top: 1px dashed rgba(238, 242, 234, .2);
	font-size: .8125rem;
}

.board-footer :focus-visible,
.pertrauka :focus-visible {
	outline-color: var(--chalk-yellow);
}

/* Į viršų – su skaitymo eigos žiedu */
.to-top {
	position: fixed;
	right: clamp(14px, 2.5vw, 28px);
	bottom: clamp(14px, 2.5vw, 28px);
	z-index: 90;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #18264A;
	color: #fff;
	box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: opacity .25s ease, transform .25s ease, visibility .25s;
}

.to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.to-top[hidden] {
	display: none;
}

[data-mode="lenta"] .to-top {
	background: var(--chalk-yellow);
	color: #18264A;
}

.to-top:hover {
	background: var(--red);
	color: #fff;
}

.to-top__ring {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.to-top__ring circle {
	fill: none;
	stroke: var(--chalk-yellow);
	stroke-width: 3;
	stroke-dasharray: 100;
	stroke-dashoffset: calc(100 - var(--p, 0) * 100);
}

[data-mode="lenta"] .to-top__ring circle {
	stroke: #18264A;
}

.to-top .icon {
	width: 22px;
	height: 22px;
}

.to-top__label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

/* 13. Prisitaikymas prie ekrano */
@media (min-width: 1400px) {
	.article-head__grid {
		display: grid;
		grid-template-columns: 76px minmax(0, 860px);
		gap: 0 calc(var(--rule-gap) + 18px);
		max-width: none;
		margin-left: calc(-76px - var(--rule-gap) - 18px);
	}

	.article-head__no {
		display: block;
	}
}

@media (max-width: 1100px) {
	.related__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cat-blocks {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.board-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.article-layout {
		grid-template-columns: minmax(0, 1fr);
		max-width: 820px;
	}

	.article-rail {
		display: none;
	}

	.toc--mobile {
		display: block;
	}

}

@media (max-width: 960px) {
	.hero {
		grid-template-columns: minmax(0, 1fr);
	}

	.layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.sidebar {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
		gap: 40px;
	}

	.pertrauka__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}
}

@media (max-width: 820px) {
	.tool--menu {
		display: inline-flex;
	}

	.js .nav {
		display: none;
	}

	.js .nav.is-open {
		display: block;
	}

	.nav__list {
		flex-direction: column;
		padding-block: 8px;
	}

	.nav__list a {
		border-top: 0;
		border-left: 5px solid var(--c);
		margin: 4px 0;
		padding: 10px 14px;
		background: var(--sheet);
	}

	.tool__label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
	}

	.tool {
		width: 44px;
		height: 44px;
		padding: 0;
		justify-content: center;
	}

	.brand__tag {
		display: none;
	}

	.brand__mark {
		width: 42px;
		height: 42px;
	}

	.topline__rss span {
		display: none;
	}

	.topline__date {
		display: none;
	}
}

@media (max-width: 700px) {
	.feed__grid,
	.cat-blocks,
	.related__grid,
	.related__grid--3 {
		grid-template-columns: minmax(0, 1fr);
	}

	.card--wide {
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
	}

	.card--lead .card__body {
		margin: -36px 12px 0;
		padding: 18px 18px 20px;
	}

	.post-nav {
		grid-template-columns: minmax(0, 1fr);
	}

	.post-nav__link--next {
		grid-column: 1;
	}

	.subjects__list {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		padding-bottom: 8px;
		margin-inline: calc(var(--gutter) * -1);
		padding-inline: var(--gutter);
	}

	.subjects__list li {
		flex: 0 0 62%;
		scroll-snap-align: start;
	}

	.board-footer__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}

	.article-body {
		margin-inline: calc(var(--gutter) * -1 + var(--rule-gap) + 6px) calc(var(--gutter) * -1);
		padding-inline: 20px;
	}

	.entry-content {
		font-size: 1.125rem;
		line-height: 1.7;
	}

	.alignleft,
	.alignright {
		float: none;
		margin: 0 0 1em;
		max-width: 100%;
	}

	.ticker__label {
		display: none;
	}

	.crumbs li:last-child {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
	}

	.ticker__track {
		animation: none;
	}

	.ticker__viewport {
		overflow-x: auto;
	}
}

/* 14. Spausdinimas */
@media print {
	.topline,
	.masthead__tools,
	.nav,
	.search-panel,
	.article-rail,
	.toc--mobile,
	.article-end,
	.post-nav,
	.related,
	.board-footer,
	.to-top,
	.progress {
		display: none !important;
	}

	body {
		background: #fff;
		color: #000;
	}

	.site-main::before {
		display: none;
	}

	.article-body {
		box-shadow: none;
		padding: 0;
	}

	.entry-content a::after {
		content: " (" attr(href) ")";
		font-size: .8em;
	}
}
