/* SHANCHA AI 设计系统：冷白底、品牌绿与科技青蓝、细线卡片、大留白。
   类名契约与 functions/_lib/html.js、assets/app.js 保持一致。 */

:root {
  color-scheme: light;
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-2: #eef3f5;
  --surface-tech: #e7f5f6;
  --ink: #0b1726;
  --muted: #5d6d7c;
  --line: #dbe4e8;
  --line-strong: #c7d5dc;
  --brand: #087b56;
  --brand-strong: #056044;
  --brand-tint: #e5f4ed;
  --tech: #087f8c;
  --tech-strong: #066772;
  --tech-tint: #e4f5f6;
  --tech-ring: rgba(8, 127, 140, 0.16);
  --blue: #2f62d0;
  --blue-strong: #224ca8;
  --blue-tint: #edf3ff;
  --accent: #b84a3a;
  --accent-tint: #fff0ec;
  --warn-bg: #fff5df;
  --warn: #87530b;
  --danger: #bd3f2a;
  --danger-bg: #ffede8;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(11, 23, 38, 0.07);
  --shadow-md: 0 10px 28px rgba(11, 23, 38, 0.10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ---------- 公开站点：AICHUHAI.DEV 结构化改版 ---------- */

.page {
  min-height: 60vh;
  background: #ffffff;
}

.shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding-right: 24px;
  padding-left: 24px;
}

.shell-block {
  padding-top: 32px;
  padding-bottom: 64px;
}

.ui-icon {
  display: block;
  width: 20px;
  height: 20px;
}

.topbar {
  min-height: 64px;
  border-color: #e8edf2;
  background: rgba(255, 255, 255, 0.94);
}

.topbar-inner {
  width: min(1120px, 100%);
  min-height: 64px;
  gap: 22px;
  padding-right: 24px;
  padding-left: 24px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #116a56;
  box-shadow: none;
}

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

.brand-text small {
  max-width: 180px;
  overflow: hidden;
  color: #70808e;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topnav {
  justify-content: center;
  gap: 0;
}

.topnav a {
  padding: 7px 10px;
  border-radius: 6px;
  color: #5f6b78;
  font-size: 13px;
}

.topnav a:hover {
  background: #f2f5f8;
  color: #152233;
}

.topnav a.active {
  background: #edf4ff;
  color: #2459b5;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #e1e7ed;
  border-radius: 999px;
  background: #f6f8fa;
  color: #73808d;
  font-size: 12px;
  white-space: nowrap;
}

.search-trigger:hover {
  border-color: #c7d4e2;
  background: #ffffff;
  color: #2459b5;
}

.search-trigger svg {
  width: 15px;
  height: 15px;
}

.topbar-actions .button {
  min-height: 34px;
  padding: 6px 14px;
  font-size: 12px;
}

.nav-toggle {
  display: none;
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 8px;
  border-radius: 8px;
}

.nav-toggle svg {
  width: 18px;
  height: 18px;
}

.mobile-nav {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 8px 24px 16px;
  border-top: 1px solid #edf0f3;
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a {
  display: block;
  padding: 9px 10px;
  border-radius: 6px;
  color: #536170;
  font-size: 14px;
}

.mobile-nav a.active,
.mobile-nav a:hover {
  background: #edf4ff;
  color: #2459b5;
}

.mobile-auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #edf0f3;
}

.mobile-auth button {
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 13px;
}

/* 首页主视觉使用真实建站画面，文字直接叠放在图片上。 */

.hero {
  position: relative;
  display: block;
  min-height: 330px;
  overflow: hidden;
  padding: 0;
  border-bottom: 1px solid #dfe7ee;
  background: #f2f7f8;
}

.hero::before,
.hero::after {
  display: none;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(247, 250, 251, 0.78);
}

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 330px;
}

.hero-copy {
  max-width: 670px;
  padding: 40px 0;
}

.hero-eyebrow {
  padding: 5px 11px;
  border-color: #cfe1dc;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #116a56;
  font-size: 12px;
  box-shadow: 0 1px 2px rgba(15, 38, 34, 0.05);
}

.hero-eyebrow::before {
  background: #2f62d0;
}

.hero h1 {
  max-width: 670px;
  margin-top: 14px;
  color: #0b1726;
  font-size: 36px;
  line-height: 1.18;
}

.hero-gradient {
  color: #2f62d0;
}

.hero p {
  max-width: 620px;
  margin-top: 18px;
  color: #4f6071;
  font-size: 16px;
  line-height: 1.75;
}

