/* This is an arbitrary CSS string added to the bundle */
@font-face {
	font-family: "Commissioner";
	src: url("/fonts/CommissionerBoldFlair.woff2") format("woff2");
	font-weight: bold;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Commissioner";
	src: url("/fonts/CommissionerRegular.woff2") format("woff2");
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Commissioner";
	src: url("/fonts/CommissionerItalic.woff2") format("woff2");
	font-weight: normal;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "PT Mono";
	src: url("/fonts/PTMonoRegular.woff2") format("woff2");
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

:root {
	--font-family: "Commissioner", -apple-system, system-ui, sans-serif;
	--font-family-monospace: "PT Mono", Consolas, Menlo, Monaco, monospace;
	--font-family-caption: "Commissioner", -apple-system, system-ui, sans-serif;
}

/* Theme colors */
:root {
	--background-color: #fcfaff;

	--text-color: #450357;
	--text-color-header: #450357;
	--text-color-link: #028459;
	--text-color-link-active: #f84890;
	--text-color-link-visited: #b24bab;
	--text-color-accent: #f84890;
	--text-color-highlight: #450357;
	--background-color-highlight: color-mix(in srgb, #ffe300, transparent 50%);
	--spoiler-color: #bc90ca;
	--code-background: color-mix(in srgb, var(--text-color), transparent 95%);

	--font-size-text: 1.125rem;
	--font-size-caption: 0.825rem;
	--syntax-tab-size: 2;
	--article-width: 48rem;
	--sidenote-margin: 3rem;
	--transparency-underline: 80%;
	--star-mark: "♥";
	--end-mark: "❦";
}

@media (prefers-color-scheme: dark) {
	:root {
		--background-color: #19001f;

		--text-color: #d7cde7;
		--text-color-header: #f6f0ff;
		--text-color-link: #dc7f07;
		--text-color-link-active: #f84890;
		--text-color-link-visited: #df5ad6;
		--text-color-accent: #f84890;
		--text-color-highlight: #2a0035;
		--background-color-highlight: #ffea78;
		--transparency-underline: 40%;
	}
}

/* Global stylesheet */
* {
	box-sizing: border-box;
}

@view-transition {
	navigation: auto;
}

/* ССЫЛКИ */

html,
body {
	padding: 0;
	margin: 0 auto;
	font-family: var(--font-family);
	color: var(--text-color);
	background-color: var(--background-color);
}

html {
	overflow-y: scroll;
}
body {
	margin: 0 2% 0 2%;
	padding-left: 0;
}

h1 {
	font-size: 3rem;
	margin-top: 0em;
	margin-bottom: 1.5rem;
	line-height: 1;
	word-wrap: break-word;
	word-break: break-word;
}

@media (max-width: 30rem) {
	h1 {
		font-size: 2rem;
		margin-top: 0.5rem;
	}
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
.post-metadata,
ul,
ol,
pre,
table {
	max-width: var(--article-width);
}

h2,
h3,
h4,
h5,
h6 {
	margin-bottom: 0.5rem;
	margin-top: 0;
	padding-top: 1.5rem;
}
h1,
h2,
h3,
h4,
h5,
h6 {
	color: var(--text-color-header);
	text-wrap: balance;
	line-height: 1.1;
}

p,
ul,
ol {
	font-size: var(--font-size-text);
	line-height: 1.45;
	letter-spacing: -0.01rem;
	margin: 0;
	hyphens: manual;
	-webkit-hyphens: manual;
	-ms-hyphens: manual;
}

@media (min-width: 760px) {
	p,
	ul,
	ol {
		hyphens: none;
		-webkit-hyphens: none;
		-ms-hyphens: none;
	}
}

@media (max-width: 420px) {
	p,
	ul,
	ol,
	li {
		line-height: 1.35;
	}
}

p {
	margin-bottom: 1rem;
	text-wrap-style: pretty;
}

p strong,
p b,
p .bold {
	letter-spacing: 0;
}

/* https://www.a11yproject.com/posts/how-to-hide-content/ */
mjx-assistive-mml,
.visually-hidden {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}
mjx-container svg {
	vertical-align: -0.14ex !important;
}

/* Fluid images via https://www.zachleat.com/web/fluid-images/ */

img[width][height] {
	height: auto;
}
img[src$=".svg"] {
	width: 100%;
	height: auto;
	max-width: none;
}
video,
iframe {
	width: 100%;
	height: auto;
	margin-bottom: 1rem;
}
iframe {
	aspect-ratio: 16/9;
}

figure {
	margin: 0;
}

figure img,
picture img {
	margin-left: 0;
	margin-right: 0;
	max-width: 100%;
}

br + figure img,
br + picture img {
	margin-top: 0.4rem;
}

.starred::after {
	font-weight: bold;
	content: var(--star-mark);
	color: var(--text-color-accent);
}

article h1.starred::after {
	margin-left: 0.5rem;
}

li.starred::after {
	margin-left:0.2rem;
}

a[href] {
	color: var(--text-color-link);
}
a[href]:visited {
	color: var(--text-color-link-visited);
}
a[href]:hover,
a[href]:active {
	color: var(--text-color-link-active);
}

/* ССЫЛКИ */
a,
a u {
	text-decoration: underline;
	text-decoration-thickness: 1px; /* Задаём толщину подчёркивания */
	text-underline-offset: 0.175em; /* Задаём сдвиг подчёркивания */
	text-decoration-color: color-mix(
		in srgb,
		currentColor,
		transparent var(--transparency-underline)
	);
	text-decoration-skip: none; /* Запрещаем подчёркиванию пропускать выносные элементы букв */
	text-decoration-skip-ink: none;
	transition:
		color 0.25s ease-in,
		text-decoration-color 0.25s ease-in;
}

a:has(u) {
	text-decoration: none;
}

a:hover,
a:hover u {
	text-decoration-color: currentColor;
	transition:
		color 0.05s ease-in,
		text-decoration-color 0.05s ease-in;
}

a:visited:hover,
a:visited:hover u {
	text-decoration-color: currentColor;
	transition:
		color 0.05s ease-in,
		text-decoration-color 0.05s ease-in;
}

main,
footer {
	padding: 0;
}

header {
	/* border-bottom: 1px solid
		color-mix(in srgb, var(--text-color), transparent var(--transparency-underline)); */
	margin-bottom: 3.5em;
}

footer {
	margin-top: 5rem;
	padding-top: 1rem;
	/* border-top: 1px solid color-mix(in srgb, currentColor, transparent var(--transparency-underline)); */
}

.links-nextprev {
	display: flex;
	justify-content: space-between;
	list-style: "";
	border-top: 1px solid
		color-mix(in srgb, currentColor, transparent var(--transparency-underline));
	padding: 1em 0;
	margin-top: 2.5em;
}
.links-nextprev > * {
	flex-grow: 1;
	max-width: calc((100% - 2%) / 2);
}
.links-nextprev-next {
	text-align: left;
}

table {
	margin: 1rem 0 2rem 0;
	border-spacing: 0;
}
table td,
table th {
	padding-right: 1em;
	text-align: left;
	vertical-align: text-top;
}

table td {
	padding-top: 0.2em;
	padding-bottom: 0.6em;
}

table th {
	padding-top: 0.5em;
	padding-bottom: 0.5em;
	border-bottom: 1px solid
		color-mix(in srgb, currentColor, transparent var(--transparency-underline));
}

table br {
	line-height: 1;
	margin: -0.13em 0; /* Adjust this value to get desired spacing */
	display: block;
	content: "";
}

mark {
	color: var(--text-color-highlight);
	background: var(--background-color-highlight);
}

.highlighted span {
	background: color-mix(
		in srgb,
		var(--background-color-highlight),
		transparent 70%
	);
	line-height: 1.2;
}

.highlighted::after {
	background: transparent;
}

hr {
	height: 1px;
	background: transparent;
	color: color-mix(
		in srgb,
		var(--text-color),
		transparent var(--transparency-underline)
	);
	margin-top: 2rem;
	margin-bottom: 3rem;
}

article li {
	margin-top: 0.5rem;
}

ol,
ul {
	margin-top: 0;
	padding-left: 2rem;
}

p:has(+ ul),
p:has(+ ol) {
	margin-bottom: 0;
}

ul li::marker {
	content: "·    ";
}

pre,
code {
	font-family: var(--font-family-monospace) !important;
	line-height: 1.2 !important;
	letter-spacing: -0.02rem;
}
pre:not([class*="language-"]) {
	margin: 0.5em 0 1em 0;
	-moz-tab-size: var(--syntax-tab-size);
	-o-tab-size: var(--syntax-tab-size);
	tab-size: var(--syntax-tab-size);
	-webkit-hyphens: none;
	-ms-hyphens: none;
	hyphens: none;
	direction: ltr;
	text-align: left;
	white-space: pre;
	word-spacing: normal;
	word-break: normal;
	overflow-x: auto;
	white-space: pre-wrap;
}
code {
	font-size: 105%;
}

blockquote p {
	font-size: 1.7rem;
	font-style: italic;
	line-height: 1.2;
}

article p code,
article ul code,
article ol code {
	background: var(--code-background);
	padding: 0rem 0.35rem 0.05rem 0.35rem;
	border-radius: 3px;
}

article ul,
article ol {
	margin-bottom: 1rem;
}

/* Header */
header {
	display: flex;
	gap: 1em;
	flex-wrap: wrap;
	align-items: center;
	padding: 1em 0 1em 0;
}
.home-link {
	font-size: 1em; /* 16px /16 */
	font-weight: 700;
}
.home-link:link:not(:hover) {
	text-decoration: none;
}

.postslist {
	list-style: none;
	padding: 0;
}
.postslist-item {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	counter-increment: start-from -1;
	margin-bottom: 0.4em;
}

.postslist-item::before {
	display: none;
}

.postslist-item-active .postslist-link {
	font-weight: bold;
}

.post-tag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--text-color-link);
}
.postslist-item > .post-tag {
	align-self: center;
}

.links-nextprev li {
	line-height: 1.15;
}

.links-nextprev li::marker {
	content: "";
}
.nav-content .linklist-item::after .post-metadata .linklist-item::after {
	content: "   ";
}

/* Tags list */
.post-metadata .post-time {
	color: var(--text-color);
}

.underline::after,
.post-time,
.highlighted span {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.175em;
	text-decoration-skip: none;
	text-decoration-skip-ink: none;
	text-decoration-color: color-mix(
		in srgb,
		currentColor,
		transparent var(--transparency-underline)
	);
}

.linklist {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	align-items: center;
	padding: 0;
	margin: 0;
	list-style: none;
	line-height: 1.5;
}

.linklist-item {
	position: relative;
	display: inline;
	color: var(--text-color-link);
}

.unvisitable a:visited {
	color: var(--text-color-link);
	text-decoration-color: currentColor;
}

.unvisitable a:hover {
	color: var(--text-color-link-active);
	text-decoration-color: currentColor;
}

.linklist-item::after,
.post-tag::after {
	content: "     ";
}

.linklist-item::after {
	white-space: nowrap;
	color: currentColor;
}

/* Hide the last connector */
.linklist .linklist-item:last-child::after {
	display: none;
}

.highlighted-item,
.highlighted-item::after {
	color: var(--text-color-link);
	text-decoration-color: var(--text-color-link);
	font-weight: bold;
}

.current-item,
.current-item::after {
	color: var(--text-color-link);
	font-weight: bold;
	text-decoration: none;
}

.linklist li:has(+ .current-item)::after {
	text-decoration: none;
}

.spoiler {
	background-color: var(--spoiler-color);
	color: transparent;
	border-radius: 3px;
	transition: color ease-in 0.01s ease-out 0.55s;
	cursor: help;
}

.spoiler:not(:hover) * {
	background-color: inherit;
	color: inherit;
}

.spoiler:hover,
.spoiler:focus {
	background-color: transparent;
	color: var(--text-color);
}

i {
	display: inline-block;
	font-size: 1.1em;
	width: 1em;
	height: 1em;
	background-color: currentColor;
	mask-size: 1.3em !important;
	mask-position: center !important;
	mask-repeat: no-repeat !important;
	margin-bottom: -1.5px;
}

.ha-placeholder {
	font-weight: normal;
}
.post-metadata,
.links-nextprev,
.sidenote,
figcaption,
.footer-built,
.postslist-container a,
.postslist-container p {
	font-size: var(--font-size-caption);
	line-height: 1.2;
	font-family: var(--font-family-caption);
}
}
.sidenote {
	max-width: 200px;
	position: relative;
	float: right;
	margin-top: 0;
	padding: 0;
	margin-left: calc(100% - 200px);
}
.sidenote::after {
	content: " ↓";
	font-style: normal;
}

