/*!
 * Theme Wing — components: cards, sidebar, table of contents, pagination,
 * modals and empty states.
 */

/* -------------------------------------------------------------------------
 * Feed / archive headings
 * ---------------------------------------------------------------------- */

.tw-feed-head,
.tw-archive-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
	margin-bottom: 30px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--tw-border);
}

.tw-feed-head__title,
.tw-archive-head__title {
	margin: 0 0 8px;
	font-size: clamp(1.8rem, 2.6vw, 2.35rem);
	font-weight: 800;
	letter-spacing: -0.03em;
}

.tw-feed-head__desc,
.tw-archive-head__desc {
	margin: 0;
	max-width: 620px;
	color: var(--tw-text-2);
	font-size: 0.94rem;
}

.tw-feed-head__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tw-archive-head__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 14px 0 0;
	color: var(--tw-muted);
	font-size: 0.82rem;
}

.tw-archive-head__meta a {
	color: var(--tw-primary);
	font-weight: 600;
}

.tw-archive-head__search {
	margin-top: 20px;
	width: min(520px, 100%);
}

/* -------------------------------------------------------------------------
 * Posts
 * ---------------------------------------------------------------------- */

.tw-posts {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.tw-posts--grid,
.tw-posts--mixed {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
}

.tw-posts--mixed .tw-post-card--feature {
	grid-column: 1 / -1;
}

.tw-post-card {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	background: var(--tw-surface);
	border: 1px solid var(--tw-border);
	border-radius: var(--tw-radius);
	overflow: hidden;
	box-shadow: var(--tw-shadow-sm);
	transition: transform var(--tw-normal), box-shadow var(--tw-normal), border-color var(--tw-normal);
	min-width: 0;
}

.tw-post-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--tw-shadow);
	border-color: rgba(var(--tw-primary-rgb) / 0.28);
}

.tw-post-card__media {
	position: relative;
	display: block;
	overflow: hidden;
	background: linear-gradient(135deg, rgba(var(--tw-primary-rgb) / 0.14), rgba(var(--tw-accent-rgb) / 0.14));
}

.tw-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: linear-gradient(135deg, rgba(var(--tw-primary-rgb) / 0.12), rgba(var(--tw-accent-rgb) / 0.14));
}

.tw-thumb__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.7s var(--tw-ease);
}

.tw-post-card:hover .tw-thumb__img {
	transform: scale(1.04);
}

.tw-thumb__empty {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 20px;
	background: rgba(255, 255, 255, 0.5);
	color: rgba(var(--tw-primary-rgb) / 0.75);
}

[data-theme="dark"] .tw-thumb__empty {
	background: rgba(255, 255, 255, 0.06);
}

.tw-thumb__empty-icon {
	width: 28px;
	height: 28px;
}

.tw-post-card__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 55%, rgba(9, 14, 26, 0.24));
	opacity: 0;
	transition: opacity var(--tw-normal);
}

.tw-post-card:hover .tw-post-card__shade {
	opacity: 1;
}

.tw-post-card__pin {
	position: absolute;
	top: 12px;
	left: 12px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 10px;
	border-radius: var(--tw-radius-full);
	background: rgba(9, 14, 26, 0.55);
	backdrop-filter: blur(8px);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 650;
}

.tw-post-card__pin .tw-icon {
	width: 13px;
	height: 13px;
}

.tw-post-card__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 22px;
}

.tw-post-card__top {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
}

.tw-post-card__chip {
	color: var(--tw-primary);
	font-size: 0.7rem;
	font-weight: 750;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.tw-post-card__read {
	margin-left: auto;
	color: var(--tw-muted);
	font-size: 0.72rem;
}

.tw-post-card__title {
	margin: 0 0 10px;
	font-size: clamp(1.15rem, 1.6vw, 1.4rem);
	font-weight: 750;
	line-height: 1.35;
	letter-spacing: -0.02em;
}

.tw-post-card__title a {
	color: var(--tw-text);
}

.tw-post-card__title a:hover {
	color: var(--tw-primary);
}

.tw-post-card__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0 0 18px;
	color: var(--tw-text-2);
	font-size: 0.9rem;
	line-height: 1.75;
}