.hero .cta-row {
  margin-top: 26px;
}

.hero .button {
  min-height: 42px;
  padding: 9px 20px;
  box-shadow: 0 4px 14px rgba(15, 48, 93, 0.08);
}

.hero .button.primary::after {
  content: "→";
}

/* 首页与列表页使用整宽分区，避免卡片套卡片。 */

.section {
  margin: 0;
  padding: 54px 0;
  background: #ffffff;
}

.section-tint {
  border-top: 1px solid #edf0f3;
  border-bottom: 1px solid #edf0f3;
  background: #f7f9fb;
}

.section-head {
  align-items: flex-end;
  margin-bottom: 26px;
}

.section h2,
.section-head h2 {
  color: #101c2a;
  font-size: 22px;
  line-height: 1.3;
}

.section-head p {
  max-width: 700px;
  margin-top: 6px;
  color: #697887;
  font-size: 14px;
}

.section-more {
  flex: 0 0 auto;
  color: #2f62d0;
  font-size: 13px;
  font-weight: 650;
}

.section-more:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.list.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.article,
.card,
.panel,
.form-card {
  border-color: #e5eaf0;
  border-radius: 8px;
  box-shadow: none;
}

.article::before,
.card::before {
  display: none;
}

.article:hover,
.card:hover {
  border-color: #cfd9e5;
  box-shadow: 0 10px 24px rgba(14, 31, 53, 0.08);
  transform: translateY(-2px);
}

.article-cover {
  border-color: #edf0f3;
  border-radius: 8px 8px 0 0;
  background: #edf2f5;
}

.article-cover img {
  aspect-ratio: 2.35 / 1;
}

.article:hover .article-cover img {
  transform: scale(1.035);
}

.article-badges {
  top: 9px;
  left: 9px;
}

.article-badge {
  min-height: 22px;
  padding: 3px 8px;
  border: 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 8px rgba(18, 30, 48, 0.10);
  color: #2459b5;
  font-size: 10.5px;
}

.article-badge.tone-teal,
.article-badge.tone-emerald {
  color: #087b56;
}

.article-badge.tone-amber {
  color: #94620c;
}

.article-badge.tone-violet,
.article-badge.tone-indigo {
  color: #6650b8;
}

.article-badge.tone-rose,
.article-badge.member {
  color: #a7443b;
}

.article-content {
  min-height: 90px;
  gap: 7px;
  padding: 13px 14px 14px;
}

.article h2 {
  color: #172333;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.article-excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #697887;
  font-size: 12.5px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.article-date {
  align-self: end;
  color: #8a96a2;
  font-size: 11.5px;
}

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

.channel-card {
  display: flex;
  gap: 12px;
  min-height: 112px;
  padding: 16px;
  border: 1px solid #e4e9ef;
  border-radius: 8px;
  background: #ffffff;
  transition: border-color 0.16s, box-shadow 0.16s, transform 0.16s;
}

.channel-card:hover {
  border-color: #cbd7e3;
  box-shadow: 0 8px 20px rgba(14, 31, 53, 0.07);
  transform: translateY(-2px);
}

.channel-icon,
.tag-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #edf4ff;
  color: #2f62d0;
}

.channel-icon .ui-icon {
  width: 19px;
  height: 19px;
}

.tone-teal,
.tone-emerald {
  background: #e8f6f0;
  color: #087b56;
}

.tone-amber {
  background: #fff4d9;
  color: #94620c;
}

.tone-violet,
.tone-indigo {
  background: #f0ecff;
  color: #6650b8;
}

.tone-cyan {
  background: #e8f7f8;
  color: #087f8c;
}

.tone-rose {
  background: #fff0ec;
  color: #a7443b;
}

.channel-body {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.channel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #172333;
  font-size: 14px;
  font-weight: 700;
}

.channel-title em {
  color: #8a96a2;
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.channel-desc {
  display: -webkit-box;
  overflow: hidden;
  color: #697887;
  font-size: 12.5px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.resource-card {
  min-height: 150px;
  padding: 18px;
  border: 1px solid #e4e9ef;
  border-radius: 8px;
  background: #ffffff;
}

.resource-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 13px;
  color: #172333;
  font-size: 14px;
}

.resource-head > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: #e9f4ef;
  color: #116a56;
}

.resource-head .ui-icon {
  width: 17px;
  height: 17px;
}

.resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 13px;
}

