:root {
  --paper: #fafaf7;
  --ink: #111111;
  --muted: #5b5b5b;
  --line: #e5e5e5;
  --brand: #1a56db;
  --brand-light: #7ba6ff;
  --danger: #b42318;
  --night: #0b0f14;
  --night-2: #121821;
  --night-ink: #f5f5f5;
  --night-muted: #9ca3af;
  --night-line: #252d38;
  --sans: "Inter", "Inter Tight", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}
body.has-mobile-bar { padding-bottom: 6.5rem; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.skip {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
}
.skip:focus {
  position: fixed; left: 1rem; top: 1rem; z-index: 80; width: auto; height: auto;
  clip-path: none; background: var(--ink); color: var(--paper); padding: 0.5rem 1rem;
}
.container-x { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 20px; }
.eyebrow {
  font-family: var(--mono); font-size: 11px; line-height: 1.4; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--brand); margin: 0 0 0.75rem;
}
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.lede { max-width: 40rem; color: var(--muted); font-size: 1.05rem; }
.page-title {
  max-width: 16em; margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.2rem); line-height: 1.12; letter-spacing: -0.02em;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: 4px;
  font: inherit; font-size: 15px; font-weight: 500; line-height: 1.2; letter-spacing: 0.02em;
  text-decoration: none; cursor: pointer; background: transparent; color: inherit;
}
.btn:hover { filter: brightness(1.06); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.tag {
  display: inline-block; padding: 2px 8px; border: 1px solid var(--line); border-radius: 4px;
  font-family: var(--mono); font-size: 12px; line-height: 1.6; letter-spacing: 0.02em; color: var(--muted);
}
.logo { color: var(--brand); font-size: 1.125rem; font-weight: 700; letter-spacing: -0.02em; text-decoration: none; }
.field {
  width: 100%; min-height: 44px; padding: 9px 12px; background: #fff; border: 1px solid #cfcfcf;
  border-radius: 4px; font: inherit; font-size: 16px; line-height: 1.5; color: var(--ink);
}
textarea.field { min-height: 120px; resize: vertical; }
textarea.body { min-height: 320px; font-family: var(--mono); font-size: 14px; line-height: 1.6; }
.field:focus-visible { outline-offset: 0; border-color: var(--brand); }
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 64px;
  background: rgb(250 250 247 / 0.92); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-bar { height: 64px; display: flex; align-items: center; gap: 1.25rem; }
.nav-desktop { display: none; align-items: center; gap: 0.25rem; margin-left: auto; }
.nav-desktop a { padding: 0.4rem 0.7rem; font-size: 15px; text-decoration: none; }
.nav-desktop a:hover, .nav-desktop a[aria-current="page"] { color: var(--brand); }
.header-cta { display: none; }
.nav-mobile { margin-left: auto; position: relative; }
.nav-mobile summary {
  list-style: none; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 15px;
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile nav {
  position: absolute; right: 0; top: calc(100% + 8px); width: min(18rem, 80vw);
  background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 0.5rem 0;
}
.nav-mobile ul { list-style: none; margin: 0; padding: 0; }
.nav-mobile a { display: block; padding: 0.7rem 1rem; text-decoration: none; }
.nav-mobile a[aria-current="page"] { color: var(--brand); }
.admin-bar {
  position: fixed; top: 64px; inset-inline: 0; z-index: 40; height: 44px;
  background: var(--night); color: var(--night-ink); border-bottom: 1px solid var(--night-line);
}
.admin-bar-inner { height: 44px; display: flex; align-items: center; gap: 1.25rem; font-size: 14px; }
.admin-bar a { color: var(--night-ink); text-decoration: none; }
.admin-bar a:hover { color: var(--brand-light); }
.admin-bar form { margin-left: auto; }
.admin-bar button {
  background: none; border: 0; color: var(--night-muted); font: inherit; cursor: pointer; min-height: 44px;
}
main { padding-top: 64px; }
.has-admin main { padding-top: 108px; }
.page-section { padding-bottom: 4rem; padding-top: 2rem; }
.crumbs-wrap { padding-top: 2rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.35rem 0.5rem; list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.crumbs [aria-current="page"] { color: var(--ink); }
.page-head, .form-actions, .cta-actions, .split, .row-actions, .meta-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem;
}
.page-head { justify-content: space-between; align-items: flex-end; margin-bottom: 1.5rem; }
.page-head h1, .article-header h1, .auth-card h1 { margin: 0; }
.article-header h1 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.3; }
.meta-row { gap: 0.75rem; font-size: 14px; color: var(--muted); margin: 0 0 0.5rem; }
.insights-layout { display: grid; gap: 2rem; margin-top: 2.5rem; }
.cat-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.cat-filter button {
  min-height: 44px; padding: 0 0.75rem; border: 1px solid var(--line); background: transparent;
  border-radius: 4px; font: inherit; font-size: 15px; cursor: pointer; text-align: left;
}
.cat-filter button[aria-pressed="true"] { color: var(--brand); font-weight: 600; }
.lead {
  display: grid; gap: 1.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); margin-bottom: 0.5rem;
}
.lead img, .hero-cover, .cover-preview {
  width: 100%; border: 1px solid var(--line); border-radius: 4px; object-fit: cover; aspect-ratio: 16 / 9;
}
.lead h2, .article-list h2 { margin: 0.35rem 0; font-size: 1.35rem; line-height: 1.35; }
.lead h2 a, .article-list h2 a, .admin-list h2 a { text-decoration: none; }
.lead h2 a:hover, .article-list h2 a:hover, .admin-list h2 a:hover { color: var(--brand); }
.article-list { list-style: none; margin: 0; padding: 0; }
.article-list > li { padding: 1.6rem 0; border-bottom: 1px solid var(--line); }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.filter-status { margin: 0 0 1rem; font-size: 14px; color: var(--muted); }
.article-grid { display: grid; gap: 2rem; margin-top: 2rem; }
.hero-cover { margin-top: 1.5rem; }
.prose-zh { max-width: 68ch; }
.prose-zh p { margin: 1.2em 0; }
.prose-zh h2 { margin: 2.4em 0 0.6em; font-size: 1.5rem; line-height: 1.4; scroll-margin-top: 6rem; }
.prose-zh ul, .prose-zh ol { margin: 1.2em 0; padding-left: 1.4em; }
.prose-zh li { margin: 0.4em 0; }
.prose-zh strong { font-weight: 600; }
.prose-zh a { color: var(--brand); }
.toc-desktop { display: none; }
.toc-desktop nav { position: sticky; top: 6rem; }
.toc-desktop ol, .toc-mobile ol { list-style: none; margin: 0; padding: 0; }
.toc-desktop a {
  display: block; margin-left: -1px; border-left: 2px solid transparent; padding: 0.2rem 0 0.2rem 0.75rem;
  color: var(--muted); text-decoration: none; font-size: 14px;
}
.toc-desktop a[aria-current="true"] { border-color: var(--brand); color: var(--brand); }
.toc-mobile { margin-top: 1.5rem; padding: 1rem; }
.toc-mobile summary { cursor: pointer; font-weight: 500; }
.toc-mobile a { color: var(--muted); text-decoration: none; }
.related { border-top: 1px solid var(--line); background: #fff; padding: 3.5rem 0; }
.related h2 { margin: 0 0 1.25rem; font-size: 1.25rem; }
.related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.related a { display: block; padding: 1.25rem; text-decoration: none; }
.related a:hover { border-color: var(--brand); }
.related h3 { margin: 0.4rem 0 0; font-size: 1.125rem; line-height: 1.4; }
.cta { background: var(--night); color: var(--night-ink); text-align: center; padding: 5rem 0; }
.cta h2 { margin: 0 auto; max-width: 20em; font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.3; }
.cta p { margin: 1rem auto 0; max-width: 36rem; color: var(--night-muted); }
.cta-actions { justify-content: center; margin-top: 1.75rem; }
.phone-link { color: var(--night-ink); text-decoration: none; }
.phone-link:hover { color: var(--brand-light); }
.site-footer { background: var(--night); color: var(--night-ink); }
.footer-grid { display: grid; gap: 2.5rem; padding: 3.5rem 0; }
.footer-lead, .site-footer li, .site-footer figcaption { color: var(--night-muted); font-size: 14px; }
.site-footer .eyebrow { color: var(--brand-light); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.site-footer a { color: var(--night-muted); text-decoration: none; }
.site-footer a:hover { color: var(--night-ink); }
.contact-list .num, .footer-bottom a:hover { color: var(--night-ink); }
.wechat { margin: 1.25rem 0 0; }
.wechat img { width: 7rem; height: auto; border: 1px solid var(--night-line); border-radius: 4px; background: var(--paper); }
.footer-bottom { border-top: 1px solid var(--night-line); }
.footer-bottom-inner {
  display: flex; flex-direction: column; gap: 0.4rem; padding: 1.25rem 0; font-size: 12px; color: var(--night-muted);
}
.mobile-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 40; display: flex; gap: 0.75rem;
  padding: 0.75rem 1.25rem calc(0.75rem + env(safe-area-inset-bottom));
  background: var(--paper); border-top: 1px solid var(--line);
}
.mobile-bar a:first-child {
  flex: 1; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-size: 15px;
}
.mobile-bar .btn { flex: 1; }
.auth-wrap { min-height: 60vh; display: grid; place-items: center; padding: 3rem 1.25rem 4rem; }
.auth-card { width: min(28rem, 100%); padding: 1.75rem; display: grid; gap: 0.75rem; }
.auth-card .btn { margin-top: 0.5rem; }
label, legend { font-size: 14px; font-weight: 600; }
.editor { display: grid; gap: 0.45rem; max-width: 46rem; margin-top: 1.5rem; }
.hint { margin: 0 0 0.6rem; color: var(--muted); font-size: 14px; }
.form-error, .form-flash { padding: 0.7rem 0.9rem; border-radius: 4px; border: 1px solid var(--line); }
.form-error { color: var(--danger); border-color: #f0c8c4; background: #fff; }
.form-flash { background: #fff; }
.split > div { flex: 1 1 14rem; display: grid; gap: 0.35rem; }
.status-set { border: 0; margin: 0.5rem 0; padding: 0; display: flex; gap: 1.25rem; }
.check { font-weight: 500; display: inline-flex; align-items: center; gap: 0.4rem; }
.admin-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.admin-list > li {
  display: grid; gap: 0.75rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line);
}
.admin-list h2 { margin: 0.2rem 0; font-size: 1.2rem; }
.row-actions a { color: var(--brand); font-size: 14px; }
.narrow { max-width: 40rem; }
.cover-preview { max-width: 28rem; margin: 0.25rem 0 0.5rem; }
@media (min-width: 768px) {
  .container-x { padding-inline: 40px; }
  .lead { grid-template-columns: 1fr 1fr; align-items: center; }
  .related ul { grid-template-columns: 1fr 1fr; }
  .footer-bottom-inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .admin-list > li { grid-template-columns: 1fr auto; align-items: center; }
}
@media (min-width: 1024px) {
  .nav-desktop { display: flex; }
  .header-cta { display: inline-flex; margin-left: 0.5rem; }
  .nav-mobile { display: none; }
  .insights-layout { grid-template-columns: 12rem 1fr; gap: 2.5rem; }
  .cat-filter { flex-direction: column; gap: 0.25rem; }
  .cat-filter button { width: 100%; border: 0; padding-inline: 0; }
  .article-grid { grid-template-columns: 1fr 14rem; }
  .toc-desktop { display: block; }
  .toc-mobile { display: none; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1.1fr; }
  .mobile-bar { display: none; }
  body.has-mobile-bar { padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