.tw-post-card__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: auto;
	color: var(--tw-muted);
	font-size: 0.75rem;
}

.tw-post-card__author {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: var(--tw-text-2);
	font-weight: 600;
}

.tw-post-card__avatar {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	object-fit: cover;
}

.tw-post-card__comments {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-left: auto;
}

.tw-post-card__icon {
	width: 15px;
	height: 15px;
}

/* list variant */

.tw-post-card--list {
	grid-template-columns: minmax(0, 1fr) 236px;
	grid-template-areas: "body media";
	padding: 20px;
	gap: 22px;
}

.tw-post-card--list .tw-post-card__media {
	grid-area: media;
	border-radius: 14px;
	align-self: stretch;
	min-height: 150px;
}

.tw-post-card--list .tw-thumb {
	aspect-ratio: auto;
	height: 100%;
	min-height: 150px;
}

.tw-post-card--list .tw-post-card__body {
	grid-area: body;
	padding: 4px 0;
	justify-content: center;
}

.tw-post-card--list .tw-post-card__title {
	font-size: 1.35rem;
}

.tw-post-card--list .tw-post-card__excerpt {
	-webkit-line-clamp: 2;
	margin-bottom: 14px;
}

/* feature variant */

.tw-post-card--feature {
	grid-template-columns: 1.05fr 0.95fr;
	grid-template-areas: "media body";
	min-height: 340px;
}

.tw-post-card--feature .tw-post-card__media {
	grid-area: media;
	height: 100%;
}

.tw-post-card--feature .tw-thumb {
	aspect-ratio: auto;
	height: 100%;
	min-height: 300px;
}

.tw-post-card--feature .tw-post-card__body {
	grid-area: body;
	padding: 36px;
	justify-content: center;
}

.tw-post-card--feature .tw-post-card__title {
	font-size: clamp(1.6rem, 2.4vw, 2.1rem);
	line-height: 1.24;
}

.tw-post-card--feature .tw-post-card__excerpt {
	-webkit-line-clamp: 4;
	font-size: 0.95rem;
	margin-bottom: 22px;
}

/* grid variant */

.tw-post-card--grid .tw-post-card__title {
	font-size: 1.12rem;
}

.tw-post-card--grid .tw-post-card__excerpt {
	-webkit-line-clamp: 2;
	margin-bottom: 14px;
}

/* -------------------------------------------------------------------------
 * Sidebar widgets
 * ---------------------------------------------------------------------- */

.tw-widget {
	padding: 22px;
	background: var(--tw-surface);
	border: 1px solid var(--tw-border);
	border-radius: var(--tw-radius);
	box-shadow: var(--tw-shadow-sm);
}

.tw-widget__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.tw-widget__title {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 750;
	letter-spacing: -0.01em;
}

.tw-widget__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 10px;
	background: var(--tw-tint);
	color: var(--tw-primary);
}

.tw-widget__icon .tw-icon {
	width: 17px;
	height: 17px;
}

.tw-widget__content {
	color: var(--tw-text-2);
	font-size: 0.9rem;
}

.tw-widget--classic ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tw-widget--classic li {
	padding: 6px 0;
	border-bottom: 1px dashed var(--tw-border);
	font-size: 0.88rem;
}

.tw-widget--classic li:last-child {
	border-bottom: 0;
}

/* mini list */

.tw-mini-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.tw-mini-list__link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 9px 8px;
	border-radius: 12px;
	color: var(--tw-text);
	transition: background var(--tw-fast);
}

.tw-mini-list__link:hover {
	background: var(--tw-surface-2);
}

.tw-mini-list__index {
	flex: none;
	color: rgba(var(--tw-primary-rgb) / 0.55);
	font-family: var(--tw-font-mono);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	width: 20px;
}

.tw-mini-list__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1;
}

.tw-mini-list__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 0.86rem;
	font-weight: 600;
	line-height: 1.45;
}

.tw-mini-list__meta {
	margin-top: 3px;
	color: var(--tw-muted);
	font-size: 0.7rem;
}