.resource-links a {
  color: #2f62d0;
  font-size: 12.5px;
}

.resource-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.resource-note {
  margin: 12px 0 0;
  color: #7a8794;
  font-size: 11.5px;
}

.tag-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}

.tag-tile {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-height: 116px;
  padding: 14px 10px;
  border: 1px solid #e4e9ef;
  border-radius: 8px;
  background: #ffffff;
  text-align: center;
  transition: border-color 0.16s, box-shadow 0.16s, transform 0.16s;
}

.tag-tile:hover {
  border-color: #cbd7e3;
  box-shadow: 0 8px 18px rgba(14, 31, 53, 0.06);
  transform: translateY(-2px);
}

.tag-icon {
  width: 38px;
  height: 38px;
  font-size: 17px;
  font-weight: 750;
}

.tag-name {
  max-width: 100%;
  overflow: hidden;
  color: #273344;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-count {
  color: #8a96a2;
  font-size: 11px;
}

.cta-band {
  padding: 48px 0;
  border-top: 1px solid #d8e2ec;
  border-bottom: 1px solid #d8e2ec;
  background: #eaf1fb;
}

.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cta-band h2 {
  margin: 0;
  color: #10213b;
  font-size: 21px;
}

.cta-band p {
  max-width: 720px;
  margin: 7px 0 0;
  color: #566a82;
  font-size: 14px;
}

.button.ghost {
  border-color: #b9c9dd;
  background: transparent;
}

/* 频道、搜索、详情与静态页。 */

.page-head {
  margin: 0;
  padding: 42px 0 34px;
  border-bottom: 1px solid #e2e8ef;
  background: #f7f9fb;
}

.page-head-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.page-head h1 {
  color: #101c2a;
  font-size: 30px;
  line-height: 1.3;
}

.post-head h1 {
  max-width: 820px;
  font-size: 28px;
}

.page-head p {
  max-width: 760px;
  margin-top: 9px;
  color: #697887;
  font-size: 14.5px;
}

.page-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid #d9e2eb;
  border-radius: 999px;
  background: #ffffff;
  color: #697887;
  font-size: 12px;
  white-space: nowrap;
}

.channel-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5eaf0;
  scrollbar-width: none;
}

.channel-tabs::-webkit-scrollbar {
  display: none;
}

.channel-tabs a {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 6px;
  color: #647281;
  font-size: 13px;
}

.channel-tabs a:hover {
  background: #f2f5f8;
  color: #172333;
}

.channel-tabs a.active {
  background: #edf4ff;
  color: #2459b5;
  font-weight: 700;
}

/* 内容页顶部标签条：替代原来的频道页大标题区块。 */

.content-tabbar {
  border-bottom: 1px solid #e5eaf0;
  background: #fff;
}

.content-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 12px 0;
  scrollbar-width: none;
}

.content-tabs::-webkit-scrollbar {
  display: none;
}

.content-tabs a {
  flex: 0 0 auto;
  padding: 7px 13px;
  border-radius: 999px;
  color: #647281;
  font-size: 13.5px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.content-tabs a:hover {
  background: #f2f5f8;
  color: #172333;
}

.content-tabs a.active {
  background: #edf4ff;
  color: #2459b5;
  font-weight: 700;
}

.content-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: #647281;
  font-size: 13px;
}

.content-filter strong {
  padding: 4px 10px;
  border-radius: 999px;
  background: #edf4ff;
  color: #2459b5;
  font-size: 12.5px;
}

.content-filter a {
  color: #2f62d0;
  font-weight: 650;
}

.content-filter a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 视觉上隐藏但保留给搜索引擎和读屏软件的标题。 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.content-shell {
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 36px;
}

.post-cover {
  max-width: 860px;
  margin-bottom: 32px;
  border-radius: 8px;
}

.prose {
  max-width: 760px;
  color: #273344;
  font-size: 16px;
  line-height: 1.85;
}

.prose h1 {
  font-size: 24px;
}

.prose h2 {
  font-size: 20px;
}

.prose h3 {
  font-size: 17px;
}

.aside {
  top: 88px;
}

.aside > .panel {
  border-left-width: 1px;
}

.search-box {
  max-width: 820px;
  margin: 0 auto 18px;
}

.search-meta {
  margin: 0 0 20px;
  color: #697887;
  font-size: 13px;
}

.grid {
  gap: 16px;
}

.card {
  min-height: 128px;
  padding: 18px;
}

.card .tagline {
  border-radius: 6px;
}

