:root {
	--bg: #fafafa;
	--surface: #ffffff;
	--surface-soft: #f1f5f9;
	--text: #1f2937;
	--muted: #64748b;
	--muted-2: #94a3b8;
	--line: #e2e8f0;
	--line-strong: #cbd5e1;
	--rose: #fb7185;
	--violet: #8b5cf6;
	--blue: #38bdf8;
	--shadow: 0 8px 24px rgba(15, 23, 42, 0.075);
	--shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.06);
	--radius: 8px;
	--header-height: 60px;
	color-scheme: light;
}

html.dark {
	--bg: #090d14;
	--surface: #101620;
	--surface-soft: #151c27;
	--text: #e5edf8;
	--muted: #9aa7bb;
	--muted-2: #718096;
	--line: #223044;
	--line-strong: #334155;
	--shadow: 0 20px 46px rgba(0, 0, 0, 0.32);
	--shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.28);
	color-scheme: dark;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: 84px;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	font-size: 16px;
	line-height: 1.7;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body.modal-open {
	overflow: hidden;
}

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

img {
	display: block;
	max-width: 100%;
	height: auto;
}

button,
input,
textarea {
	font: inherit;
}

.ui-icon {
	width: 1em;
	height: 1em;
	flex: 0 0 auto;
}

.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	background: color-mix(in srgb, var(--surface) 92%, transparent);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid transparent;
	transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.admin-bar .site-header {
	top: 32px;
}