.tw-mini-list__thumb {
	width: 46px;
	height: 46px;
	border-radius: 10px;
	object-fit: cover;
}

/* comment mini */

.tw-comment-mini {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.tw-comment-mini__item {
	display: flex;
	gap: 10px;
}

.tw-comment-mini__avatar {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	object-fit: cover;
	flex: none;
}

.tw-comment-mini__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.tw-comment-mini__author {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--tw-text);
	font-size: 0.78rem;
	font-weight: 650;
}

.tw-comment-mini__likes {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	color: var(--tw-danger);
	font-size: 0.68rem;
}

.tw-comment-mini__likes .tw-icon {
	width: 12px;
	height: 12px;
}

.tw-comment-mini__text {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin-top: 2px;
	color: var(--tw-text-2);
	font-size: 0.82rem;
	line-height: 1.6;
}

.tw-comment-mini__text:hover {
	color: var(--tw-primary);
}

.tw-comment-mini__post {
	margin-top: 4px;
	color: var(--tw-muted);
	font-size: 0.68rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* tag cloud */

.tw-tag-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tw-tag-cloud a {
	display: inline-flex;
	align-items: center;
	padding: 6px 11px;
	border: 1px solid var(--tw-border);
	border-radius: var(--tw-radius-full);
	background: var(--tw-surface-2);
	color: var(--tw-text-2);
	font-size: 0.76rem !important;
	font-weight: 550;
	transition: all var(--tw-fast);
}

.tw-tag-cloud a:hover {
	color: var(--tw-primary);
	border-color: rgba(var(--tw-primary-rgb) / 0.4);
	background: var(--tw-tint);
	transform: translateY(-1px);
}

.tw-tag-cloud .tag-link-count {
	color: var(--tw-muted);
}

.tw-link-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tw-link-list li {
	border-bottom: 1px dashed var(--tw-border);
}

.tw-link-list li:last-child {
	border-bottom: 0;
}

.tw-link-list a {
	display: flex;
	padding: 8px 4px;
	color: var(--tw-text-2);
	font-size: 0.85rem;
}

.tw-link-list a:hover {
	color: var(--tw-primary);
}

/* notice */

.tw-notice {
	position: relative;
	border-color: rgba(var(--tw-primary-rgb) / 0.25);
	background: linear-gradient(180deg, var(--tw-tint), var(--tw-surface));
}

.tw-notice__body {
	padding-right: 18px;
	color: var(--tw-text-2);
	font-size: 0.86rem;
}

.tw-notice__dismiss {
	position: absolute;
	top: 14px;
	right: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--tw-muted);
}

.tw-notice__dismiss:hover {
	background: var(--tw-surface);
	color: var(--tw-text);
}

.tw-notice__dismiss .tw-icon {
	width: 14px;
	height: 14px;
}

/* author card */

.tw-author-card {
	padding: 0;
	overflow: hidden;
}

.tw-author-card__cover {
	position: relative;
	height: 118px;
	background:
		radial-gradient(120% 120% at 10% 0%, rgba(var(--tw-primary-rgb) / 0.85), transparent 60%),
		radial-gradient(100% 120% at 90% 10%, rgba(124, 92, 255, 0.75), transparent 60%),
		linear-gradient(150deg, #101a33, #0a1020);
	background-size: cover;
	background-position: center;
}

.tw-author-card__cover.has-image .tw-author-card__glow {
	background: linear-gradient(180deg, rgba(9, 14, 26, 0.1), rgba(9, 14, 26, 0.55));
	opacity: 1;
}

.tw-author-card__glow {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
	background-size: 34px 34px;
	opacity: 0.5;
}

.tw-author-card__body {
	position: relative;
	padding: 0 22px 22px;
	text-align: center;
}

.tw-author-card__avatar-link {
	display: inline-flex;
	margin-top: -54px;
	border-radius: 50%;
}

.tw-author-card__avatar {
	width: 108px;
	height: 108px;
	border-radius: 50%;
	object-fit: cover;
	border: 5px solid var(--tw-surface);
	background: var(--tw-surface);
	box-shadow: 0 12px 30px -14px rgba(15, 23, 42, 0.45);
}

.tw-author-card__name {
	margin: 14px 0 2px;
	font-size: 1.2rem;
	font-weight: 800;
}

.tw-author-card__name a {
	color: var(--tw-text);
}

.tw-author-card__handle {
	margin: 0 0 12px;
	color: var(--tw-muted);
	font-size: 0.74rem;
}

.tw-author-card__signature {
	margin: 0 0 10px;
	color: var(--tw-primary);
	font-size: 0.78rem;
	font-weight: 600;
}

.tw-author-card__bio {
	margin: 0 0 16px;
	color: var(--tw-text-2);
	font-size: 0.83rem;
	line-height: 1.7;
}

.tw-author-card__stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	border: 1px solid var(--tw-border);
	border-radius: 14px;
	background: var(--tw-surface-2);
	overflow: hidden;
}