.auth-card {
  margin-top: 28px;
  margin-bottom: 28px;
}

/* 多栏站点页脚。 */

.site-footer {
  border-top: 1px solid #e3e8ee;
  background: #f7f9fb;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  gap: 44px;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 46px 24px 38px;
}

.footer-col h3 {
  margin: 0 0 14px;
  color: #172333;
  font-size: 13px;
}

.footer-col p {
  margin: 0;
  color: #697887;
  font-size: 12.5px;
  line-height: 1.7;
}

.footer-more {
  display: inline-block;
  margin-top: 12px;
  color: #2f62d0;
  font-size: 12.5px;
}

.footer-links,
.footer-social {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a,
.footer-social a {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #647281;
  font-size: 12.5px;
}

.footer-links a:hover,
.footer-social a:hover,
.footer-more:hover {
  color: #2459b5;
}

.footer-links a > span {
  color: #2f62d0;
}

.footer-social {
  margin-top: 12px;
}

.footer-social a > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  color: #116a56;
}

.footer-social .ui-icon {
  width: 15px;
  height: 15px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 16px 24px;
  border-top: 1px solid #e3e8ee;
  color: #8a96a2;
  font-size: 11.5px;
}

.site-footer .footer-nav {
  display: flex;
  gap: 16px;
}

.site-footer .footer-nav a {
  color: #7c8996;
}

.site-footer .footer-nav a:hover {
  color: #2459b5;
}

