@font-face {
	font-family: Inter;
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/inter-400.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: Inter;
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("../fonts/inter-500.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: Inter;
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../fonts/inter-600.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: Inter;
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/inter-700.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--ink: #161616;
	--secondary: #666666;
	--muted: #666666;
	--border: #e8e8e8;
	--surface: #f7f7f7;
	--bg: #ffffff;
	--accent: #335cff;
	--site: 1240px;
	--content: 720px;
	--wide: 1080px;
	--header: 68px;
	--pad: 32px;
	--sans: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
	--mono: "SFMono-Regular", ui-monospace, "Cascadia Code", Consolas, monospace;
}

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

html { scroll-padding-top: 88px; }

body {
	margin: 0;
	padding-top: var(--header);
	color: var(--ink);
	background: var(--bg);
	font-family: var(--sans);
	font-size: 19px;
	line-height: 1.78;
	text-rendering: optimizeLegibility;
}

:lang(zh) body,
:lang(zh-CN) body { line-height: 1.85; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.16em; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

.skip-link {
	position: absolute;
	left: 16px;
	top: -40px;
	background: var(--ink);
	color: #fff;
	padding: 8px 12px;
	z-index: 20;
}
.skip-link:focus { top: 12px; }

.wrap {
	width: min(var(--site), calc(100% - (var(--pad) * 2)));
	margin-inline: auto;
}

.reading-progress {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	z-index: 2;
	pointer-events: none;
}
.reading-progress span {
	display: block;
	height: 100%;
	width: 100%;
	background: var(--accent);
	transform: scaleX(0);
	transform-origin: 0 50%;
}
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 40;
	height: var(--header);
	background: #fff;
}
body.admin-bar { padding-top: calc(var(--header) + 32px); }
body.admin-bar .site-header { top: 32px; }
.site-header.is-scrolled { border-bottom: 1px solid var(--border); }

.header-bar,
.header-tools,
.primary-nav,
.footer-nav,
.legal-nav,
.article-meta,
.share,
.lang-switch {
	display: flex;
	align-items: center;
}

.header-bar { height: var(--header); gap: 28px; }
.logo {
	font-weight: 650;
	font-size: 18px;
	letter-spacing: -0.03em;
	text-decoration: none;
	color: var(--ink);
}
.primary-nav { gap: 22px; flex: 1; }
.primary-nav a,
.footer-nav a,
.legal-nav a,
.lang-switch a,
.kicker {
	text-decoration: none;
}
.primary-nav a,
.footer-nav a { font-size: 15px; color: var(--ink); }
.primary-nav a[aria-current="page"] { color: var(--accent); }
.header-tools { margin-left: auto; gap: 8px; }
.lang-switch { gap: 8px; font-size: 14px; }
.lang-switch a[aria-current="true"] { color: var(--accent); font-weight: 600; }
.lang-sep { color: var(--border); }

.icon-button {
	width: 40px;
	height: 40px;
	border: 0;
	background: transparent;
	display: grid;
	place-items: center;
	cursor: pointer;
	border-radius: 8px;
}
.icon-button svg { width: 20px; height: 20px; }
.menu-button { display: none; }

.search-dialog,
.menu-dialog {
	border: 0;
	padding: 0;
	width: min(720px, calc(100% - 32px));
	background: transparent;
}
.search-dialog::backdrop,
.menu-dialog::backdrop { background: rgba(22, 22, 22, 0.28); }
.search-form,
.menu-panel {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 20px;
}
.search-label { display: block; font-size: 14px; color: var(--secondary); margin-bottom: 8px; }
.search-row { display: flex; gap: 8px; }
.search-row input[type="search"],
.search-row input[type="email"],
.comment-field input,
.comment-field textarea {
	width: 100%;
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 12px 14px;
	background: #fff;
}
.search-row button,
.text-button,
.comment-form .submit {
	border: 0;
	background: var(--ink);
	color: #fff;
	border-radius: 8px;
	padding: 12px 16px;
	text-decoration: none;
	cursor: pointer;
}
.menu-dialog { width: min(420px, calc(100% - 24px)); margin-left: auto; height: 100%; max-height: none; }
.menu-panel { min-height: 100%; border-radius: 0; }
.mobile-nav { display: grid; gap: 16px; margin: 32px 0; font-size: 28px; line-height: 1.2; }
.mobile-nav a { text-decoration: none; }

.featured {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 48px;
	align-items: center;
	padding: 72px 0 32px;
}
.featured h1,
.article-header h1,
.archive-header h1 {
	font-size: 56px;
	line-height: 1.08;
	margin: 12px 0 16px;
	font-weight: 600;
}
.featured h1 a { text-decoration: none; }
.lede { font-size: 20px; color: var(--secondary); margin: 0 0 16px; max-width: 40rem; }
.kicker {
	color: var(--accent);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
}
:lang(en) .kicker { letter-spacing: 0.08em; text-transform: uppercase; }
.meta { color: var(--secondary); font-size: 14px; margin: 0; }
.featured-media,
.hero,
.card-media,
.image-fallback {
	border-radius: 10px;
	overflow: hidden;
	background: var(--surface);
	aspect-ratio: 16 / 9;
}
.featured-media img,
.hero img,
.card-media img,
.image-fallback { width: 100%; height: 100%; object-fit: cover; }
.image-fallback { background: linear-gradient(160deg, #f7f7f7 0%, #e7e7e7 100%); }

.band { padding: 28px 0 8px; }
.band h2,
.related h2,
.author-box h2,
.comments h2 {
	font-size: 28px;
	margin: 0 0 20px;
}
.card-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px 24px;
}
.card-title { font-size: 22px; line-height: 1.25; margin: 8px 0; letter-spacing: -0.02em; }
.card-title a { text-decoration: none; }
.card-excerpt { color: var(--secondary); font-size: 16px; line-height: 1.6; margin: 0 0 10px; }
.card-body .meta { margin-top: 8px; }
.band-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.band-head a { text-decoration: none; color: var(--secondary); font-size: 14px; }
.story-list { display: grid; gap: 0; }
.card-list {
	display: grid;
	grid-template-columns: 168px minmax(0, 1fr);
	gap: 20px;
	align-items: center;
	padding: 18px 0;
	border-top: 1px solid var(--border);
}
.card-list .card-title { font-size: 20px; margin: 0; }
.card-list .card-media { aspect-ratio: 16 / 9; }

.newsletter {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
	align-items: end;
	padding: 64px 0;
	margin-top: 24px;
	border-top: 1px solid var(--border);
}
.newsletter h2 { margin-bottom: 8px; }
.newsletter p { margin: 0; color: var(--secondary); }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.article-frame {
	width: min(1080px, calc(100% - 64px));
	margin: 0 auto;
	display: grid;
	grid-template-columns: minmax(0, 720px) 200px;
	column-gap: 64px;
	justify-content: center;
	align-items: start;
}
.article-layout { display: contents; }
.article-header,
.entry-content,
.article-footer,
.article-comments { grid-column: 1; min-width: 0; }
.article-header { grid-row: 1; padding-top: 56px; }
.entry-content { grid-row: 2; }
.article-footer { grid-row: 3; }
.article-comments { grid-row: 4; }
.article-header h1 {
	font-size: 44px;
	line-height: 1.22;
	max-width: none;
	margin: 10px 0 16px;
}
.breadcrumb { font-size: 14px; color: var(--secondary); display: flex; gap: 8px; margin-bottom: 18px; }
.breadcrumb a { color: var(--secondary); text-decoration: none; }
.article-meta { justify-content: space-between; gap: 10px 16px; margin: 18px 0 28px; flex-wrap: wrap; align-items: center; }
.article-meta .meta { flex: 1 1 16em; min-width: min(100%, 16em); }
.article-meta .lang-switch { flex: 0 0 auto; margin-left: auto; white-space: nowrap; }
.hero { margin: 28px 0 0; }
.entry-content { max-width: none; font-size: 19px; padding-top: 36px; }
.entry-content > * { margin: 0 0 26px; }
.entry-content h2 { font-size: 34px; line-height: 1.2; margin: 48px 0 16px; }
.entry-content h3 { font-size: 26px; margin: 36px 0 12px; }
.entry-content h4 { font-size: 20px; margin: 28px 0 10px; }
.entry-content a { color: var(--ink); }
.entry-content ul, .entry-content ol { padding-left: 1.2em; }
.entry-content li { margin: 6px 0; }
.entry-content figcaption,
.entry-content .wp-element-caption { color: var(--muted); font-size: 14px; line-height: 1.5; }
.entry-content .alignwide { max-width: 100%; width: auto; position: static; transform: none; }
.entry-content blockquote {
	margin: 32px 0;
	padding: 0 0 0 18px;
	border-left: 2px solid var(--ink);
	font-size: 24px;
	line-height: 1.45;
}
.entry-content blockquote p { margin: 0; }
.wp-block-table { overflow-x: auto; margin: 28px 0; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.entry-content th, .entry-content td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.entry-content th { font-size: 14px; font-weight: 600; }
.entry-content .wp-block-group.is-style-note,
.entry-content .wp-block-group.is-style-tip,
.entry-content .wp-block-group.is-style-important,
.entry-content .wp-block-group.is-style-warning {
	background: var(--surface);
	border-left: 2px solid var(--accent);
	border-radius: 8px;
	padding: 8px 18px 4px;
	margin: 28px 0;
}
.entry-content .is-style-important { border-left-color: var(--ink); }
.entry-content .is-style-warning { border-left-color: #9a3412; }
.callout-label { font-size: 13px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px; }

.entry-content h2,
.entry-content h3 { position: relative; }
.heading-anchor {
	border: 0;
	background: transparent;
	color: var(--secondary);
	margin-left: 8px;
	opacity: 0;
	cursor: pointer;
	font-size: 0.8em;
}
.entry-content h2:hover .heading-anchor,
.entry-content h3:hover .heading-anchor,
.heading-anchor:focus-visible { opacity: 1; }

.code-frame { margin: 28px 0; background: #161616; color: #f4f4f4; border-radius: 10px; overflow: hidden; }
.code-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; color: #c8c8c8; font-size: 13px; font-family: var(--sans); }
.code-bar button { background: transparent; color: inherit; border: 1px solid #3a3a3a; border-radius: 6px; padding: 4px 8px; cursor: pointer; }
.code-frame pre { margin: 0; padding: 4px 16px 16px; overflow-x: auto; font-family: var(--mono); font-size: 14px; line-height: 1.65; }
.code-frame code { font-family: inherit; }
.token.comment { color: #9a9a9a; }
.token.string, .token.attr-value { color: #d7e6c8; }
.token.keyword, .token.operator { color: #c9d6ff; }
.token.function, .token.class-name { color: #f4f4f4; }
.token.number, .token.boolean { color: #f0e2c0; }

.toc {
	grid-column: 2;
	grid-row: 2 / span 2;
	position: sticky;
	top: 96px;
	max-height: calc(100vh - 120px);
	overflow: auto;
	border: 0;
	margin: 36px 0 0;
	padding: 0;
}
.toc summary { font-size: 13px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.toc a { text-decoration: none; color: var(--secondary); font-size: 14px; line-height: 1.4; }
.toc a.is-current { color: var(--ink); }
.toc-h3 { padding-left: 12px; }
@media (min-width: 1080px) {
	.toc summary { pointer-events: none; }
}

.article-footer { max-width: none; margin: 0; padding: 8px 0 24px; }
.article-footer .card-grid,
.related .card-grid { grid-template-columns: 1fr; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 8px 0 24px; }
.tag-list a { text-decoration: none; border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; font-size: 13px; }
.share { gap: 14px; font-size: 14px; margin-bottom: 28px; }
.share button, .share a { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 0.16em; cursor: pointer; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; border-top: 1px solid var(--border); padding: 24px 0; margin-bottom: 28px; }
.pager a { text-decoration: none; display: grid; gap: 4px; }
.pager span { color: var(--secondary); font-size: 13px; }
.pager strong { font-size: 18px; line-height: 1.3; font-weight: 600; }
.pager-next { text-align: right; }
.author-box { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 8px 0 28px; }
.author-box img { border-radius: 50%; width: 64px; height: 64px; }
.author-box h2 { font-size: 20px; margin: 0; }
.author-box h2 a { text-decoration: none; }
.related { margin-top: 12px; }

.comments { max-width: none; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--border); }
.page-shell .article { width: min(720px, 100%); margin-inline: auto; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-item { border-bottom: 1px solid var(--border); padding: 16px 0; }
.comment-item .children { list-style: none; margin: 8px 0 0; padding-left: 20px; }
.comment-meta { display: flex; gap: 12px; align-items: baseline; }
.comment-meta time { color: var(--secondary); font-size: 14px; }
.comment-body { font-size: 17px; }
.comment-reply a { font-size: 14px; }
.comment-field { margin: 0 0 12px; }
.comment-field label { display: block; font-size: 14px; margin-bottom: 4px; }
.comment-form { margin-top: 20px; }
.nav-links, .pagination { display: flex; gap: 16px; margin: 24px 0; font-size: 14px; }

.archive-header { padding: 56px 0 12px; max-width: 760px; }
.archive-header h1 { margin-top: 0; }
.archive-list { margin-top: 12px; }
.empty { padding: 24px 0 64px; }

.site-footer { border-top: 1px solid var(--border); padding: 40px 0 48px; margin-top: 12px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-note { color: var(--secondary); font-size: 15px; max-width: 28ch; }
.footer-nav, .legal-nav { display: grid; gap: 8px; align-items: start; justify-content: start; }
.footer-meta p { color: var(--secondary); font-size: 14px; }

@media (max-width: 1024px) {
	:root { --pad: 24px; }
	.primary-nav { display: none; }
	.header-tools .lang-switch { display: none; }
	.menu-button { display: grid; }
	.featured, .newsletter, .footer-grid, .card-grid { grid-template-columns: 1fr 1fr; }
	.article-frame {
		display: flex;
		flex-direction: column;
		width: min(720px, calc(100% - 48px));
	}
	.article-header { order: 1; }
	.toc { order: 2; }
	.entry-content { order: 3; }
	.article-footer { order: 4; }
	.article-comments { order: 5; }
	.toc {
		position: static;
		max-height: none;
		margin: 0 0 8px;
		background: var(--surface);
		border-radius: 10px;
		padding: 12px 16px;
	}
	.toc summary { pointer-events: auto; }
	.entry-content { padding-top: 8px; }
	.featured { padding-top: 40px; }
	.featured h1, .article-header h1, .archive-header h1 { font-size: 42px; }
}

@media (max-width: 640px) {
	:root { --pad: 20px; --header: 60px; }
	body { font-size: 17px; }
	body.admin-bar { padding-top: calc(var(--header) + 46px); }
	body.admin-bar .site-header { top: 46px; }
	.featured, .newsletter, .footer-grid, .card-grid, .related .card-grid, .card-list, .pager, .author-box { grid-template-columns: 1fr; }
	.featured h1, .article-header h1 { font-size: 36px; line-height: 1.15; max-width: none; }
	.article-meta { display: grid; grid-template-columns: 1fr; justify-items: start; }
	.article-meta .meta { min-width: 0; }
	.article-meta .lang-switch { margin-left: 0; }
	.entry-content h2 { font-size: 28px; }
	.entry-content h3 { font-size: 22px; }
	.entry-content { font-size: 17px; }
	.lede { font-size: 18px; }
	.pager-next { text-align: left; }
	.search-row { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; transition: none !important; }
}