@media (min-width: calc(48rem / 0.96 + 150px)) {
	.sidenote {
		position: absolute;
		left: calc(2% + var(--article-width));
		margin-left: var(--sidenote-margin);
		margin-top: .4em;
		max-width: 200px;
	}
	.sidenote::after {
		content: "";
	}
}

.image-grid:has(.image-item) {
	display: flex;
	gap: 2px 2px;
	margin: 1rem 0;
}

.mediateka-grid:has(.mediateka-grid-item) {
	gap: 6px 2px;
	flex-wrap: wrap;
	margin-bottom: 32px;
}

.image-item a img {
	height: 80px !important;
	width: auto; /* Ensures aspect ratio is maintained */
	object-fit: contain;
}

.mediateka-grid-item a {
	display: block;
	text-decoration: none;
}

.mediateka-grid-item figcaption {
	margin: 0;
}

.mediateka-grid-item figure {
	display: flex;
	flex-direction: column;
	margin: 0;
}

.mediateka-grid-item figcaption,
.post-title-block {
	font-size: 0.6rem;
}

.mediateka-grid-item figcaption {
	white-space: nowrap; /* Force single line */
	overflow: hidden; /* Hide overflow */
	text-overflow: ellipsis; /* Show … */
}
.post-title-block {
	height: 0;
	position: relative;
	z-index: 1;
	text-align: right;
	padding-right: 3px;
}