.tw-author-card__stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 10px 4px;
	color: var(--tw-text);
	border-right: 1px solid var(--tw-border);
}

.tw-author-card__stat:last-child {
	border-right: 0;
}

.tw-author-card__stat strong {
	font-size: 0.98rem;
	font-weight: 800;
}

.tw-author-card__stat span {
	color: var(--tw-muted);
	font-size: 0.64rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.tw-author-card__social {
	justify-content: center;
	margin: 16px 0;
}

.tw-author-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

/* -------------------------------------------------------------------------
 * Table of contents
 * ---------------------------------------------------------------------- */

.tw-toc {
	background: var(--tw-surface);
	border: 1px solid var(--tw-border);
	border-radius: var(--tw-radius);
	box-shadow: var(--tw-shadow-sm);
	padding: 16px 18px;
	font-size: 0.85rem;
}

.tw-toc--inline {
	margin-bottom: 30px;
	background: var(--tw-surface-2);
	box-shadow: none;
}

.tw-toc--rail .tw-toc__body {
	max-height: calc(100vh - var(--tw-header-h) - 170px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding-right: 4px;
	scrollbar-width: thin;
	scrollbar-color: var(--tw-border-strong) transparent;
}

.tw-toc--rail .tw-toc__body::-webkit-scrollbar {
	width: 5px;
}

.tw-toc--rail .tw-toc__body::-webkit-scrollbar-thumb {
	border-radius: 999px;
	background: var(--tw-border-strong);
}

.tw-toc--rail .tw-toc__progress {
	position: sticky;
	bottom: 0;
	background: var(--tw-surface);
}

.tw-toc__toggle {
	display: none;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 2px 0;
	border: 0;
	background: transparent;
	color: var(--tw-text);
	font-size: 0.82rem;
	font-weight: 700;
}

.tw-toc__toggle-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.tw-toc__toggle-label .tw-icon {
	width: 16px;
	height: 16px;
	color: var(--tw-primary);
}

.tw-toc__count {
	margin-left: auto;
	padding: 1px 8px;
	border-radius: var(--tw-radius-full);
	background: var(--tw-tint);
	color: var(--tw-primary);
	font-size: 0.68rem;
}

.tw-toc__chevron {
	width: 15px;
	height: 15px;
	transition: transform var(--tw-fast);
}

.tw-toc.is-collapsed .tw-toc__chevron {
	transform: rotate(-90deg);
}

.tw-toc__title {
	margin: 0 0 10px;
	color: var(--tw-muted);
	font-size: 0.66rem;
	font-weight: 750;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.tw-toc__list {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: tw-toc;
	position: relative;
}

.tw-toc__item {
	margin: 0;
}

.tw-toc__link {
	display: block;
	padding: 6px 10px;
	border-left: 2px solid transparent;
	border-radius: 0 8px 8px 0;
	color: var(--tw-text-2);
	font-size: 0.8rem;
	line-height: 1.5;
	transition: color var(--tw-fast), background var(--tw-fast), border-color var(--tw-fast);
}

.tw-toc__link:hover {
	color: var(--tw-primary);
	background: var(--tw-surface-2);
}

.tw-toc__link.is-active {
	color: var(--tw-primary);
	border-left-color: var(--tw-primary);
	background: var(--tw-tint);
	font-weight: 650;
}

.tw-toc__item--l3 .tw-toc__link {
	padding-left: 22px;
	font-size: 0.77rem;
}

.tw-toc__item--l4 .tw-toc__link {
	padding-left: 34px;
	font-size: 0.74rem;
}

.tw-toc--numbered .tw-toc__item--l2 .tw-toc__link::before {
	counter-increment: tw-toc;
	content: counter(tw-toc) ".";
	margin-right: 6px;
	color: var(--tw-muted);
	font-family: var(--tw-font-mono);
	font-size: 0.7rem;
}

.tw-toc__progress {
	display: block;
	height: 3px;
	margin-top: 12px;
	border-radius: 3px;
	background: var(--tw-surface-3);
	overflow: hidden;
}

.tw-toc__progress i {
	display: block;
	height: 100%;
	width: 100%;
	background: var(--tw-gradient);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.12s linear;
}

@media (max-width: 900px) {
	.tw-toc__toggle {
		display: flex;
	}

	.tw-toc__title {
		margin-top: 6px;
	}

	.tw-toc--rail .tw-toc__body {
		max-height: none;
		overflow: visible;
		padding-right: 0;
	}

	.tw-toc--rail .tw-toc__progress {
		position: static;
	}

	.tw-toc.is-collapsed .tw-toc__body {
		display: none;
	}

	.tw-toc--inline {
		position: static;
	}
}

/* -------------------------------------------------------------------------
 * Pagination
 * ---------------------------------------------------------------------- */

.tw-pagination-wrap {
	margin-top: 36px;
}

.tw-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tw-pagination li {
	margin: 0;
}

.tw-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 6px;
	border: 1px solid var(--tw-border);
	border-radius: 50%;
	background: var(--tw-surface);
	color: var(--tw-text-2);
	font-size: 0.82rem;
	font-weight: 650;
	transition: all var(--tw-fast);
}

.tw-pagination .page-numbers:hover {
	border-color: rgba(var(--tw-primary-rgb) / 0.4);
	color: var(--tw-primary);
	background: var(--tw-tint);
}

.tw-pagination .page-numbers.current {
	border-color: transparent;
	background: var(--tw-gradient);
	color: #fff;
	box-shadow: 0 10px 22px -12px rgba(var(--tw-primary-rgb) / 0.75);
}

.tw-pagination .page-numbers.dots {
	border-color: transparent;
	background: transparent;
	color: var(--tw-muted);
}

.tw-pagination .prev,
.tw-pagination .next {
	border-radius: var(--tw-radius-full);
	padding: 0 14px;
}

.tw-pagination__icon {
	width: 16px;
	height: 16px;
}

/* -------------------------------------------------------------------------
 * Comment pagination
 * ---------------------------------------------------------------------- */

.tw-comment-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 24px 0;
}

.tw-comment-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	border: 1px solid var(--tw-border);
	border-radius: 50%;
	font-size: 0.8rem;
	color: var(--tw-text-2);
}