.site-header.is-scrolled {
	border-bottom-color: var(--line);
	box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.site-header__inner {
	width: min(1240px, calc(100% - 48px));
	height: var(--header-height);
	margin: 0 auto;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.site-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	font-size: 16px;
	font-weight: 650;
	color: var(--text);
	white-space: nowrap;
}

.site-brand__logo {
	width: 28px;
	height: 28px;
	border-radius: 4px;
	object-fit: cover;
	flex: 0 0 auto;
}

.custom-logo-wrap img {
	width: 28px;
	height: 28px;
	border-radius: 4px;
	object-fit: cover;
}

.site-brand__name {
	overflow: hidden;
	text-overflow: ellipsis;
}

.site-nav {
	margin-left: auto;
}

.site-nav__menu,
.site-nav .menu {
	display: flex;
	align-items: center;
	gap: 17px;
	margin: 0;
	padding: 0;
	list-style: none;
	color: color-mix(in srgb, var(--text) 72%, transparent);
}

.site-nav__menu a,
.site-nav .menu a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 2px;
	font-size: 14px;
	font-weight: 500;
	transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.site-nav__menu a:hover,
.site-nav .menu a:hover {
	color: var(--text);
}

.about-pill {
	border: 1px solid color-mix(in srgb, var(--violet) 28%, var(--line));
	border-radius: 999px;
	padding: 4px 12px !important;
	background: color-mix(in srgb, var(--violet) 9%, var(--surface));
	color: color-mix(in srgb, var(--violet) 68%, var(--text)) !important;
}

.about-pill__icon {
	color: var(--violet);
}

.site-tools {
	display: flex;
	align-items: center;
	gap: 8px;
}

.icon-button,
.avatar-button,
.search-button,
.soft-button {
	border: 0;
	background: transparent;
	color: var(--muted);
	cursor: pointer;
}

.icon-button {
	width: 34px;
	height: 34px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.icon-button:hover,
.avatar-button:hover,
.search-button:hover {
	background: var(--surface-soft);
	color: var(--text);
}

.theme-moon {
	display: none;
}

html.dark .theme-sun {
	display: none;
}

html.dark .theme-moon {
	display: block;
}

.avatar-button {
	width: 34px;
	height: 34px;
	border-radius: 8px;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.avatar-button img {
	width: 24px;
	height: 24px;
	border-radius: 999px;
}

.avatar-button span {
	position: absolute;
	top: 2px;
	right: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 15px;
	border-radius: 999px;
	padding: 0 4px;
	background: var(--violet);
	color: #fff;
	font-size: 9px;
	font-weight: 800;
	line-height: 1;
}

.search-button {
	min-width: 110px;
	height: 34px;
	border: 1px solid var(--line);
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 0 10px;
	background: var(--surface);
	font-size: 14px;
}

kbd {
	display: inline-flex;
	align-items: center;
	min-width: 24px;
	height: 18px;
	padding: 0 5px;
	border: 1px solid var(--line-strong);
	border-radius: 5px;
	color: var(--muted-2);
	font-size: 11px;
	line-height: 1;
	background: color-mix(in srgb, var(--surface) 85%, var(--surface-soft));
}

.menu-button {
	display: none;
}

.mobile-menu {
	display: none;
	border-top: 1px solid var(--line);
	background: var(--surface);
	padding: 12px 24px 18px;
}

.mobile-menu a,
.mobile-menu__list a {
	display: block;
	padding: 10px 0;
	color: var(--muted);
}

.mobile-menu__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-shell {
	min-height: calc(100vh - var(--header-height));
	padding-top: var(--header-height);
}

.home-main {
	width: min(1240px, calc(100% - 40px));
	margin: 0 auto;
	padding: 36px 0 64px;
}

.category-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 18px;
	min-height: 42px;
	font-weight: 650;
	font-size: 16px;
}

.category-nav a {
	padding: 4px 5px;
	color: var(--text);
	transition: color 160ms ease;
}

.category-nav a:hover,
.category-nav a.is-active {
	color: var(--rose);
}

.category-nav span {
	color: var(--muted-2);
	font-weight: 400;
}

.home-ai-bubble-wrap {
	display: flex;
	justify-content: center;
	margin: 27px 0 38px;
}

.home-ai-bubble {
	width: min(100%, 460px);
	min-height: 70px;
	border: 1px solid var(--line);
	border-radius: 15px;
	background: color-mix(in srgb, var(--surface) 94%, transparent);
	box-shadow: 0 8px 22px rgba(15, 23, 42, 0.035);
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	color: var(--text);
	cursor: pointer;
	text-align: left;
	transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.home-ai-bubble:hover {
	border-color: color-mix(in srgb, var(--violet) 35%, var(--line));
	box-shadow: var(--shadow-soft);
	transform: translateY(-1px);
}

.home-ai-bubble__avatar {
	width: 38px;
	height: 38px;
	border-radius: 999px;
	position: relative;
	flex: 0 0 auto;
}

.home-ai-bubble__avatar img {
	width: 38px;
	height: 38px;
	border-radius: inherit;
}

.home-ai-bubble__avatar span {
	position: absolute;
	top: -6px;
	right: -6px;
	border-radius: 999px;
	background: var(--violet);
	color: #fff;
	font-size: 10px;
	font-weight: 750;
	padding: 1px 5px;
}

.home-ai-bubble__copy {
	display: grid;
	gap: 2px;
	min-width: 0;
	flex: 1;
}

.home-ai-bubble__copy strong {
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.home-ai-bubble__copy small {
	color: var(--muted);
	font-size: 13px;
}

.home-ai-bubble__icon {
	width: 18px;
	height: 18px;
	color: color-mix(in srgb, var(--violet) 64%, var(--muted-2));
}

.post-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	column-gap: 24px;
	row-gap: 28px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.post-card {
	height: 100%;
	min-height: 282px;
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: var(--shadow);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 180ms ease, box-shadow 180ms ease;
}

.post-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 30px rgba(15, 23, 42, 0.105);
}

.post-card__media {
	position: relative;
	display: block;
	height: 160px;
	background: var(--surface-soft);
	overflow: hidden;
}

.post-card__image {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	transition: transform 400ms ease;
}

.post-card:hover .post-card__image {
	transform: scale(1.045);
}

.post-card__fallback {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: end;
	padding: 20px;
	background:
		linear-gradient(135deg, rgba(56, 189, 248, 0.26), transparent 42%),
		linear-gradient(315deg, rgba(251, 113, 133, 0.24), transparent 45%),
		#172033;
	color: #fff;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
}

.post-card__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 20px 24px 18px;
	gap: 18px;
}

.post-card__title {
	color: var(--text);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.post-card__title:hover {
	color: color-mix(in srgb, var(--blue) 60%, var(--text));
}

.post-card__meta {
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	color: var(--muted-2);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 14px;
}

.post-card__meta span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.post-card__meta .ui-icon {
	width: 13px;
	height: 13px;
}

.pagination-wrap {
	margin: 42px 0 0;
	display: flex;
	justify-content: center;
}

.pagination-wrap ul {
	display: flex;
	align-items: center;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.pagination-wrap a,
.pagination-wrap span {
	min-width: 34px;
	height: 32px;
	border-radius: 7px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 12px;
	background: var(--surface);
	box-shadow: 0 6px 18px rgba(15, 23, 42, 0.055);
	color: var(--muted);
	font-size: 14px;
	font-weight: 500;
}

.pagination-wrap .current {
	color: var(--text);
	text-decoration: underline;
	text-decoration-color: var(--rose);
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
}

.archive-header {
	width: min(1240px, calc(100% - 40px));
	margin: 22px auto 34px;
	padding: 26px 0 10px;
}

.archive-header p {
	margin: 0 0 8px;
	color: var(--rose);
	font-weight: 800;
	text-transform: uppercase;
}

.archive-header h1 {
	margin: 0;
	font-size: 32px;
	line-height: 1.2;
	font-weight: 700;
}

.archive-header__description {
	max-width: 740px;
	margin-top: 14px;
	color: var(--muted);
}

.article-main {
	width: min(1220px, calc(100% - 40px));
	margin: 0 auto;
	padding: 34px 0 72px;
}

.article-layout {
	display: grid;
	grid-template-columns: minmax(0, 860px) 230px;
	gap: 50px;
	align-items: start;
}

.article-column {
	min-width: 0;
}

.article-hero {
	position: relative;
	min-height: 300px;
	border-radius: var(--radius);
	overflow: hidden;
	background-size: cover;
	background-position: center;
	background-color: #172033;
	box-shadow: var(--shadow-soft);
}

.article-hero--fallback {
	background:
		linear-gradient(135deg, rgba(56, 189, 248, 0.22), transparent 45%),
		linear-gradient(315deg, rgba(139, 92, 246, 0.24), transparent 50%),
		#172033;
}

.article-hero__shade,
.page-header__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(7, 12, 20, 0.66), rgba(7, 12, 20, 0.22) 58%, rgba(7, 12, 20, 0.12));
}

.article-hero__content {
	position: relative;
	min-height: inherit;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 44px 48px;
	color: #fff;
}

.article-hero h1 {
	max-width: 720px;
	margin: 0 0 18px;
	font-size: 30px;
	line-height: 1.24;
	font-weight: 700;
}

.article-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 18px;
	color: rgba(255, 255, 255, 0.82);
	font-size: 15px;
}

.article-meta span {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.article-actions {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 26px 0 34px;
}

.soft-button {
	min-height: 42px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 0 16px;
	font-size: 15px;
	font-weight: 600;
	color: color-mix(in srgb, var(--text) 70%, var(--muted));
	transition: transform 160ms ease, border-color 160ms ease, color 160ms ease;
}

.soft-button:hover {
	transform: translateY(-1px);
	border-color: var(--line-strong);
	color: var(--text);
}

.soft-button .ui-icon-sparkles {
	color: #f59e0b;
}

.soft-button .ui-icon-share {
	color: #2563eb;
}

.article-content {
	color: var(--text);
	font-size: 18px;
	line-height: 1.95;
	word-break: break-word;
}

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

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote,
.article-content pre,
.article-content table,
.article-content figure {
	margin: 1.25em 0;
}

.article-content h2,
.article-content h3,
.article-content h4 {
	color: var(--text);
	line-height: 1.25;
	margin: 2.6em 0 0.8em;
	font-weight: 750;
}

.article-content h2 {
	font-size: 36px;
}

.article-content h3 {
	font-size: 27px;
}

.article-content h4 {
	font-size: 24px;
}

.article-content a {
	color: #2563eb;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

.article-content img {
	border-radius: var(--radius);
	box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
	margin: 1.4em auto;
}

.article-content blockquote {
	border-left: 4px solid var(--blue);
	background: color-mix(in srgb, var(--blue) 9%, var(--surface));
	border-radius: 0 var(--radius) var(--radius) 0;
	padding: 14px 22px;
	color: color-mix(in srgb, var(--text) 78%, var(--muted));
}

.article-content code {
	border-radius: 5px;
	background: var(--surface-soft);
	padding: 0.15em 0.35em;
	font-size: 0.9em;
}

.article-content pre {
	overflow: auto;
	border-radius: var(--radius);
	background: #101827;
	color: #e5edf8;
	padding: 20px;
	line-height: 1.7;
}

.article-content pre code {
	padding: 0;
	background: transparent;
	color: inherit;
}

.article-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 17px;
}

.article-content th,
.article-content td {
	border: 1px solid var(--line);
	padding: 10px 12px;
	text-align: left;
}

.article-content th {
	background: var(--surface-soft);
}

.license-card {
	margin: 54px 0 32px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	padding: 24px 28px;
	color: color-mix(in srgb, var(--text) 74%, var(--muted));
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
	font-size: 16px;
}

.license-card p {
	margin: 0.4em 0;
}

.license-card a {
	color: #47617f;
	word-break: break-all;
}

html.dark .license-card a {
	color: #a8c7ef;
}

.license-card__icon {
	width: 28px;
	height: 28px;
	color: var(--text);
}

.adjacent-posts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px;
	margin-top: 32px;
}

.adjacent-card {
	min-height: 170px;
	position: relative;
	overflow: hidden;
	border-radius: var(--radius);
	background:
		linear-gradient(135deg, rgba(56, 189, 248, 0.2), transparent 45%),
		linear-gradient(315deg, rgba(251, 113, 133, 0.22), transparent 45%),
		#172033;
	background-size: cover;
	background-position: center;
	color: #fff;
	display: flex;
	align-items: center;
	padding: 26px;
}

.adjacent-card--next {
	text-align: right;
	justify-content: flex-end;
}

.adjacent-card__shade {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.46);
	transition: background 160ms ease;
}