.mediateka-grid-item.unvisitable .post-title-block a {
	text-decoration-color: transparent;
	color: color-mix(
		in srgb,
		currentColor,
		transparent var(--transparency-underline)
	) !important;
}

.unvisitable a.post-url-anchor,
.unvisitable a.post-url-anchor:visited {
	text-decoration-color: currentColor;
	color: color-mix(
		in srgb,
		currentColor,
		transparent var(--transparency-underline)
	) !important;
}

.mediateka-grid-item figcaption {
	margin-top: -0.2rem;
	overflow: hidden;
	height: 1.4em;
}

figcaption {
	margin-bottom: 1.3rem;
}


.linklist-item {
	white-space: collapse;
}

.nav-container {
	display: flex;
	gap: 0.7em;
	padding-top: 1em;
	margin-bottom: 5em;
	max-width: 100% !important;
}
.nav-content {
	line-height: 1.4;
}
.nav-content .linklist {
	width: max-content;
	font-size: 1rem;
}

.postslist-header {
	margin-bottom: 0;
	font-size: 4rem;
}
.postslist-container {
	display: flex;
	gap: 0.5rem;
	align-items: baseline;
	margin-bottom: 3rem;
	flex-wrap: wrap;
}
.postslist {
	font-size: var(--font-size-text);
}