.tw-comment-pagination .page-numbers.current {
	background: var(--tw-gradient);
	border-color: transparent;
	color: #fff;
}

/* -------------------------------------------------------------------------
 * Empty states & 404
 * ---------------------------------------------------------------------- */

.tw-empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 70px 24px;
	background: var(--tw-surface);
	border: 1px dashed var(--tw-border-strong);
	border-radius: var(--tw-radius);
}

.tw-empty-state__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 68px;
	height: 68px;
	margin-bottom: 20px;
	border-radius: 22px;
	background: var(--tw-tint);
	color: var(--tw-primary);
}

.tw-empty-state__mark .tw-icon {
	width: 30px;
	height: 30px;
}

.tw-empty-state__title {
	margin: 0 0 8px;
	font-size: 1.4rem;
}

.tw-empty-state__text {
	max-width: 480px;
	margin: 0 0 20px;
	color: var(--tw-text-2);
	font-size: 0.92rem;
}

.tw-empty-state__search {
	width: min(460px, 100%);
	margin-bottom: 20px;
}

.tw-404 {
	padding-block: 56px 80px;
}

.tw-404__card {
	position: relative;
	max-width: 860px;
	margin: 0 auto 56px;
	padding: 64px 40px;
	border: 1px solid var(--tw-border);
	border-radius: var(--tw-radius-lg);
	background:
		radial-gradient(600px 300px at 50% 0%, rgba(var(--tw-primary-rgb) / 0.14), transparent 65%),
		var(--tw-surface);
	box-shadow: var(--tw-shadow);
	text-align: center;
	overflow: hidden;
}