@media (max-width: 1000px) {
  .topbar-inner {
    gap: 14px;
  }

  .topnav a {
    padding-right: 7px;
    padding-left: 7px;
    font-size: 12.5px;
  }

  .search-trigger span {
    display: none;
  }

  .search-trigger {
    width: 34px;
    justify-content: center;
    padding: 7px;
  }

  .list,
  .list.cols-4,
  .list.cols-3,
  .channel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .shell {
    padding-right: 16px;
    padding-left: 16px;
  }

  .shell-block {
    padding-top: 24px;
    padding-bottom: 44px;
  }

  .topbar-inner {
    min-height: 58px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .topnav,
  .search-trigger {
    display: none;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .topbar-actions .actions {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .mobile-nav {
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero,
  .hero-inner {
    min-height: 300px;
  }

  .hero-media::after {
    background: rgba(247, 250, 251, 0.84);
  }

  .hero-media img {
    object-position: 58% center;
  }

  .hero-copy {
    max-width: 100%;
    padding: 34px 0;
  }

  .hero h1 {
    font-size: 28px;
    line-height: 1.22;
  }

  .hero p {
    font-size: 15px;
  }

  .hero .cta-row {
    align-items: stretch;
  }

  .hero .button {
    flex: 1 1 150px;
  }

  .section {
    padding: 42px 0;
  }

  .section-head {
    display: flex;
    align-items: flex-end;
    grid-template-columns: none;
  }

  .section h2,
  .section-head h2 {
    font-size: 19px;
  }

  .section-head p {
    font-size: 13px;
  }

  .section-more {
    max-width: 110px;
    text-align: right;
  }

  .list,
  .list.cols-4,
  .list.cols-3 {
    grid-template-columns: 1fr;
  }

  .channel-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .channel-card {
    min-height: 98px;
  }

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

  .tag-tile {
    min-height: 108px;
  }

  .page-head {
    padding: 32px 0 28px;
  }

  .page-head-inner {
    display: grid;
    align-items: start;
    gap: 16px;
  }

  .page-head h1,
  .post-head h1 {
    font-size: 25px;
  }

  .page-head-actions {
    justify-content: flex-start;
  }

  .content-shell {
    grid-template-columns: 1fr;
  }

  .aside {
    position: static;
  }

  .cta-band-inner,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 38px 16px 30px;
  }

  .footer-bottom {
    padding: 15px 16px 20px;
  }
}

@layer legacy {

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

::selection {
  background: var(--tech-tint);
}

/* ---------- 顶栏 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  width: min(1200px, 100%);
  min-height: 62px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  display: inline-flex;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 0 0 3px var(--tech-tint);
}

.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--ink);
}

.brand-text small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.topnav::-webkit-scrollbar {
  display: none;
}

.topnav a {
  padding: 7px 11px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
}

.topnav a:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.topnav a.active {
  color: var(--tech-strong);
  font-weight: 650;
  background: var(--tech-tint);
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.account-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.25;
}

.account-summary strong {
  font-size: 13px;
  font-weight: 650;
}

.account-summary small {
  color: var(--muted);
  font-size: 11px;
}

/* ---------- 按钮 ---------- */

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.button:hover,
button:hover {
  border-color: var(--tech);
  color: var(--tech-strong);
}

.button.primary,
button.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.button.primary:hover,
button.primary:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  color: #fff;
}

.button.subtle,
button.subtle {
  border-color: transparent;
  background: var(--surface-2);
}

.button.subtle:hover,
button.subtle:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.button.danger,
button.danger {
  border-color: #efc9bd;
  color: var(--danger);
}

.button.danger:hover,
button.danger:hover {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
}

/* ---------- 布局 ---------- */

.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px;
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 36px 24px 72px;
}

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

.admin-layout {
  width: min(1200px, 100%);
  padding-top: 28px;
}

main {
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 130px);
  overflow: auto;
  padding: 4px 0;
}

.sidebar h3 {
  margin: 22px 12px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: uppercase;
  opacity: 0.8;
}

.sidebar h3:first-child {
  margin-top: 6px;
}

.sidebar a {
  display: block;
  padding: 7px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.sidebar a:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.sidebar a.active {
  background: var(--blue-tint);
  color: var(--blue-strong);
  font-weight: 650;
}

.mobile-toggle {
  display: none;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  margin-top: 64px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.footer-nav {
  display: flex;
  gap: 18px;
}

.footer-nav a {
  color: var(--muted);
  transition: color 0.15s;
}

.footer-nav a:hover {
  color: var(--tech);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: clip;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 48px;
  align-items: center;
  padding: 76px 8px 60px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -60px -80px 0;
  z-index: -1;
  pointer-events: none;
  border-top: 1px solid #d4e9ea;
  border-bottom: 1px solid #d4e9ea;
  background: var(--surface-tech);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid rgba(8, 127, 140, 0.30);
  background: var(--surface);
  color: var(--tech-strong);
  font-size: 12.5px;
  font-weight: 650;
}

.hero-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.hero h1 {
  margin: 22px 0 0;
  max-width: 720px;
  font-size: clamp(34px, 4.6vw, 54px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: 0;
  color: var(--ink);
}

.hl-brand {
  color: var(--brand);
}

.hl-accent {
  color: var(--blue);
  border-bottom: 3px solid rgba(47, 98, 208, 0.24);
  padding: 0 1px 2px;
}

.hero p {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.hero .cta-row {
  margin-top: 30px;
}

.hero .button.primary::after {
  content: "→";
  margin-left: 2px;
  transition: transform 0.15s;
}

.hero .button.primary:hover::after {
  transform: translateX(3px);
}

.hero-stats {
  display: grid;
  gap: 12px;
  margin: 0;
}

.hero-stat {
  --stat-accent: var(--brand);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.hero-stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--stat-accent);
}

.hero-stat:nth-child(1) {
  background: var(--brand-tint);
}

.hero-stat:nth-child(2) {
  --stat-accent: var(--tech);
  background: var(--tech-tint);
}

.hero-stat:nth-child(3) {
  --stat-accent: var(--blue);
  background: var(--blue-tint);
}

.hero-stat b {
  font-size: 24px;
  font-weight: 800;
  color: var(--stat-accent);
  letter-spacing: 0;
}

.hero-stat span {
  color: var(--muted);
  font-size: 13px;
}

/* ---------- 区块标题 ---------- */

.section {
  margin-top: 64px;
}

.section-head,
.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: 0;
}

.section-head p {
  margin: 6px 0 0;
}

.page-head {
  padding-top: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0;
}

.post-head h1 {
  font-size: clamp(23px, 2.4vw, 30px);
}

.page-head p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15.5px;
}

.post-head p {
  font-size: 15px;
}

.section-head p,
.muted {
  color: var(--muted);
}

/* ---------- 卡片与网格 ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

.card,
.article,
.panel,
.admin-shell,
.form-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-lg);
}

.card,
.article {
  --card-accent: var(--brand);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.card::before,
.article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--card-accent);
}

.card:nth-child(4n + 2),
.article:nth-child(4n + 2) {
  --card-accent: var(--tech);
}

.card:nth-child(4n + 3),
.article:nth-child(4n + 3) {
  --card-accent: var(--blue);
}

.card:nth-child(4n + 4),
.article:nth-child(4n + 4) {
  --card-accent: var(--accent);
}

.card:hover,
.article:hover {
  border-color: var(--card-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 140px;
  padding: 22px;
}

.card h3,
.article h2,
.article h3 {
  margin: 0;
  line-height: 1.35;
}

.card h3 {
  font-size: 16px;
  font-weight: 700;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.card .button,
.card .cta-row {
  margin-top: auto;
}

.tagline,
.pill,
.status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
}

.tagline {
  padding: 4px 11px;
  background: var(--brand-tint);
  color: var(--brand);
}

.card:nth-child(4n + 2) .tagline {
  background: var(--tech-tint);
  color: var(--tech-strong);
}

.card:nth-child(4n + 3) .tagline {
  background: var(--blue-tint);
  color: var(--blue-strong);
}

.card:nth-child(4n + 4) .tagline {
  background: var(--accent-tint);
  color: var(--accent);
}

.pill,
.status {
  padding: 3px 10px;
  background: var(--surface-2);
  color: var(--muted);
}

a.pill {
  transition: background 0.15s, color 0.15s;
}

a.pill:hover {
  background: var(--blue-tint);
  color: var(--blue-strong);
}

.status.published {
  background: var(--brand-tint);
  color: var(--brand-strong);
}

.status.draft {
  background: var(--warn-bg);
  color: var(--warn);
}

/* ---------- 文章列表 ---------- */

.list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.article {
  display: block;
  min-height: 0;
  padding: 0;
}

.article-link {
  display: block;
  height: 100%;
}

.article-cover {
  position: relative;
  display: block;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--tech-tint);
}

.article-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 2.35 / 1;
  object-fit: cover;
  transition: transform 0.24s ease;
}