.adjacent-card:hover .adjacent-card__shade {
	background: rgba(0, 0, 0, 0.34);
}

.adjacent-card__copy {
	position: relative;
	display: grid;
	gap: 10px;
	max-width: 88%;
}

.adjacent-card small {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: rgba(255, 255, 255, 0.78);
	font-size: 15px;
}

.adjacent-card strong {
	font-size: 19px;
	line-height: 1.35;
}

.article-sidebar {
	position: sticky;
	top: 96px;
	padding-top: 40px;
}

.toc-card {
	border-left: 1px solid var(--line);
	padding-left: 34px;
	min-height: 300px;
}

.toc-card h2 {
	margin: 0 0 22px;
	font-size: 18px;
}

.toc-card ol {
	display: grid;
	gap: 14px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.toc-card a {
	position: relative;
	display: block;
	color: var(--muted);
	font-size: 15px;
	line-height: 1.45;
	transition: color 160ms ease;
}

.toc-card a::before {
	content: "";
	position: absolute;
	left: -35px;
	top: 2px;
	width: 3px;
	height: 22px;
	background: transparent;
	border-radius: 999px;
}

.toc-card a.is-active {
	color: var(--text);
	font-weight: 700;
}

.toc-card a.is-active::before {
	background: var(--blue);
}

.toc-card .toc-h3 {
	padding-left: 14px;
	font-size: 15px;
}

.page-main {
	width: min(920px, calc(100% - 40px));
	margin: 0 auto;
	padding: 42px 0 72px;
}

.page-article,
.comments-area {
	background: transparent;
}

.page-header {
	position: relative;
	min-height: 220px;
	border-radius: var(--radius);
	overflow: hidden;
	background:
		linear-gradient(135deg, rgba(56, 189, 248, 0.22), transparent 44%),
		linear-gradient(315deg, rgba(139, 92, 246, 0.24), transparent 48%),
		#172033;
	color: #fff;
	display: flex;
	align-items: end;
	padding: 42px;
	margin-bottom: 42px;
	background-size: cover;
	background-position: center;
}

.page-header > div:last-child {
	position: relative;
}

.page-header p {
	margin: 0 0 8px;
	color: rgba(255, 255, 255, 0.72);
	font-weight: 700;
}

.page-header h1 {
	margin: 0;
	font-size: 42px;
	line-height: 1.2;
}

.page-content {
	max-width: 860px;
}

.comments-area {
	margin-top: 48px;
	border-top: 1px solid var(--line);
	padding-top: 32px;
}

.comments-title,
.comment-reply-title {
	font-size: 24px;
	margin: 0 0 18px;
}

.comment-list {
	list-style: none;
	margin: 0 0 36px;
	padding: 0;
	display: grid;
	gap: 18px;
}

.comment-body {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	padding: 18px;
}

.comment-form {
	display: grid;
	gap: 16px;
}

.comment-form input,
.comment-form textarea {
	width: 100%;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--text);
	padding: 12px 14px;
}