.tw-404__art {
	position: relative;
	height: 140px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 12px;
}

.tw-404__number {
	font-size: clamp(4.5rem, 14vw, 8rem);
	font-weight: 900;
	line-height: 1;
	letter-spacing: -0.06em;
	background: var(--tw-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	opacity: 0.92;
}

.tw-404__bubble {
	position: absolute;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: radial-gradient(circle at 30% 30%, rgba(var(--tw-primary-rgb) / 0.45), transparent 70%);
	top: 12%;
	left: 24%;
	animation: tw-float 9s ease-in-out infinite;
}

.tw-404__bubble--two {
	width: 56px;
	height: 56px;
	top: auto;
	bottom: 6%;
	left: auto;
	right: 22%;
	background: radial-gradient(circle at 40% 40%, rgba(var(--tw-accent-rgb) / 0.4), transparent 70%);
	animation-delay: -3s;
}

.tw-404__title {
	margin: 0 0 10px;
	font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.tw-404__text {
	max-width: 480px;
	margin: 0 auto 24px;
	color: var(--tw-text-2);
	font-size: 0.94rem;
}

.tw-404__search {
	width: min(480px, 100%);
	margin: 0 auto 22px;
}

.tw-404__actions {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px;
}

.tw-404__recent {
	max-width: 1000px;
	margin: 0 auto;
}

.tw-section-title {
	margin: 0 0 18px;
	font-size: 1.05rem;
	font-weight: 750;
	letter-spacing: -0.01em;
}

/* -------------------------------------------------------------------------
 * Modals (donation)
 * ---------------------------------------------------------------------- */

.tw-modal {
	position: fixed;
	inset: 0;
	z-index: 700;
	display: grid;
	place-items: center;
	padding: 24px;
}

.tw-modal[hidden] {
	display: none;
}

.tw-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(9, 14, 26, 0.55);
	backdrop-filter: blur(6px);
	animation: tw-fade 0.2s var(--tw-ease);
}

.tw-modal__panel {
	position: relative;
	width: min(440px, 100%);
	max-height: 88vh;
	overflow-y: auto;
	padding: 36px 32px 28px;
	background: var(--tw-surface);
	border: 1px solid var(--tw-border);
	border-radius: var(--tw-radius-lg);
	box-shadow: var(--tw-shadow-lg);
	animation: tw-pop 0.26s var(--tw-ease);
}

.tw-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
}

.tw-donate {
	text-align: center;
}

.tw-donate__title {
	margin: 0 0 8px;
	font-size: 1.5rem;
}

.tw-donate__note {
	margin: 0 0 20px;
	color: var(--tw-text-2);
	font-size: 0.88rem;
}

.tw-donate__tabs {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.tw-donate__tab {
	padding: 7px 14px;
	border: 1px solid var(--tw-border);
	border-radius: var(--tw-radius-full);
	background: var(--tw-surface);
	color: var(--tw-text-2);
	font-size: 0.78rem;
	font-weight: 600;
}

.tw-donate__tab.is-active {
	border-color: transparent;
	background: var(--tw-tint);
	color: var(--tw-primary);
}

.tw-donate__panels {
	position: relative;
	display: grid;
}

.tw-donate__panel {
	display: none;
	grid-area: 1 / 1;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin: 0;
}

.tw-donate__panel.is-active {
	display: flex;
}

.tw-donate__panel img {
	width: min(240px, 70vw);
	height: auto;
	border-radius: 16px;
	background: var(--tw-surface-2);
	padding: 10px;
	border: 1px solid var(--tw-border);
}

.tw-donate__panel figcaption {
	color: var(--tw-text-2);
	font-size: 0.82rem;
	font-weight: 600;
}

.tw-donate__link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 0.78rem;
}