.article:hover .article-cover img {
  transform: scale(1.015);
}

.article-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
}

.article-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 12px rgba(19, 30, 51, 0.12);
  color: var(--card-accent);
  font-size: 11.5px;
  font-weight: 700;
}

.article-badge.member {
  color: var(--accent);
}

.article-badge.source {
  background: rgba(226, 248, 239, 0.95);
  color: var(--tech-strong);
}

.article-content {
  display: grid;
  align-content: space-between;
  gap: 8px;
  min-height: 78px;
  padding: 12px 14px 14px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12.5px;
}

.article h2 {
  display: -webkit-box;
  overflow: hidden;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.article-date {
  justify-self: end;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- 文章详情 ---------- */

.content-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
}

.post-cover {
  overflow: hidden;
  margin: 0 0 28px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--radius-lg);
}

.post-cover img {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: cover;
}

.prose {
  font-size: 16px;
  line-height: 1.8;
}

.prose h1,
.prose h2,
.prose h3 {
  margin: 34px 0 14px;
  line-height: 1.3;
  letter-spacing: 0;
}

.prose h1:first-child,
.prose h2:first-child,
.prose h3:first-child,
.prose p:first-child {
  margin-top: 0;
}

.prose h1 {
  font-size: 25px;
}

.prose h2 {
  font-size: 21px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.prose h3 {
  font-size: 18px;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote {
  margin: 0 0 18px;
}

.prose a {
  color: var(--blue-strong);
  font-weight: 550;
  text-decoration: underline;
  text-decoration-color: rgba(47, 98, 208, 0.34);
  text-underline-offset: 3px;
}

.prose a:hover {
  text-decoration-color: var(--blue);
}

.prose ul,
.prose ol {
  padding-left: 24px;
}

.prose li {
  margin: 6px 0;
}

.prose blockquote {
  padding: 14px 18px;
  border-left: 3px solid var(--tech);
  background: var(--tech-tint);
  color: var(--muted);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.prose hr {
  margin: 32px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose pre {
  overflow: auto;
  margin: 0 0 20px;
  padding: 16px 18px;
  background: #101828;
  color: #eef2f6;
  border-radius: var(--radius);
  font-size: 13.5px;
  line-height: 1.7;
}

.prose code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.prose :not(pre) > code {
  padding: 2px 7px;
  background: var(--blue-tint);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.88em;
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 24px 0;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--radius);
}

.aside {
  position: sticky;
  top: 96px;
  align-self: start;
  display: grid;
  gap: 16px;
}

.panel {
  padding: 20px;
  background: var(--surface);
}

.aside > .panel {
  --panel-accent: var(--brand);
  border-left: 3px solid var(--panel-accent);
}

.aside > .panel:nth-child(2) {
  --panel-accent: var(--tech);
}

.aside > .panel:nth-child(3) {
  --panel-accent: var(--blue);
}

.panel h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
}

.panel p {
  margin: 0 0 12px;
  font-size: 14px;
}

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

.panel .cta-row {
  margin-top: 12px;
}

/* ---------- 搜索 / 表单 ---------- */

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 26px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--tech);
  box-shadow: 0 0 0 3px var(--tech-ring);
}