.comment-form .submit,
.button-link,
.empty-state__search button {
	border: 0;
	border-radius: 8px;
	background: var(--text);
	color: var(--surface);
	cursor: pointer;
	font-weight: 700;
	padding: 12px 18px;
}

.error-main {
	width: min(100%, 920px);
	margin: 0 auto;
	padding: 90px 28px;
}

.empty-state {
	width: min(100%, 760px);
	margin: 60px auto;
	text-align: center;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: var(--shadow-soft);
	padding: 48px 28px;
}

.empty-state--large {
	padding: 70px 34px;
}

.empty-state__icon {
	width: 48px;
	height: 48px;
	color: var(--violet);
	margin-bottom: 16px;
}

.empty-state h1 {
	margin: 0 0 12px;
	font-size: 32px;
}

.empty-state p {
	margin: 0 auto 24px;
	max-width: 520px;
	color: var(--muted);
}

.empty-state__search {
	width: min(100%, 500px);
	margin: 0 auto 20px;
	display: flex;
	gap: 10px;
}

.empty-state__search input {
	flex: 1;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
	color: var(--text);
	padding: 12px 14px;
}

.button-link {
	display: inline-flex;
	margin-top: 8px;
}

.site-footer {
	border-top: 1px solid var(--line);
	color: var(--muted);
}

