/* ==========================================================================
   Xennial — document pages, comments, responsive, fallbacks
   ========================================================================== */

body.xennial-doc-page {
	min-height: 100vh;
	overflow-x: hidden;
	background:
		radial-gradient(900px 620px at 80% 6%, rgba(120, 91, 158, 0.32), transparent 62%),
		radial-gradient(760px 500px at 8% 92%, rgba(30, 111, 104, 0.32), transparent 64%),
		linear-gradient(168deg, #143b3a 0%, #1c3347 50%, #382f52 100%);
	background-attachment: fixed;
}

.site-bar {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 100;
	border-bottom: 1px solid rgba(217, 239, 233, 0.16);
	background: rgba(10, 30, 30, 0.78);
	backdrop-filter: blur(8px);
	color: #f2eee2;
}

.site-bar__inner {
	display: flex;
	align-items: center;
	gap: 16px;
	max-width: 1040px;
	height: 62px;
	margin: 0 auto;
	padding: 0 20px;
}

.site-brand {
	color: #f7f3e7;
	font-family: var(--px);
	font-size: 17px;
	line-height: 1;
	text-decoration: none;
	text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
}

.site-brand:hover {
	color: #fffdf6;
}

.site-brand__dot {
	color: #e8c84a;
}

.site-bar__tag {
	margin: 0;
	color: rgba(233, 228, 213, 0.58);
	font-family: var(--serif);
	font-size: 11.5px;
	font-style: italic;
}

.site-nav {
	display: flex;
	align-items: center;
	gap: 18px;
	margin-left: auto;
}

.site-nav a {
	color: rgba(242, 238, 226, 0.82);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-decoration: none;
	text-transform: uppercase;
}

.site-nav a:hover {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.doc-main {
	max-width: 1000px;
	margin: 0 auto;
	padding: 92px 20px 56px;
}

.doc-window {
	position: relative;
	top: auto;
	left: auto;
	translate: none;
	width: 100%;
	max-height: none;
	margin: 0 auto;
}

.doc-window .window__body {
	overflow: visible;
}

.doc-body {
	padding: clamp(22px, 4vw, 44px);
}

.doc-back {
	display: inline-block;
	margin-bottom: 18px;
	color: var(--teal);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-decoration: none;
	text-transform: uppercase;
}

.doc-back:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.doc-head {
	margin-bottom: 26px;
	padding-bottom: 18px;
	border-bottom: 1px dashed var(--line);
}

.doc-head--page {
	margin-bottom: 22px;
}

.doc-title {
	margin: 0 0 7px;
	color: #24211c;
	font-family: var(--px);
	font-size: clamp(22px, 3.6vw, 34px);
	font-weight: 700;
	line-height: 1.28;
	overflow-wrap: break-word;
}

.doc-sub {
	margin: 0;
	color: var(--muted);
	font-family: var(--serif);
	font-size: 14.5px;
	font-style: italic;
	line-height: 1.55;
}

.doc-search {
	max-width: 640px;
	margin-top: 18px;
}

.doc-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px;
	color: #8b8374;
	font-family: var(--mono);
	font-size: 9px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.search-form {
	display: flex;
	gap: 7px;
	align-items: stretch;
}

.search-form__label {
	flex: 1 1 auto;
	min-width: 0;
}

.search-form__field {
	width: 100%;
	height: 38px;
	padding: 0 10px;
	border: 1px solid #7c766a;
	border-radius: 1px;
	background: #fffdf6;
	box-shadow: var(--bevel-in);
	color: var(--ink);
	font-size: 12.5px;
}

.search-form__field::placeholder {
	color: #9a9284;
	font-family: var(--serif);
	font-style: italic;
}

.search-form .btn {
	min-height: 38px;
}

/* Posts */

.post-list {
	display: flex;
	flex-direction: column;
}

.post-card {
	padding: 19px 0 21px;
	border-bottom: 1px dashed var(--line);
}

.post-card:first-child {
	padding-top: 0;
}

.post-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 5px;
	color: #8b8374;
	font-family: var(--mono);
	font-size: 8.5px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.post-card__title {
	margin: 0 0 6px;
	font-family: var(--px);
	font-size: 14px;
	line-height: 1.45;
}

.post-card__title a {
	color: #24211c;
	text-decoration: none;
}

.post-card__title a:hover {
	color: var(--teal-deep);
	text-decoration: underline;
	text-underline-offset: 4px;
}

.post-card__excerpt {
	max-width: 68ch;
	color: #4a443b;
	font-family: var(--serif);
	font-size: 14.5px;
	line-height: 1.65;
}

.post-card__excerpt p {
	margin: 0;
}

.post-card__more {
	display: inline-block;
	margin-top: 5px;
	color: var(--teal);
	font-size: 9.5px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-decoration: none;
	text-transform: uppercase;
}

.post-card__more:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.search-count {
	margin: 0 0 14px;
	color: #8b8374;
	font-family: var(--serif);
	font-size: 11.5px;
	font-style: italic;
}

.pagination {
	margin-top: 24px;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px;
	justify-content: center;
}

.pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 31px;
	height: 31px;
	padding: 0 8px;
	border: 1px solid #8d8679;
	border-radius: 1px;
	background: linear-gradient(180deg, #f6f2e8, #d8d2c5);
	box-shadow: var(--bevel);
	color: #3f3a32;
	font-size: 10.5px;
	text-decoration: none;
}

.pagination .page-numbers.current {
	background: linear-gradient(180deg, #2f857e, #1e625d);
	color: #fffdf6;
}

.pagination .page-numbers.dots {
	border-color: transparent;
	background: none;
	box-shadow: none;
}

.doc-empty {
	padding: 48px 18px 40px;
	text-align: center;
}

.doc-empty__line {
	margin: 0 0 6px;
	color: #5f594e;
	font-family: var(--serif);
	font-size: 19px;
	font-style: italic;
}

.doc-empty__fine {
	margin: 0 0 18px;
	color: #8b8375;
	font-size: 11px;
}

/* Reading */

.prose {
	max-width: 70ch;
	color: #312d26;
	font-family: var(--serif);
	font-size: 18px;
	line-height: 1.78;
}

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

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose figure,
.prose pre {
	margin: 0 0 1.2em;
}

.prose h2 {
	margin: 1.7em 0 0.55em;
	color: #24211c;
	font-family: var(--px);
	font-size: 16px;
	line-height: 1.45;
}

.prose h3 {
	margin: 1.6em 0 0.5em;
	color: #2b2721;
	font-family: var(--sans);
	font-size: 20px;
	font-weight: 600;
}

.prose h4 {
	margin: 1.5em 0 0.5em;
	font-family: var(--sans);
	font-size: 16px;
	font-weight: 600;
}

.prose a {
	color: var(--teal-deep);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.prose a:hover {
	background: rgba(33, 111, 105, 0.1);
}

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

.prose li {
	margin-bottom: 0.4em;
}

.prose blockquote {
	padding: 4px 0 4px 18px;
	border-left: 3px solid var(--gold);
	color: #4a4133;
	font-style: italic;
}

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

.prose code {
	padding: 1px 4px;
	background: #e7e1d4;
	font-family: var(--mono);
	font-size: 0.82em;
}

.prose pre {
	padding: 14px;
	overflow-x: auto;
	border: 1px solid #c3bbab;
	background: #ece7db;
	font-family: var(--mono);
	font-size: 12px;
	line-height: 1.55;
}

.prose img {
	border: 1px solid #b8b0a0;
}

.prose figcaption,
.wp-caption-text {
	margin-top: 6px;
	color: #8b8375;
	font-family: var(--sans);
	font-size: 10.5px;
	font-style: italic;
}

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

.doc-thumb {
	margin: 0 0 20px;
	padding: 5px;
	border: 1px solid #b8b0a0;
	background: #fbf7ed;
}

.doc-thumb img {
	display: block;
	width: 100%;
}

.doc-tags {
	margin: 22px 0 0;
	color: #8b8375;
	font-family: var(--mono);
	font-size: 8.5px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.doc-tags a {
	color: var(--teal);
	text-decoration: none;
}

.post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin-top: 26px;
	padding: 14px 0;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}

.post-nav a {
	color: var(--teal-deep);
	font-family: var(--serif);
	font-size: 12.5px;
	font-style: italic;
	line-height: 1.5;
	text-decoration: none;
}

.post-nav a:hover {
	text-decoration: underline;
}

.post-nav__next {
	text-align: right;
}

.page-links {
	margin-top: 18px;
	font-size: 11px;
}

/* Comments */

.comments {
	margin-top: 34px;
	padding-top: 20px;
	border-top: 1px dashed var(--line);
}

.comments__title,
.comments__form-title {
	margin: 0 0 4px;
	color: #24211c;
	font-family: var(--px);
	font-size: 13px;
	line-height: 1.4;
}

.comments__sub,
.comments__note {
	margin: 0 0 14px;
	color: #8b8375;
	font-family: var(--serif);
	font-size: 11px;
	font-style: italic;
}

.comment-list {
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}

.comment-list .children {
	margin: 10px 0 0 18px;
	padding: 0;
	list-style: none;
}

.comment-body {
	margin-bottom: 10px;
	padding: 11px 13px;
	border: 1px solid #d0c8b8;
	border-left: 3px solid var(--gold);
	background: #fbf7ed;
}

.comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 6px;
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 6px;
	color: #2c2822;
	font-family: var(--px);
	font-size: 8.5px;
}

.comment-author .avatar {
	border: 1px solid #b8b0a0;
}

.comment-metadata {
	font-family: var(--mono);
	font-size: 8px;
	text-transform: uppercase;
}

.comment-metadata a {
	color: #8b8375;
	text-decoration: none;
}

.comment-content {
	color: #3a352d;
	font-family: var(--serif);
	font-size: 13.5px;
	line-height: 1.65;
}

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

.reply {
	margin-top: 4px;
	font-size: 9px;
}

.comment-respond {
	padding: 14px 15px;
	border: 1px solid #c3bbab;
	background: #f4efe3;
}

.comment-form p {
	margin: 0 0 10px;
}

.comment-form label {
	display: block;
	margin-bottom: 3px;
	color: #5a544a;
	font-size: 9.5px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 8px 9px;
	border: 1px solid #7c766a;
	border-radius: 1px;
	background: #fffdf6;
	box-shadow: var(--bevel-in);
	font-size: 12.5px;
}

.comment-form textarea {
	font-family: var(--serif);
	font-size: 14px;
	line-height: 1.55;
}

.comment-form .submit {
	margin-top: 2px;
}

.comment-form .comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 7px;
}

.comment-form .comment-form-cookies-consent label {
	margin: 0;
	font-size: 9px;
	letter-spacing: 0;
	text-transform: none;
}

.comment-notes,
.logged-in-as,
.comment-awaiting-moderation {
	color: #8b8375;
	font-size: 10px;
	font-style: italic;
}

/* 404 */

.err-window .window__body {
	position: relative;
	overflow: hidden;
}

.err-code {
	position: absolute;
	top: 2px;
	right: 14px;
	margin: 0;
	color: rgba(169, 79, 47, 0.1);
	font-family: var(--px);
	font-size: clamp(72px, 14vw, 150px);
	line-height: 1;
	pointer-events: none;
	user-select: none;
}

.err-title {
	position: relative;
	max-width: 18ch;
	margin: 0 0 12px;
	color: #24211c;
	font-family: var(--px);
	font-size: clamp(21px, 3.6vw, 34px);
	line-height: 1.35;
}

.err-lede {
	position: relative;
	max-width: 60ch;
	color: #4a443b;
	font-family: var(--serif);
	font-size: 16px;
	line-height: 1.7;
}

.err-actions {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin: 20px 0;
}

.err-search {
	position: relative;
	max-width: 580px;
	padding: 14px 15px;
	border: 1px solid #c3bbab;
	background: #f4efe3;
}

.err-search__label {
	margin: 0 0 7px;
	color: #6a6358;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.err-fine {
	position: relative;
	margin: 18px 0 0;
	color: #8b8375;
	font-family: var(--serif);
	font-size: 11px;
	font-style: italic;
}

/* Footer */

.site-foot {
	padding: 0 20px 42px;
	color: #e9e4d5;
}

.site-foot__inner {
	max-width: 1000px;
	margin: 0 auto;
	padding-top: 16px;
	border-top: 1px solid rgba(217, 239, 233, 0.18);
}

.site-foot__line {
	margin: 0 0 4px;
	color: rgba(233, 228, 213, 0.72);
	font-family: var(--serif);
	font-size: 12.5px;
	font-style: italic;
}

.site-foot__meta {
	margin: 0;
	color: rgba(233, 228, 213, 0.48);
	font-size: 9.5px;
	letter-spacing: 0.03em;
}

.site-foot__meta a {
	color: rgba(233, 228, 213, 0.7);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
	.window {
		width: min(680px, calc(100vw - 150px));
	}

	.window--wide {
		width: min(920px, calc(100vw - 130px));
	}
}

@media (max-width: 900px) {
	body.xennial-desktop-page {
		overflow: hidden;
	}

	.desktop {
		padding: 0;
	}

	.desk-stamp {
		display: none;
	}

	.desktop-icons {
		position: absolute;
		top: 12px;
		left: 8px;
		right: 8px;
		grid-auto-flow: row;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		grid-template-rows: none;
		gap: 1px;
		z-index: 2;
	}

	.desk-icon {
		width: auto;
		padding: 6px 3px;
	}

	.desk-icon__img {
		width: 38px;
		height: 38px;
	}

	.desk-icon__label {
		font-size: 10px;
	}

	.window,
	.window.is-positioned {
		position: fixed;
		top: 8px !important;
		right: 8px !important;
		bottom: 58px !important;
		left: 8px !important;
		width: auto !important;
		max-height: none;
		translate: none;
		border-radius: 3px;
	}

	.window__body {
		overflow: auto;
	}

	.window__menu-note {
		display: none;
	}

	.taskbar {
		height: 50px;
	}

	.tray__status-text {
		display: none;
	}

	.tray__status {
		padding: 0 4px;
	}

	.tray__clock {
		padding: 0 7px;
		font-size: 10px;
	}

	.task-btn {
		max-width: 150px;
		min-width: 64px;
		padding: 0 7px;
	}

	.toasts {
		left: 8px;
		right: 8px;
		bottom: 60px;
		width: auto;
	}

	.cookie {
		left: 8px;
		right: 8px;
		bottom: 60px;
		width: auto;
	}

	.start-menu {
		left: 7px;
		right: 7px;
		width: auto;
		max-height: calc(100svh - 72px);
		overflow: auto;
	}

	.start-menu__grid {
		grid-template-columns: 1fr;
	}

	.start-menu__col--util {
		border-top: 1px solid #c2bbad;
		border-left: 0;
		padding-top: 6px;
		padding-left: 0;
	}

	.promise-grid,
	.oldnet-links,
	.about-cols,
	.split,
	.split--recycle {
		grid-template-columns: 1fr;
	}

	.promise-cols {
		grid-template-columns: 1fr;
	}

	.promise-col--promised {
		border-right: 0;
		border-bottom: 1px solid #c3bbab;
	}

	.fragment-list,
	.recycle-list {
		max-height: 230px;
	}

	.fragment-panel,
	.recycle-panel {
		min-height: 300px;
		max-height: none;
	}

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

	.oldnet-panel {
		padding: 20px;
	}

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

	.oldnet-tabs {
		padding-left: 6px;
		padding-right: 6px;
	}

	.mood-tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		padding-bottom: 2px;
	}

	.mood-tab {
		flex: 0 0 auto;
	}

	.site-bar__inner {
		gap: 10px;
		padding: 0 14px;
	}

	.site-bar__tag {
		display: none;
	}

	.site-nav {
		gap: 12px;
	}

	.doc-main {
		padding: 80px 10px 42px;
	}

	.doc-body {
		padding: 20px 18px 24px;
	}

	.site-foot {
		padding: 0 14px 32px;
	}
}

@media (max-width: 640px) {
	.window__title {
		font-size: 9px;
	}

	.window__bar {
		height: 34px;
	}

	.window__body {
		padding: 16px 15px 18px;
	}

	.window__status {
		font-size: 9px;
	}

	.welcome__title {
		font-size: 34px;
	}

	.welcome__tag {
		font-size: 19px;
	}

	.welcome__buttons {
		flex-direction: column;
	}

	.welcome__buttons .btn {
		width: 100%;
	}

	.app-head__title {
		font-size: 14px;
	}

	.app-head--row {
		flex-direction: column;
	}

	.aim__msg {
		font-size: 18px;
		min-height: 104px;
	}

	.aim__time {
		display: none;
	}

	.detail-title {
		font-size: 16px;
	}

	.promise-cols {
		margin-bottom: 14px;
	}

	.split {
		gap: 10px;
	}

	.oldnet-links {
		margin: 14px 0;
	}

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

	.smiley {
		height: 44px;
		font-size: 14px;
	}

	.construction-sign {
		font-size: 9px;
		gap: 8px;
	}

	.post-nav {
		grid-template-columns: 1fr;
	}

	.post-nav__next {
		text-align: left;
	}

	.site-brand {
		font-size: 14px;
	}

	.site-nav {
		gap: 9px;
	}

	.site-nav a {
		font-size: 8.5px;
	}

	.doc-title {
		font-size: 20px;
	}

	.prose {
		font-size: 16.5px;
	}

	.search-form {
		flex-direction: column;
	}

	.err-code {
		top: 8px;
		right: 8px;
		font-size: 78px;
	}
}

@media (max-width: 430px) {
	.desktop-icons {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.start-btn {
		padding: 0 9px;
	}

	.start-btn__text {
		display: none;
	}

	.tray__clock {
		max-width: 90px;
		overflow: hidden;
		font-size: 8.5px;
		text-overflow: ellipsis;
	}

	.window__status > span:last-child {
		display: none;
	}

	.window__menu > span:nth-child(n + 4) {
		display: none;
	}

	.doc-meta {
		font-size: 8px;
	}
}

/* --------------------------------------------------------------------------
   Reduced motion & no JavaScript
   -------------------------------------------------------------------------- */

.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after {
	animation-duration: 0.001ms !important;
	animation-iteration-count: 1 !important;
	transition-duration: 0.001ms !important;
	scroll-behavior: auto !important;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

.no-js .desktop {
	height: auto;
	min-height: 100vh;
	overflow: visible;
	padding: 18px 16px 40px;
}

.no-js .desk-stamp {
	position: static;
	align-items: flex-start;
	margin: 0 0 16px;
	color: #e9e4d5;
}

.no-js .desktop-icons {
	position: static;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 18px;
}

.no-js .window-layer {
	position: static;
	pointer-events: auto;
}

.no-js .window,
.no-js .window.is-positioned {
	position: static;
	translate: none;
	width: 100% !important;
	max-height: none;
	margin: 0 auto 18px;
	display: flex !important;
}

.no-js .window[hidden] {
	display: flex !important;
}

.no-js .window__body {
	overflow: visible;
}

.no-js .window__bar {
	cursor: default;
}

.no-js .taskbar,
.no-js .start-menu,
.no-js .toasts,
.no-js .cookie,
.no-js .boot,
.no-js .restore-layer,
.no-js .screensaver,
.no-js .modal-root,
.no-js .logoff {
	display: none !important;
}

.no-js .noscript {
	position: static;
	margin: 0 0 16px;
}

@media print {
	.taskbar,
	.start-menu,
	.toasts,
	.cookie,
	.boot,
	.logoff,
	.screensaver,
	.site-bar,
	.site-foot,
	.doc-back,
	.doc-search,
	.err-search,
	.comments {
		display: none !important;
	}

	body.xennial-doc-page {
		background: #fff;
		color: #000;
	}

	.doc-main {
		padding: 0;
		max-width: none;
	}

	.doc-window {
		border: 0;
		box-shadow: none;
	}

	.doc-window .window__bar,
	.doc-window .window__menu,
	.doc-window .window__status {
		display: none;
	}

	.doc-window .window__body {
		background: #fff;
		padding: 0;
	}

	.prose {
		max-width: none;
		font-size: 11pt;
	}
}
