/*
 * WCRM documentation shell (DOCS-64 §2): /dokumentacija/, /pamokos/<category>/, /pamoka/<slug>/ inside the hub theme's
 * header and footer – the layout of sbyte.lt/dokumentacija with the theme's fonts (inherited) and accent colour
 * (Astra --ast-global-color-0, Blocksy --theme-palette-color-1, else #1e73be). Theme-proof: every rule is scoped under
 * #wcrm-docs / .wcrm-docs and names its colours in every state (Astra / Blocksy style bare buttons, inputs, lists and
 * links). The scenes and the article body typography (`.doc-prose`) come from the content stylesheet (content/docs.css,
 * tools/docs/README.md), which carries its own scene tokens; both read the accent from `--wcrm-docs-accent` first.
 *
 * Widths: ≥ 1101 px sidebar + article + contents column; 901–1100 px sidebar + article (contents folded above the
 * text); ≤ 900 px one column, the sidebar a „Turinys“ drawer (docs.js; without it the drawer opens through :target).
 */

.wcrm-docs {
	--wd-accent: var(--wcrm-docs-accent, var(--ast-global-color-0, var(--theme-palette-color-1, #1e73be)));
	--wd-accent-soft: rgba(30, 115, 190, .09);
	--wd-ink: #1d2327;
	--wd-ink-soft: #4b5563;
	--wd-ink-faint: #6b7280;
	--wd-line: #e3e5e8;
	--wd-line-strong: #c9ced4;
	--wd-surface: #fff;
	--wd-paper: #f7f8f9;
	--wd-mark: #fff1b8;
	--wd-r: 10px;
	--wd-r-sm: 6px;
	--wd-side: 272px;
	--wd-rail: 216px;
	--wd-top: var(--wcrm-docs-top, 24px);
	--wd-ease: cubic-bezier(.2, .7, .2, 1);
	--wd-fast: .15s;
	box-sizing: border-box;
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: 28px 20px 72px;
	color: var(--wd-ink);
	font-size: 16px;
	line-height: 1.6;
	text-align: left;
	overflow-wrap: break-word;
}

@supports (color: color-mix(in srgb, red 10%, white)) {
	.wcrm-docs {
		--wd-accent-soft: color-mix(in srgb, var(--wd-accent) 9%, #fff);
	}
}

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

/* Astra puts the page into .ast-container (already padded, a flex row); Blocksy into <main>. */
.ast-container > .wcrm-docs {
	flex: 1 1 100%;
	max-width: 100%;
	padding-left: 0;
	padding-right: 0;
}

.wcrm-docs .wcrm-docs-sr,
.wcrm-docs .wcrm-docs-search__submit--sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.wcrm-docs a {
	color: var(--wd-accent);
	text-decoration: none;
	box-shadow: none;
}

/* Themes animate `all` on links (Astra: .2s) – visibility too, so a link in the opening drawer would stay hidden for
   its first frame and refuse the focus. Only the colours move. */
.wcrm-docs a,
.wcrm-docs button {
	transition-property: color, background-color, border-color, box-shadow, opacity, transform;
}

.wcrm-docs a:hover,
.wcrm-docs a:focus {
	color: var(--wd-ink);
	text-decoration: none;
}

.wcrm-docs a:focus-visible,
.wcrm-docs button:focus-visible,
.wcrm-docs summary:focus-visible {
	outline: 2px solid var(--wd-accent);
	outline-offset: 2px;
}

.wcrm-docs mark {
	background: var(--wd-mark);
	color: inherit;
	padding: 0 .08em;
	border-radius: 3px;
}

/* ---------------------------------------------------------------- layout */

.wcrm-docs__layout {
	display: grid;
	grid-template-columns: var(--wd-side) minmax(0, 1fr);
	gap: 44px;
	align-items: start;
}

.wcrm-docs--bare .wcrm-docs__layout {
	grid-template-columns: minmax(0, 1fr);
	max-width: 760px;
}

.wcrm-docs__main {
	min-width: 0;
	display: block;
	margin: 0;
	padding: 0;
}

.wcrm-docs__bar,
.wcrm-docs__backdrop,
.wcrm-docs .wcrm-docs-side__close {
	display: none;
}

/* ---------------------------------------------------------------- sidebar */

.wcrm-docs-side {
	position: sticky;
	top: var(--wd-top);
	max-height: calc(100vh - var(--wd-top) - 16px);
	overflow: auto;
	overscroll-behavior: contain;
	padding: 18px 12px 24px;
	border: 1px solid var(--wd-line);
	border-radius: var(--wd-r);
	background: var(--wd-paper);
	scrollbar-width: thin;
}

.wcrm-docs .wcrm-docs-side__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 0 8px 12px;
}

.wcrm-docs .wcrm-docs-side__brand {
	font-weight: 800;
	font-size: 18px;
	letter-spacing: -.02em;
	color: var(--wd-ink);
}

.wcrm-docs .wcrm-docs-side__brand:hover,
.wcrm-docs .wcrm-docs-side__brand:focus {
	color: var(--wd-accent);
}

.wcrm-docs .wcrm-docs-side__nav {
	padding: 0 2px;
}

.wcrm-docs .wcrm-docs-side__tree,
.wcrm-docs .wcrm-docs-side__lessons {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wcrm-docs .wcrm-docs-side__tree > li,
.wcrm-docs .wcrm-docs-side__lessons > li {
	margin: 0;
	padding: 0;
}

.wcrm-docs .wcrm-docs-side__group {
	margin: 0 0 4px;
}

.wcrm-docs .wcrm-docs-side__row {
	display: flex;
	align-items: center;
	gap: 2px;
}

.wcrm-docs .wcrm-docs-side__cat {
	flex: 1;
	min-width: 0;
	padding: 7px 10px;
	border-radius: var(--wd-r-sm);
	color: var(--wd-ink);
	font-weight: 700;
	font-size: 14px;
	line-height: 1.35;
}

.wcrm-docs .wcrm-docs-side__cat:hover,
.wcrm-docs .wcrm-docs-side__cat:focus,
.wcrm-docs .wcrm-docs-side__cat.is-current {
	background: var(--wd-surface);
	color: var(--wd-accent);
}

.wcrm-docs .wcrm-docs-side__chev,
.wcrm-docs .wcrm-docs-side__chev:hover,
.wcrm-docs .wcrm-docs-side__chev:focus {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	flex: 0 0 30px;
	width: 30px;
	height: 30px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--wd-r-sm);
	background: transparent;
	box-shadow: none;
	color: var(--wd-ink-faint);
	font: inherit;
	line-height: 1;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
}

.wcrm-docs .wcrm-docs-side__chev:hover,
.wcrm-docs .wcrm-docs-side__chev:focus-visible {
	background: var(--wd-surface);
	color: var(--wd-ink);
}

.wcrm-docs .wcrm-docs-side__chev::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 7px;
	height: 7px;
	margin: -5px 0 0 -4px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-45deg);
	transition: transform var(--wd-fast) ease;
}

.wcrm-docs .wcrm-docs-side__chev[aria-expanded="true"]::before {
	margin: -6px 0 0 -4px;
	transform: rotate(45deg);
}

.wcrm-docs--nojs .wcrm-docs-side__chev {
	display: none;
}

.wcrm-docs .wcrm-docs-side__lessons {
	margin: 2px 0 8px 14px;
	padding: 2px 0 2px 6px;
	border-left: 1px solid var(--wd-line);
}

.wcrm-docs .wcrm-docs-side__lessons[hidden] {
	display: none;
}

.wcrm-docs .wcrm-docs-side__lessons a {
	display: block;
	padding: 6px 10px;
	border-radius: var(--wd-r-sm);
	color: var(--wd-ink-soft);
	font-size: 14px;
	line-height: 1.35;
}

.wcrm-docs .wcrm-docs-side__lessons a:hover,
.wcrm-docs .wcrm-docs-side__lessons a:focus {
	background: var(--wd-surface);
	color: var(--wd-ink);
}

.wcrm-docs .wcrm-docs-side__lessons a.is-current,
.wcrm-docs .wcrm-docs-side__lessons a.is-current:hover {
	background: var(--wd-accent-soft);
	color: var(--wd-accent);
	font-weight: 600;
}

/* While a query is typed, the results take the place of the tree. */
.wcrm-docs-side.is-searching .wcrm-docs-side__nav {
	display: none;
}

/* ---------------------------------------------------------------- search */

.wcrm-docs .wcrm-docs-search {
	position: relative;
	display: block;
	margin: 0;
	padding: 0;
}

.wcrm-docs .wcrm-docs-search--side {
	padding: 0 6px 14px;
}

.wcrm-docs .wcrm-docs-search {
	--wd-input-h: 42px;
}

.wcrm-docs .wcrm-docs-search--hero,
.wcrm-docs .wcrm-docs-search--page {
	--wd-input-h: 50px;
}

.wcrm-docs .wcrm-docs-search__box {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

/* The field holds the icon and (with JavaScript) the results, so both stay with the input when the button wraps. */
.wcrm-docs .wcrm-docs-search__field {
	position: relative;
	display: block;
	flex: 1 1 auto;
	min-width: 0;
}

.wcrm-docs .wcrm-docs-search__icon {
	position: absolute;
	z-index: 1;
	left: 12px;
	top: calc(var(--wd-input-h) / 2 - 8px);
	width: 14px;
	height: 14px;
	border: 2px solid var(--wd-ink-faint);
	border-radius: 50%;
	pointer-events: none;
}

.wcrm-docs .wcrm-docs-search__icon::after {
	content: "";
	position: absolute;
	right: -5px;
	bottom: -5px;
	width: 6px;
	height: 2px;
	background: var(--wd-ink-faint);
	transform: rotate(45deg);
	border-radius: 2px;
}

.wcrm-docs input.wcrm-docs-search__input,
.wcrm-docs input.wcrm-docs-search__input:focus {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	min-width: 0;
	height: var(--wd-input-h);
	margin: 0;
	padding: 0 12px 0 36px;
	border: 1px solid var(--wd-line-strong);
	border-radius: var(--wd-r-sm);
	background: var(--wd-surface);
	box-shadow: none;
	color: var(--wd-ink);
	font: inherit;
	font-size: 15px;
	line-height: calc(var(--wd-input-h) - 2px);
	outline: none;
}

.wcrm-docs input.wcrm-docs-search__input::placeholder {
	color: var(--wd-ink-faint);
	opacity: 1;
}

.wcrm-docs input.wcrm-docs-search__input:focus {
	border-color: var(--wd-accent);
	box-shadow: 0 0 0 3px var(--wd-accent-soft);
}

.wcrm-docs input.wcrm-docs-search__input::-webkit-search-cancel-button {
	cursor: pointer;
}

.wcrm-docs .wcrm-docs-search--hero input.wcrm-docs-search__input,
.wcrm-docs .wcrm-docs-search--page input.wcrm-docs-search__input {
	font-size: 16px;
}

.wcrm-docs button.wcrm-docs-search__submit,
.wcrm-docs button.wcrm-docs-search__submit:hover,
.wcrm-docs button.wcrm-docs-search__submit:focus {
	-webkit-appearance: none;
	appearance: none;
	flex: 0 0 auto;
	min-height: 0;
	height: var(--wd-input-h);
	margin: 0;
	padding: 0 22px;
	border: 1px solid var(--wd-accent);
	border-radius: var(--wd-r-sm);
	background: var(--wd-accent);
	box-shadow: none;
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
}

.wcrm-docs button.wcrm-docs-search__submit:hover {
	filter: brightness(.92);
}

/* With JavaScript the results open under the field (in the sidebar: in place of the tree). */
.wcrm-docs .wcrm-docs-search__panel {
	display: block;
	margin: 0;
	padding: 6px;
	border: 1px solid var(--wd-line);
	border-radius: var(--wd-r);
	background: var(--wd-surface);
	text-align: left;
}

.wcrm-docs .wcrm-docs-search__panel[hidden] {
	display: none;
}

.wcrm-docs .wcrm-docs-search--side .wcrm-docs-search__panel {
	margin-top: 10px;
}

.wcrm-docs .wcrm-docs-search--hero .wcrm-docs-search__panel,
.wcrm-docs .wcrm-docs-search--page .wcrm-docs-search__panel {
	position: absolute;
	z-index: 20;
	left: 0;
	right: 0;
	top: calc(100% + 6px);
	max-height: min(70vh, 560px);
	overflow: auto;
	box-shadow: 0 18px 40px -18px rgba(17, 24, 39, .35);
}

.wcrm-docs .wcrm-docs-search__empty {
	display: block;
	padding: 12px 10px;
	color: var(--wd-ink-soft);
	font-size: 14px;
}

/* Not every word found: the line above the lessons that have some of them. */
.wcrm-docs .wcrm-docs-search__note {
	display: block;
	margin: 0 0 4px;
	padding: 8px 12px 9px;
	border-bottom: 1px solid var(--wd-line);
	color: var(--wd-ink-soft);
	font-size: 13px;
	line-height: 1.45;
}

.wcrm-docs a.wcrm-docs-hit {
	display: block;
	padding: 10px 12px;
	border-radius: var(--wd-r-sm);
	color: var(--wd-ink);
}

.wcrm-docs a.wcrm-docs-hit:hover,
.wcrm-docs a.wcrm-docs-hit:focus,
.wcrm-docs a.wcrm-docs-hit.is-active {
	background: var(--wd-accent-soft);
	color: var(--wd-ink);
}

.wcrm-docs .wcrm-docs-hit__title {
	display: block;
	font-weight: 700;
	font-size: 15px;
	line-height: 1.35;
	color: var(--wd-ink);
}

.wcrm-docs a.wcrm-docs-hit.is-active .wcrm-docs-hit__title,
.wcrm-docs a.wcrm-docs-hit:hover .wcrm-docs-hit__title {
	color: var(--wd-accent);
}

.wcrm-docs .wcrm-docs-hit__cat {
	display: block;
	margin-top: 2px;
	color: var(--wd-ink-faint);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.wcrm-docs .wcrm-docs-hit__text {
	display: block;
	margin-top: 4px;
	color: var(--wd-ink-soft);
	font-size: 13.5px;
	line-height: 1.5;
}

.wcrm-docs-side .wcrm-docs-hit__text {
	font-size: 13px;
}

/* The no-JavaScript results page. */
.wcrm-docs .wcrm-docs-results {
	list-style: none;
	margin: 18px 0 0;
	padding: 0;
	border-top: 1px solid var(--wd-line);
}

.wcrm-docs .wcrm-docs-results__item {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid var(--wd-line);
}

.wcrm-docs .wcrm-docs-results a.wcrm-docs-hit {
	padding: 14px 8px;
	border-radius: 0;
}

/* ---------------------------------------------------------------- landing, category */

.wcrm-docs .wcrm-docs-kicker {
	display: block;
	margin: 0 0 10px;
	color: var(--wd-accent);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .14em;
	line-height: 1.3;
	text-transform: uppercase;
}

.wcrm-docs .wcrm-docs-hero {
	margin: 0 0 34px;
}

.wcrm-docs .wcrm-docs-hero--compact {
	margin-bottom: 26px;
}

.wcrm-docs .wcrm-docs-hero__title {
	margin: 0;
	padding: 0;
	color: var(--wd-ink);
	font-size: clamp(30px, 4vw, 44px);
	line-height: 1.12;
	letter-spacing: -.02em;
}

.wcrm-docs .wcrm-docs-hero__lead {
	max-width: 60ch;
	margin: 14px 0 0;
	color: var(--wd-ink-soft);
	font-size: clamp(16px, 1.4vw, 18px);
	line-height: 1.55;
}

.wcrm-docs .wcrm-docs-hero__count {
	margin: 10px 0 0;
	color: var(--wd-ink-faint);
	font-size: 14px;
}

.wcrm-docs .wcrm-docs-hero .wcrm-docs-search {
	max-width: 640px;
	margin-top: 24px;
}

.wcrm-docs .wcrm-docs-note {
	margin: 0 0 8px;
	color: var(--wd-ink-soft);
	font-size: 15px;
}

.wcrm-docs .wcrm-docs-start {
	margin: 0 0 40px;
}

.wcrm-docs .wcrm-docs-start a {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 20px 22px;
	border: 1px solid var(--wd-line);
	border-radius: var(--wd-r);
	background: linear-gradient(160deg, var(--wd-accent-soft), var(--wd-surface) 70%);
	color: var(--wd-ink);
	transition: border-color var(--wd-fast), transform var(--wd-fast);
}

.wcrm-docs .wcrm-docs-start a:hover,
.wcrm-docs .wcrm-docs-start a:focus {
	border-color: var(--wd-accent);
	color: var(--wd-ink);
	transform: translateY(-1px);
}

.wcrm-docs .wcrm-docs-start .wcrm-docs-kicker {
	margin: 0;
}

.wcrm-docs .wcrm-docs-start__title {
	font-weight: 800;
	font-size: 21px;
	line-height: 1.25;
	letter-spacing: -.01em;
	color: var(--wd-ink);
}

.wcrm-docs .wcrm-docs-start__meta {
	color: var(--wd-ink-soft);
	font-size: 14px;
}

.wcrm-docs .wcrm-docs-section {
	margin: 0 0 40px;
}

.wcrm-docs .wcrm-docs-section__title {
	margin: 0 0 14px;
	padding: 0;
	color: var(--wd-ink-faint);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .14em;
	line-height: 1.3;
	text-transform: uppercase;
}

.wcrm-docs .wcrm-docs-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
	gap: 12px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.wcrm-docs .wcrm-docs-cards > li {
	margin: 0;
	padding: 0;
}

.wcrm-docs a.wcrm-docs-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	height: 100%;
	padding: 18px 16px;
	border: 1px solid var(--wd-line);
	border-radius: var(--wd-r);
	background: var(--wd-surface);
	color: var(--wd-ink);
	transition: border-color var(--wd-fast), transform var(--wd-fast);
}

.wcrm-docs a.wcrm-docs-card:hover,
.wcrm-docs a.wcrm-docs-card:focus {
	border-color: var(--wd-accent);
	color: var(--wd-ink);
	transform: translateY(-2px);
}

.wcrm-docs .wcrm-docs-card__count {
	color: var(--wd-accent);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.wcrm-docs .wcrm-docs-card__name {
	font-weight: 800;
	font-size: 18px;
	line-height: 1.25;
	color: var(--wd-ink);
}

.wcrm-docs .wcrm-docs-card__desc {
	color: var(--wd-ink-soft);
	font-size: 14px;
	line-height: 1.5;
}

.wcrm-docs .wcrm-docs-all {
	columns: 2 280px;
	column-gap: 40px;
}

.wcrm-docs .wcrm-docs-all__group {
	break-inside: avoid;
	margin: 0 0 22px;
}

.wcrm-docs .wcrm-docs-all__title {
	margin: 0 0 6px;
	padding: 0;
	font-size: 16px;
	line-height: 1.35;
}

.wcrm-docs .wcrm-docs-all__title a {
	color: var(--wd-ink);
}

.wcrm-docs .wcrm-docs-all__title a:hover,
.wcrm-docs .wcrm-docs-all__title a:focus {
	color: var(--wd-accent);
}

.wcrm-docs .wcrm-docs-all__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wcrm-docs .wcrm-docs-all__list > li {
	margin: 0;
	padding: 3px 0;
	font-size: 15px;
	line-height: 1.4;
}

.wcrm-docs .wcrm-docs-lessons {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--wd-line);
}

.wcrm-docs .wcrm-docs-lessons > li {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid var(--wd-line);
}

.wcrm-docs .wcrm-docs-lessons a {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	column-gap: 16px;
	padding: 16px 4px;
	color: var(--wd-ink);
}

.wcrm-docs .wcrm-docs-lessons__title {
	grid-column: 1;
	font-weight: 700;
	font-size: 17px;
	line-height: 1.35;
}

.wcrm-docs .wcrm-docs-lessons__text {
	grid-column: 1;
	margin-top: 4px;
	color: var(--wd-ink-soft);
	font-size: 14.5px;
	line-height: 1.5;
}

.wcrm-docs .wcrm-docs-lessons__go {
	grid-column: 2;
	grid-row: 1 / span 2;
	align-self: center;
	color: var(--wd-accent);
	opacity: .6;
}

.wcrm-docs .wcrm-docs-lessons a:hover,
.wcrm-docs .wcrm-docs-lessons a:focus {
	color: var(--wd-ink);
}

.wcrm-docs .wcrm-docs-lessons a:hover .wcrm-docs-lessons__title,
.wcrm-docs .wcrm-docs-lessons a:focus .wcrm-docs-lessons__title {
	color: var(--wd-accent);
}

.wcrm-docs .wcrm-docs-lessons a:hover .wcrm-docs-lessons__go {
	opacity: 1;
}

/* ---------------------------------------------------------------- article */

.wcrm-docs .wcrm-docs-crumbs {
	margin: 0 0 18px;
	font-size: 13.5px;
	line-height: 1.4;
	color: var(--wd-ink-faint);
}

.wcrm-docs .wcrm-docs-crumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 0;
	list-style: none;
	margin: 0;
	padding: 0;
}

.wcrm-docs .wcrm-docs-crumbs li {
	margin: 0;
	padding: 0;
}

.wcrm-docs .wcrm-docs-crumbs a {
	color: var(--wd-ink-soft);
}

.wcrm-docs .wcrm-docs-crumbs a:hover,
.wcrm-docs .wcrm-docs-crumbs a:focus {
	color: var(--wd-accent);
}

.wcrm-docs .wcrm-docs-crumbs__sep {
	margin: 0 8px;
	color: var(--wd-ink-faint);
}

.wcrm-docs .wcrm-docs-article-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 44px;
	align-items: start;
}