.preview-title {
	font-size: 1.4rem;
	margin-bottom: 0.4rem;
	margin-top: 0.5rem;
}

.preview-title.unvisitable a,
.preview-title.unvisitable a:visited {
	color: var(--text-color-header);
}

.post-preview {
	margin-bottom: 3rem;
}

.preview-description * {
	margin-bottom: 0.5rem;
}

article > p:last-of-type::after,
.short p::after {
	content: var(--end-mark) !important;
	margin-left: 0.1rem;
}

article {
	font-size: var(--font-size-text);
}

.scrollable {
	max-width: 100%;
	position: relative;
	background-color: var(--background-color);
}

.post-preview .scrollable {
	height: 84px;
}

.scrollable__in {
	height: 100%;
	overflow: auto;
	scrollbar-width: none;
	white-space: nowrap;
	box-sizing: border-box;
}

/* Горизонтальные тени — псевдоэлементы */
.scrollable::before,
.scrollable::after {
	content: "";
	width: 30px;
	position: absolute;
	top: 0;
	bottom: 0;
	pointer-events: none;
	opacity: 0;
	transition: 0.15s linear;
	z-index: 1;
}

.scrollable::before {
	left: 0;
	background: linear-gradient(to right, var(--background-color), transparent);
}

.scrollable::after {
	right: 0;
	background: linear-gradient(to left, var(--background-color), transparent);
}

/* Активируем тени при скролле */
.scrollable.is__scrolled::before,
.scrollable:not(.is__end)::after {
	opacity: 1;
}