textarea {
  min-height: 220px;
  resize: vertical;
  border-radius: var(--radius);
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.markdown-field {
  gap: 8px;
}

.markdown-editor {
  min-height: 460px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 14px;
  line-height: 1.72;
  tab-size: 2;
  white-space: pre-wrap;
}

.image-insert-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.8fr) minmax(220px, 1.4fr) auto minmax(120px, 1fr);
  gap: 10px;
  align-items: center;
}

.upload-status {
  color: var(--muted);
  font-size: 13px;
}

.upload-status.error {
  color: var(--danger);
}

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

.form-grid .wide {
  grid-column: 1 / -1;
}

.form-actions,
.cta-row,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.settings-group {
  margin-top: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.settings-group:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* 设置分组下的补充说明 */
.settings-hint {
  margin: -6px 0 4px;
  font-size: 12.5px;
  line-height: 1.6;
}

.settings-group h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 750;
}

/* ---------- 登录卡片 ---------- */

.auth-card {
  max-width: 480px;
  margin: 72px auto;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.auth-card h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.google-btn:hover {
  border-color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------- 提示 ---------- */

.notice {
  padding: 14px 18px;
  border: 1px solid #c6e4e6;
  border-left: 3px solid var(--tech);
  background: var(--tech-tint);
  border-radius: var(--radius);
  color: var(--tech-strong);
  font-size: 14px;
}

.admin-import-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-import-notice div {
  display: grid;
  gap: 2px;
}

.admin-import-notice strong {
  color: var(--ink);
}

.admin-import-notice .button {
  flex: 0 0 auto;
  background: var(--surface);
}

/* ---------- 管理后台 ---------- */

.admin-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 640px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 12px;
  border-right: 1px solid var(--line);
  background: var(--surface-2);
}

.admin-nav-group {
  margin: 16px 12px 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: uppercase;
  opacity: 0.75;
}

.admin-nav-group:first-child {
  margin-top: 0;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 550;
  transition: background 0.15s, color 0.15s;
}

.admin-nav a svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.admin-nav a:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.admin-nav a.active {
  background: var(--blue-tint);
  color: var(--blue-strong);
  font-weight: 650;
}

.admin-nav a.active svg,
.admin-nav a:hover svg {
  opacity: 1;
}

.admin-logout {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-top: auto;
  padding: 8px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--danger);
  font-size: 13.5px;
  font-weight: 550;
}

.admin-logout:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.admin-main {
  min-width: 0;
  padding: 28px;
}

.admin-main .section-head h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.admin-stat {
  position: relative;
  display: grid;
  gap: 5px;
  align-content: start;
  min-height: 108px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-lg);
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.stat-label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}

.admin-stat[data-tone="teal"] .stat-label::before {
  background: var(--tech);
}

.admin-stat[data-tone="violet"] .stat-label::before {
  background: var(--blue);
}

.admin-stat[data-tone="orange"] .stat-label::before {
  background: var(--accent);
}

.admin-stat strong {
  display: block;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
}

.admin-stat p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.admin-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.chart-panel {
  padding: 20px;
}

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

.panel-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.panel-head .muted {
  font-size: 12.5px;
}

.col-chart {
  display: flex;
  align-items: stretch;
  gap: 12px;
  height: 170px;
}