.wcrm-docs .wcrm-docs-article-row.has-rail {
	grid-template-columns: minmax(0, 1fr) var(--wd-rail);
}

.wcrm-docs .wcrm-docs-article {
	min-width: 0;
	max-width: 760px;
}

.wcrm-docs .wcrm-docs-article__title {
	margin: 0 0 26px;
	padding: 0 0 20px;
	border-bottom: 1px solid var(--wd-line);
	color: var(--wd-ink);
	font-size: clamp(28px, 3.4vw, 40px);
	line-height: 1.15;
	letter-spacing: -.02em;
}

.wcrm-docs .wcrm-docs-preview {
	margin: 0 0 22px;
	padding: 10px 14px;
	border-left: 4px solid #dba617;
	border-radius: var(--wd-r-sm);
	background: #fcf9e8;
	color: var(--wd-ink);
	font-size: 14px;
}

.wcrm-docs .wcrm-docs-body {
	font-size: 16.5px;
	line-height: 1.7;
	max-width: none;
}

/* Below the sticky site header (the content stylesheet's 112 px is sbyte.lt's header). */
#wcrm-docs .wcrm-docs-body :is(h2, h3, h4),
#wcrm-docs input.wcrm-docs-search__input {
	scroll-margin-top: calc(var(--wd-top) + 12px);
}