.tw-donate__link .tw-icon {
	width: 13px;
	height: 13px;
}

.tw-donate__hint {
	margin: 18px 0 0;
	color: var(--tw-muted);
	font-size: 0.72rem;
}

/* -------------------------------------------------------------------------
 * Reveal animation
 * ---------------------------------------------------------------------- */

html.tw-js .tw-reveal {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.55s var(--tw-ease), transform 0.55s var(--tw-ease);
	will-change: opacity, transform;
}

html.tw-js .tw-reveal.is-inview {
	opacity: 1;
	transform: none;
	will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
	html.tw-js .tw-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* Mobile browsers can skip IntersectionObserver callbacks for cards that are
 * off-screen during hydration, leaving .tw-reveal at opacity: 0. Keep cards
 * visible on phones and only use the desktop reveal animation. */
@media (max-width: 900px) {
	html.tw-js .tw-reveal,
	html.tw-js .tw-reveal.is-inview {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
		will-change: auto;
	}
}

/* -------------------------------------------------------------------------
 * Responsive component adjustments
 * ---------------------------------------------------------------------- */

@media (max-width: 900px) {
	.tw-posts--grid,
	.tw-posts--mixed {
		grid-template-columns: minmax(0, 1fr);
	}

	.tw-post-card--list {
		grid-template-columns: minmax(0, 1fr) 180px;
		padding: 16px;
		gap: 16px;
	}

	.tw-post-card--list .tw-post-card__excerpt {
		display: none;
	}

	.tw-post-card--feature {
		grid-template-columns: 1fr;
		grid-template-areas:
			"media"
			"body";
	}

	.tw-post-card--feature .tw-post-card__body {
		padding: 24px;
	}

	.tw-post-card--feature .tw-thumb {
		min-height: 220px;
		aspect-ratio: 16 / 9;
	}
}

@media (max-width: 600px) {
	.tw-post-card--list {
		grid-template-columns: 1fr;
		grid-template-areas:
			"media"
			"body";
	}

	.tw-post-card--list .tw-post-card__media {
		min-height: 190px;
	}

	.tw-post-card--list .tw-thumb {
		aspect-ratio: 16 / 9;
		min-height: 0;
	}

	.tw-post-card--list .tw-post-card__body {
		padding: 4px;
	}

	.tw-feed-head,
	.tw-archive-head {
		align-items: flex-start;
		flex-direction: column;
		gap: 14px;
	}

	.tw-widget {
		padding: 18px;
	}

	.tw-modal__panel {
		padding: 32px 20px 22px;
	}
}

/* -------------------------------------------------------------------------
 * Lightbox
 * ---------------------------------------------------------------------- */

.tw-zoomable {
	cursor: zoom-in;
}

.tw-lightbox {
	position: fixed;
	inset: 0;
	z-index: 800;
	display: grid;
	place-items: center;
	padding: 28px;
}

.tw-lightbox[hidden] {
	display: none;
}

.tw-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(6, 10, 20, 0.86);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	animation: tw-fade 0.2s var(--tw-ease);
}

.tw-lightbox__figure {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	max-width: 94vw;
	max-height: 90vh;
	margin: 0;
	animation: tw-pop 0.24s var(--tw-ease);
}

.tw-lightbox__figure img {
	max-width: 94vw;
	max-height: 82vh;
	width: auto;
	height: auto;
	border-radius: 14px;
	box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8);
	background: #0b1220;
}

.tw-lightbox__figure figcaption {
	color: rgba(255, 255, 255, 0.68);
	font-size: 0.78rem;
	text-align: center;
	max-width: 760px;
}

.tw-lightbox__close {
	position: absolute;
	top: 22px;
	right: 22px;
	z-index: 2;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.tw-lightbox__close:hover {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
}

@media (max-width: 600px) {
	.tw-lightbox {
		padding: 14px;
	}

	.tw-lightbox__figure img {
		max-height: 76vh;
	}
}