.site-footer__inner {
	width: min(100%, 1280px);
	margin: 0 auto;
	padding: 28px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.site-footer p {
	margin: 0;
}

.footer-menu {
	display: flex;
	align-items: center;
	gap: 18px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-menu a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.app-modal {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: none;
	align-items: flex-start;
	justify-content: center;
	padding: 90px 24px 24px;
}

.app-modal.is-open {
	display: flex;
}

.app-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.38);
	backdrop-filter: blur(7px);
}

.app-modal__panel {
	position: relative;
	width: min(100%, 760px);
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 18px;
	box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
	overflow: hidden;
}

.search-panel__form {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 18px 20px;
	border-bottom: 1px solid var(--line);
}

.search-panel__form .ui-icon {
	width: 20px;
	height: 20px;
	color: var(--muted);
}

.search-panel__form input {
	flex: 1;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--text);
	font-size: 18px;
}

.search-panel__results {
	max-height: 430px;
	overflow: auto;
	padding: 12px;
}

.search-panel__results p {
	margin: 20px;
	color: var(--muted);
}

.search-result {
	display: block;
	border-radius: 10px;
	padding: 14px 16px;
	transition: background 160ms ease;
}

.search-result:hover {
	background: var(--surface-soft);
}

.search-result strong {
	display: block;
	font-size: 17px;
	line-height: 1.4;
}

.search-result span {
	color: var(--muted);
	font-size: 14px;
}

.ai-panel {
	width: min(100%, 900px);
}

.ai-panel__header {
	min-height: 82px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 18px 22px;
	border-bottom: 1px solid var(--line);
}

.ai-panel__identity {
	display: flex;
	align-items: center;
	gap: 14px;
}

.ai-panel__identity img {
	width: 42px;
	height: 42px;
	border-radius: 999px;
}

.ai-panel__identity div {
	display: grid;
	line-height: 1.25;
}

.ai-panel__identity strong {
	font-size: 18px;
}

.ai-panel__identity span {
	color: var(--muted);
}

.ai-panel__messages {
	min-height: 230px;
	max-height: 430px;
	overflow: auto;
	display: grid;
	align-content: start;
	gap: 18px;
	padding: 28px 38px;
}