@media (max-width: 900px) {
	/* Below the floating „Turinys“ button. */
	#wcrm-docs .wcrm-docs-body :is(h2, h3, h4),
	#wcrm-docs .wcrm-docs__main input.wcrm-docs-search__input {
		scroll-margin-top: calc(var(--wd-top) + 56px);
	}
}

.wcrm-docs .wcrm-docs-body img,
.wcrm-docs .wcrm-docs-body video,
.wcrm-docs .wcrm-docs-body iframe {
	max-width: 100%;
	height: auto;
}

/* Contents: a sticky column on wide screens, a fold above the text on narrow ones. */
.wcrm-docs .wcrm-docs-toc--rail {
	position: sticky;
	top: calc(var(--wd-top) + 8px);
	max-height: calc(100vh - var(--wd-top) - 24px);
	overflow: auto;
	padding-top: 6px;
}

.wcrm-docs .wcrm-docs-toc__label {
	margin: 0 0 10px;
	color: var(--wd-ink-faint);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.wcrm-docs .wcrm-docs-toc__list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-left: 1px solid var(--wd-line);
}

.wcrm-docs .wcrm-docs-toc__list > li {
	margin: 0;
	padding: 0;
}

.wcrm-docs .wcrm-docs-toc__list a {
	display: block;
	padding: 5px 0 5px 14px;
	color: var(--wd-ink-soft);
	font-size: 13.5px;
	line-height: 1.35;
}