picture + :is(h1, h2, h3, h4, h5, h6),
figure + :is(h1, h2, h3, h4, h5, h6) {
	padding-top: 0;
	margin-top: -0.5rem;
}


footer {
	display: flex;
	align-items: last baseline;
	justify-content: space-between;
	flex-wrap: wrap;
}
.footer-text {
	margin-bottom: 2rem;
}
.footer-built {
	margin-bottom: 2rem;
	opacity: 0.7;
}
.footer-built a {
	color: var(--text-color) !important;
}

/* CUSTOM CLASSES */

@media screen and (min-width: 30rem) {
	.window {
		border-radius: 5.5px;
		outline: 1.5px solid #c4c4e3;
		outline-offset: -1.3px;
	}
}

.giant .possum {
	font-size: inherit;
	margin-bottom: -0.41rem;
}

.avatar {
	width: 45px;
	height: 45px;
	border-radius: 50%;
}

/* .glued-pic {
	padding-top: 0;
	margin-bottom: -1.1rem;
} */


.flower {
	mask: url(/assets/flower-sakura.svg);
}

.possum {
	mask: url(/assets/possum.svg);
}

.giant {
	font-size: 7rem;
	color: var(--text-color-accent);
	margin-bottom: 0.2rem;
	line-height: 0.9;
	letter-spacing: -0.2rem;
}

@media (max-width: 30rem) {
	.giant {
		font-size: 4rem;
	}
}

.bold {
	font-weight: bold;
}

.accent {
	color: var(--text-color-accent) !important;
}

.red {
	color: #cd2424;
}

.green {
	color: green;
}

.transparent {
	color: transparent;
}

.container {
	display: flex;
	gap: 1.2rem;
	margin-bottom: 1rem;
}
.container#markdown-extras p {
	font-size: var(--font-size-caption);
	line-height: 1.2;
	font-family: var(--font-family-caption);
}
.container#featured_pages * {
	font-size: 0.825rem;
	flex: 1 1 0;
}

.container#hyphenation * {
	white-space: normal;
	font-size: var(--font-size-caption);
	flex: 0 0 258px;
}

.birka {
	font-size: var(--font-size-caption);
	font-family: var(--font-family-caption);
	margin-bottom: -0.5rem;
}

figure .fullwidth {
	width: 100%;
}

.bubble {
  background: var(--text-color-accent);
  color: var(--background-color);
  padding: 0.5em 1.5em 0.6em 1em;
  margin: 0.1em 0;
  width: fit-content;
  border-radius: 0.3em 1.25em 1.25em 0.3em;
}

.bubble#first {
  border-top-left-radius: 1.25em;
}

.bubble#last {
  margin-bottom: 1rem;
}
/* :root {
	--background-color: #fff;

	--text-color: #000;
	--text-color-header: #000;
	--text-color-highlight: #000;
	--text-color-link: #3857ff;
	--text-color-link-active: #f84890;
	--text-color-link-visited: #b24bab;
	--text-color-accent: #f84890;
	--background-color-highlight: color-mix(in srgb, #ffe300, transparent 50%);
	--spoiler-color: #a6aed7;
	--code-background: color-mix(in srgb, var(--text-color), transparent 95%);

	--font-size-text: 1.125rem;
	--font-size-caption: 0.825rem;
	--syntax-tab-size: 2;
	--article-width: 48rem;
	--sidenote-margin: 3rem;
	--transparency-underline: 80%;
	--star-mark: "♥";
	--end-mark: "❦";
}

@media (prefers-color-scheme: dark) {
	:root {
		--background-color: #202020;

		--text-color: #e5e5e5;
		--text-color-header: #fff;
		--text-color-link: #8ea0ff;
		--text-color-link-active: #f84890;
		--text-color-link-visited: #e784e0;
		--text-color-accent: #f84890;
		--text-color-highlight: #2a0035;
		--background-color-highlight: #ffea78;
		--transparency-underline: 40%;
	}
}

:root {
	--font-family: "Commissioner", -apple-system, system-ui, sans-serif;
	--font-family-monospace: "PT Mono", Consolas, Menlo, Monaco, monospace;
	--font-family-caption: "Commissioner", -apple-system, system-ui, sans-serif;
}

*/