.col-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.col-value {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.col-bar {
  width: min(38px, 70%);
  border-radius: 6px 6px 2px 2px;
  background: var(--tech);
  opacity: 0.85;
  transition: height 0.4s ease, opacity 0.15s;
}

.col-item:hover .col-bar {
  opacity: 1;
}

.col-label {
  color: var(--muted);
  font-size: 12px;
}

.bar-chart {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
}

.bar-label {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
  transition: width 0.4s ease;
}

.bar-count {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  text-align: right;
}

.table-panel {
  padding: 20px;
}

.table-panel .table-wrap {
  border: 0;
  border-radius: 0;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 150px 170px;
  gap: 10px;
  margin-bottom: 16px;
}

.wechat-import {
  display: grid;
  grid-template-columns: minmax(210px, 0.72fr) minmax(0, 1.7fr);
  gap: 24px;
  margin-bottom: 18px;
  padding: 20px;
  border-color: rgba(35, 114, 78, 0.28);
  background:
    linear-gradient(135deg, rgba(231, 246, 238, 0.72), rgba(238, 244, 255, 0.72)),
    var(--surface);
}

.wechat-import-copy {
  display: grid;
  align-content: start;
  gap: 8px;
}

.wechat-import-copy h2 {
  margin: 0;
  font-size: 17px;
}

.wechat-import-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.wechat-import-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.wechat-import-form .wide {
  grid-column: 1 / -1;
}

.wechat-import-submit {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.admin-source-link {
  display: block;
  width: fit-content;
  margin-top: 4px;
  color: var(--tech-strong);
  font-size: 12px;
  font-weight: 650;
}

.admin-toolbar input[type="search"] {
  flex: 1;
  min-width: 200px;
  border-radius: 999px;
  padding: 9px 16px;
}

.admin-toolbar .compact-select {
  width: 100%;
  min-width: 110px;
  border-radius: 999px;
}

.admin-two-col {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.form-panel {
  padding: 20px;
}

.form-stack {
  display: grid;
  gap: 12px;
}

.slug-code {
  padding: 2px 7px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 12px;
  color: var(--muted);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: var(--surface);
}

.table th,
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13.5px;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr {
  transition: background 0.12s;
}

.table tbody tr:hover {
  background: var(--blue-tint);
}

.table th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
}

.admin-post-table th:last-child,
.admin-post-table td:last-child {
  width: 150px;
}

.admin-title-cell {
  min-width: 240px;
  max-width: 360px;
}

.admin-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}

.admin-row-actions .button,
.admin-row-actions button {
  min-width: 58px;
  min-height: 34px;
  padding: 6px 12px;
  font-size: 13px;
}

.admin-user-table td:first-child {
  min-width: 220px;
}

.compact-input {
  min-width: 220px;
  padding: 8px 10px;
}

.compact-select {
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
  min-width: 90px;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1080px) {
  .layout,
  .content-shell {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 56px 4px 44px;
  }

  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-stat {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .admin-shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .admin-charts,
  .admin-two-col,
  .wechat-import {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .aside {
    position: static;
  }

  .grid,
  .grid.two,
  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar-inner {
    gap: 12px;
    min-height: 56px;
    padding: 0 16px;
  }

  .brand-text small {
    display: none;
  }

  .topnav a {
    padding: 6px 9px;
    font-size: 13px;
  }

  .actions {
    display: none;
  }

  .layout {
    padding: 22px 16px 48px;
    gap: 16px;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-nav {
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px;
  }

  .admin-nav a,
  .admin-nav button {
    flex: 0 0 auto;
  }

  .admin-nav-group {
    display: none;
  }

  .admin-logout {
    margin-top: 0;
  }

  .mobile-toggle {
    display: inline-flex;
    width: 100%;
    margin-bottom: 12px;
  }

  .sidebar {
    display: none;
  }

  .sidebar.open {
    display: block;
  }

  .hero {
    padding: 44px 0 36px;
  }

  .hero h1 {
    font-size: 30px;
    line-height: 1.22;
  }

  .hero p {
    margin-top: 16px;
    font-size: 15.5px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hero-stat {
    flex-direction: row;
    align-items: baseline;
    padding: 14px 16px;
  }

  .hero-stat b {
    font-size: 20px;
  }

  .section {
    margin-top: 48px;
  }

  .section h2 {
    font-size: 18px;
  }

  .article h2 {
    font-size: 15px;
  }

  .grid,
  .grid.two,
  .list,
  .admin-stats,
  .form-grid,
  .image-insert-row {
    grid-template-columns: 1fr;
  }

  .wechat-import-form {
    grid-template-columns: 1fr;
  }

  .admin-toolbar {
    grid-template-columns: 1fr;
  }

  .wechat-import-form .wide,
  .wechat-import-submit {
    grid-column: 1;
  }

  .admin-import-notice {
    display: grid;
  }

  .admin-import-notice .button {
    width: fit-content;
  }

  .section-head,
  .page-head,
  .search-box {
    display: grid;
    grid-template-columns: 1fr;
  }

  .auth-card {
    margin: 40px auto;
    padding: 28px 22px;
  }

  .admin-main {
    padding: 20px 16px;
  }

  .table-wrap,
  .table {
    display: block;
    overflow-x: auto;
  }
}

}