.wcrm-docs .wcrm-docs-toc__list li.is-h3 a {
	padding-left: 26px;
	font-size: 13px;
}

.wcrm-docs .wcrm-docs-toc__list a:hover,
.wcrm-docs .wcrm-docs-toc__list a:focus {
	color: var(--wd-accent);
}

.wcrm-docs details.wcrm-docs-toc--inline {
	display: none;
	margin: 0 0 24px;
	padding: 0;
	border: 1px solid var(--wd-line);
	border-radius: var(--wd-r);
	background: var(--wd-paper);
}

.wcrm-docs details.wcrm-docs-toc--inline > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 16px;
	color: var(--wd-ink);
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

.wcrm-docs details.wcrm-docs-toc--inline > summary::-webkit-details-marker {
	display: none;
}

.wcrm-docs details.wcrm-docs-toc--inline > summary::after {
	content: "";
	width: 8px;
	height: 8px;
	margin-right: 4px;
	border-right: 2px solid var(--wd-ink-faint);
	border-bottom: 2px solid var(--wd-ink-faint);
	transform: rotate(45deg);
	transition: transform var(--wd-fast) ease;
}

.wcrm-docs details.wcrm-docs-toc--inline[open] > summary::after {
	transform: rotate(-135deg);
}

.wcrm-docs details.wcrm-docs-toc--inline .wcrm-docs-toc__list {
	margin: 0 16px 14px;
}