.ai-message {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

.ai-message img {
	width: 34px;
	height: 34px;
	border-radius: 999px;
}

.ai-message > div {
	max-width: 78%;
	border-radius: 18px;
	background: var(--surface-soft);
	padding: 13px 16px;
	color: color-mix(in srgb, var(--text) 84%, var(--muted));
}

.ai-message--user {
	justify-content: flex-end;
}

.ai-message--user > div {
	background: color-mix(in srgb, var(--violet) 16%, var(--surface));
	color: var(--text);
}

.ai-message p {
	margin: 0;
}

.ai-message p + p {
	margin-top: 8px;
}

.ai-message__hint {
	color: var(--muted);
	font-size: 14px;
}

.ai-panel__form {
	display: flex;
	gap: 12px;
	padding: 20px 38px 12px;
}

.ai-panel__form input {
	flex: 1;
	min-height: 56px;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: var(--surface);
	color: var(--text);
	padding: 0 18px;
	outline: 0;
}

.ai-panel__form button {
	width: 56px;
	height: 56px;
	border: 0;
	border-radius: 16px;
	background: var(--text);
	color: var(--surface);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.ai-panel__form .ui-icon {
	width: 22px;
	height: 22px;
}

.ai-panel__note {
	margin: 0;
	padding: 0 38px 22px;
	text-align: center;
	color: var(--muted-2);
	font-size: 14px;
}

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

	.article-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.article-sidebar {
		display: none;
	}
}

@media (max-width: 980px) {
	.site-nav--desktop,
	.site-social,
	.search-button kbd,
	.search-button span {
		display: none;
	}

	.search-button {
		min-width: 34px;
		width: 34px;
		padding: 0;
		border: 0;
		background: transparent;
	}

	.menu-button {
		display: inline-flex;
	}

	.mobile-menu.is-open {
		display: block;
	}

	.home-main {
		padding: 28px 20px 54px;
	}

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

	.article-main {
		padding: 24px 20px 56px;
	}
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

@media (max-width: 720px) {
	.site-header__inner {
		padding: 0 14px;
		gap: 10px;
	}

	.site-brand__name {
		max-width: 150px;
	}

	.category-nav {
		gap: 10px;
		font-size: 16px;
		justify-content: flex-start;
		overflow: auto;
		flex-wrap: nowrap;
		padding-bottom: 8px;
	}

	.home-ai-bubble {
		min-height: 78px;
		padding: 13px 14px;
		border-radius: 14px;
	}

	.home-ai-bubble__copy strong {
		font-size: 16px;
	}

	.home-ai-bubble__copy small {
		font-size: 14px;
	}

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

	.post-card {
		min-height: 354px;
	}

	.post-card__media {
		height: 230px;
	}

	.post-card__body {
		padding: 22px;
	}

	.article-hero {
		min-height: 270px;
	}

	.article-hero__content {
		padding: 30px 24px;
		justify-content: flex-end;
	}

	.article-hero h1 {
		font-size: 28px;
	}

	.article-content {
		font-size: 18px;
		line-height: 1.9;
	}

	.article-content h2 {
		font-size: 32px;
	}

	.article-content h3 {
		font-size: 25px;
	}

	.article-actions {
		flex-wrap: wrap;
	}

	.license-card {
		display: block;
		padding: 20px;
		font-size: 15px;
	}

	.license-card__icon {
		margin-top: 14px;
	}

	.adjacent-posts {
		grid-template-columns: 1fr;
	}

	.page-main {
		padding: 30px 20px 56px;
	}

	.page-header {
		min-height: 190px;
		padding: 28px;
	}

	.page-header h1 {
		font-size: 34px;
	}

	.site-footer__inner {
		display: grid;
		justify-items: start;
	}

	.app-modal {
		padding: 72px 12px 12px;
	}

	.ai-panel__messages,
	.ai-panel__form,
	.ai-panel__note {
		padding-left: 18px;
		padding-right: 18px;
	}

	.ai-message > div {
		max-width: 86%;
	}

	.empty-state__search {
		display: grid;
	}
}
