/* ==========================================================================
   Bazė: atstatymas, tipografija, pagalbinės klasės
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + var(--admin-bar) + 24px);
}

body {
	margin: 0;
	font-family: var(--font);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	font-weight: 450;
	color: var(--text-primary);
	background: var(--surface);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

body.is-locked {
	overflow: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
	font-weight: 650;
	line-height: var(--lh-snug);
	letter-spacing: -0.015em;
	text-wrap: balance;
}

p,
ul,
ol,
dl,
dd,
figure,
blockquote {
	margin: 0;
}

ul[role="list"],
ol[role="list"] {
	list-style: none;
	padding: 0;
}

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

img,
video {
	height: auto;
}

a {
	color: inherit;
	text-decoration: none;
}

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

button {
	cursor: pointer;
	background: none;
	border: 0;
	padding: 0;
}

address {
	font-style: normal;
}

:focus {
	outline: none;
}

:focus-visible {
	outline: none;
	box-shadow: var(--focus);
	border-radius: var(--radius-sm);
}

::selection {
	background: var(--brand-primary);
	color: #fff;
}

[hidden] {
	display: none !important;
}

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

.skip-link {
	position: fixed;
	left: 16px;
	top: calc(var(--admin-bar) + 12px);
	z-index: 200;
	padding: 12px 18px;
	background: var(--brand-primary);
	color: #fff;
	border-radius: var(--radius-pill);
	font-weight: 600;
	transform: translateY(-200%);
	transition: transform var(--dur-2) var(--ease);
}

.skip-link:focus {
	transform: none;
}

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

/* Tekstinis turinys (redaktoriaus tekstai, straipsniai) */
.prose {
	font-size: var(--fs-body);
	color: var(--text-secondary);
}

.prose > * + * {
	margin-top: 1.1em;
}

.prose h2 {
	font-size: clamp(1.5rem, 1.2vw + 1.15rem, 2rem);
	color: var(--text-primary);
	margin-top: 2em;
}

.prose h3 {
	font-size: var(--fs-h3);
	color: var(--text-primary);
	margin-top: 1.7em;
}

.prose h4,
.prose h5,
.prose h6 {
	font-size: 1.0625rem;
	color: var(--text-primary);
	margin-top: 1.5em;
}

.prose a:not(.btn) {
	color: var(--brand-primary);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.prose a:not(.btn):hover {
	text-decoration-thickness: 2px;
}

.prose ul,
.prose ol {
	padding-left: 1.25em;
}

.prose li + li {
	margin-top: 0.4em;
}

.prose li::marker {
	color: var(--brand-secondary);
}

.prose strong {
	color: var(--text-primary);
	font-weight: 650;
}

.prose blockquote {
	padding: var(--s-4) var(--s-5);
	border-left: 3px solid var(--brand-secondary);
	background: var(--surface-soft);
	border-radius: 0 var(--radius-md) var(--radius-md) 0;
	color: var(--text-primary);
}

.prose img,
.prose video,
.prose iframe {
	border-radius: var(--radius-md);
}

.prose figure {
	margin-block: 1.6em;
}

.prose figcaption {
	margin-top: var(--s-2);
	font-size: var(--fs-xs);
	color: var(--text-muted);
}

.prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--fs-sm);
}

.prose th,
.prose td {
	padding: 12px 14px;
	border-bottom: 1px solid var(--border);
	text-align: left;
	vertical-align: top;
}

.prose th {
	color: var(--text-primary);
	font-weight: 650;
	background: var(--surface-soft);
}

.prose hr {
	border: 0;
	border-top: 1px solid var(--border);
	margin-block: 2em;
}

.prose--flow > :first-child {
	margin-top: 0;
}

/* Judesio mažinimas */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

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