.wcrm-docs .wcrm-docs-pager {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin: 48px 0 0;
	padding: 28px 0 0;
	border-top: 1px solid var(--wd-line);
}

.wcrm-docs .wcrm-docs-pager a {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	padding: 16px 18px;
	border: 1px solid var(--wd-line);
	border-radius: var(--wd-r);
	background: var(--wd-surface);
	color: var(--wd-ink);
	transition: border-color var(--wd-fast), transform var(--wd-fast);
}

.wcrm-docs .wcrm-docs-pager a:hover,
.wcrm-docs .wcrm-docs-pager a:focus {
	border-color: var(--wd-accent);
	color: var(--wd-ink);
	transform: translateY(-1px);
}

.wcrm-docs .wcrm-docs-pager__prev {
	grid-column: 1;
}

.wcrm-docs .wcrm-docs-pager__next {
	grid-column: 2;
	text-align: right;
}

.wcrm-docs .wcrm-docs-pager__dir {
	color: var(--wd-ink-faint);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.wcrm-docs .wcrm-docs-pager__title {
	font-weight: 700;
	font-size: 15px;
	line-height: 1.3;
	color: var(--wd-ink);
}

.wcrm-docs .wcrm-docs-pager a:hover .wcrm-docs-pager__title,
.wcrm-docs .wcrm-docs-pager a:focus .wcrm-docs-pager__title {
	color: var(--wd-accent);
}

.wcrm-docs .wcrm-docs-back {
	margin: 28px 0 0;
	font-size: 15px;
	font-weight: 600;
}

/* ---------------------------------------------------------------- narrower */

@media (max-width: 1100px) {
	.wcrm-docs .wcrm-docs-article-row.has-rail {
		grid-template-columns: minmax(0, 1fr);
	}

	.wcrm-docs .wcrm-docs-toc--rail {
		display: none;
	}

	.wcrm-docs details.wcrm-docs-toc--inline {
		display: block;
	}

	.wcrm-docs {
		--wd-side: 248px;
	}

	.wcrm-docs__layout {
		gap: 32px;
	}
}

/* ---------------------------------------------------------------- phone: the „Turinys“ drawer */

@media (max-width: 900px) {
	.wcrm-docs {
		padding-top: 0;
	}

	/* No „Turinys“ button above the text („Dokumentacija ruošiama“): the room it would take. */
	.wcrm-docs.wcrm-docs--bare {
		padding-top: 24px;
	}

	.wcrm-docs__layout,
	.wcrm-docs--bare .wcrm-docs__layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
	}

	/* Only the button floats over the text while scrolling (a band would need the page's own background). */
	.wcrm-docs .wcrm-docs__bar {
		display: block;
		position: sticky;
		top: calc(var(--wd-top) - 6px);
		z-index: 30;
		margin: 0 0 18px;
		padding: 10px 0 0;
		background: transparent;
		pointer-events: none;
	}

	.wcrm-docs a.wcrm-docs__toggle {
		display: inline-flex;
		align-items: center;
		gap: 10px;
		min-height: 44px;
		padding: 0 14px 0 10px;
		border: 1px solid var(--wd-line-strong);
		border-radius: var(--wd-r-sm);
		background: var(--wd-surface);
		color: var(--wd-ink);
		font-weight: 700;
		font-size: 15px;
		box-shadow: 0 8px 20px -12px rgba(17, 24, 39, .45);
		pointer-events: auto;
	}

	.wcrm-docs a.wcrm-docs__toggle:hover,
	.wcrm-docs a.wcrm-docs__toggle:focus {
		border-color: var(--wd-accent);
		color: var(--wd-ink);
	}

	.wcrm-docs .wcrm-docs__toggle-icon {
		position: relative;
		display: inline-block;
		width: 18px;
		height: 2px;
		background: currentColor;
		border-radius: 2px;
	}

	.wcrm-docs .wcrm-docs__toggle-icon::before,
	.wcrm-docs .wcrm-docs__toggle-icon::after {
		content: "";
		position: absolute;
		left: 0;
		width: 18px;
		height: 2px;
		background: currentColor;
		border-radius: 2px;
	}

	.wcrm-docs .wcrm-docs__toggle-icon::before {
		top: -6px;
	}

	.wcrm-docs .wcrm-docs__toggle-icon::after {
		top: 6px;
	}

	.wcrm-docs .wcrm-docs-side {
		position: fixed;
		z-index: 100001;
		left: 0;
		top: 0;
		bottom: 0;
		width: min(340px, 88vw);
		max-height: none;
		height: 100%;
		margin: 0;
		padding: 18px 12px 32px;
		border: 0;
		border-radius: 0;
		background: var(--wd-paper);
		box-shadow: 18px 0 40px rgba(17, 24, 39, .2);
		transform: translateX(-105%);
		visibility: hidden;
		transition: transform .22s var(--wd-ease), visibility 0s linear .22s;
	}

	.wcrm-docs.is-nav-open .wcrm-docs-side,
	.wcrm-docs--nojs .wcrm-docs-side:target {
		transform: none;
		visibility: visible;
		transition: transform .22s var(--wd-ease);
	}

	.wcrm-docs a.wcrm-docs-side__close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		margin: -8px -4px -8px 0;
		border-radius: var(--wd-r-sm);
		color: var(--wd-ink-soft);
		font-size: 18px;
		line-height: 1;
	}

	.wcrm-docs a.wcrm-docs-side__close:hover,
	.wcrm-docs a.wcrm-docs-side__close:focus {
		background: var(--wd-surface);
		color: var(--wd-ink);
	}

	.wcrm-docs.is-nav-open .wcrm-docs__backdrop,
	.wcrm-docs--nojs .wcrm-docs-side:target + .wcrm-docs__backdrop {
		display: block;
		position: fixed;
		z-index: 100000;
		inset: 0;
		background: rgba(17, 24, 39, .45);
	}

	.wcrm-docs .wcrm-docs-side__cat,
	.wcrm-docs .wcrm-docs-side__lessons a {
		font-size: 15px;
		padding-top: 9px;
		padding-bottom: 9px;
	}

	.wcrm-docs .wcrm-docs-side__chev {
		flex-basis: 40px;
		width: 40px;
		height: 40px;
	}

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

	.wcrm-docs .wcrm-docs-pager__prev,
	.wcrm-docs .wcrm-docs-pager__next {
		grid-column: 1;
		text-align: left;
	}

	.wcrm-docs .wcrm-docs-all {
		columns: 1;
	}
}

@media (max-width: 600px) {
	.wcrm-docs {
		padding-left: 16px;
		padding-right: 16px;
		padding-bottom: 56px;
	}

	/* Astra's boxed layout pads its container only .54em on a phone: 16 px in all. */
	.ast-separate-container .ast-container > .wcrm-docs {
		padding-left: 8px;
		padding-right: 8px;
	}

	.wcrm-docs .wcrm-docs-search--hero .wcrm-docs-search__box,
	.wcrm-docs .wcrm-docs-search--page .wcrm-docs-search__box {
		flex-wrap: wrap;
	}

	.wcrm-docs .wcrm-docs-search--hero .wcrm-docs-search__field,
	.wcrm-docs .wcrm-docs-search--page .wcrm-docs-search__field,
	.wcrm-docs button.wcrm-docs-search__submit {
		flex: 1 1 100%;
	}

	.wcrm-docs .wcrm-docs-body {
		font-size: 16px;
	}

	.wcrm-docs .wcrm-docs-lessons__title {
		font-size: 16px;
	}
}

html.wcrm-docs-lock,
html.wcrm-docs-lock body {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.wcrm-docs .wcrm-docs-side,
	.wcrm-docs .wcrm-docs-start a,
	.wcrm-docs a.wcrm-docs-card,
	.wcrm-docs .wcrm-docs-pager a,
	.wcrm-docs .wcrm-docs-side__chev::before {
		transition: none;
	}

	.wcrm-docs .wcrm-docs-start a:hover,
	.wcrm-docs a.wcrm-docs-card:hover,
	.wcrm-docs .wcrm-docs-pager a:hover {
		transform: none;
	}
}
