:root {
  --bg: linear-gradient(
    180deg,
    #efedf8 0%,
    #e9eef7 34%,
    #fdfafa 100%
  );
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #2563eb;
  --shadow: 0 8px 30px rgba(17, 24, 39, 0.06);
  --prose: #0f172a;
  --prose-muted: #475569;
  --code-bg: #0b1020;
  --code-border: rgba(255, 255, 255, 0.08);
}

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

html {
  scrollbar-gutter: stable;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* 菜单打开时锁定背景滚动，避免背后页面跟着滚 */
html:has(.site-nav-toggle:checked) {
  overflow: hidden;
}

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.topbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-grid {
  position: relative;
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  align-items: center;
}

/* Mobile menu: checkbox (visually hidden) + hamburger label; open state via :has() */
.site-nav-toggle {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  appearance: none;
}

.nav-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  color: #0f172a;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-menu-btn:hover {
  background: rgba(15, 23, 42, 0.04);
}

.nav-menu-bars {
  width: 18px;
  height: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.nav-menu-bar {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
  transform-origin: center;
}

.header-grid:has(.site-nav-toggle:checked) .nav-menu-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.header-grid:has(.site-nav-toggle:checked) .nav-menu-bar:nth-child(2) {
  opacity: 0;
}

.header-grid:has(.site-nav-toggle:checked) .nav-menu-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.brand {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
}

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

.brand-mark {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.10);
  color: #1d4ed8;
  font-weight: 900;
  font-size: 16px;
}

.brand-mark-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions {
  justify-self: end;
}

.lang-select,
.search-btn {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 0 10px;
  font-size: 14px;
}

.search-btn {
  background: #111827;
  color: #fff;
  font-weight: 600;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: #fff;
  color: #0f172a;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.icon-btn:hover {
  background: rgba(15, 23, 42, 0.04);
}

.search-icon {
  width: 18px;
  height: 18px;
  stroke: #0f172a;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-links {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 14px;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 8px;
}

.nav-center {
  min-height: 58px;
  justify-self: center;
  justify-content: center;
  padding-bottom: 0;
}

.nav-link {
  padding: 8px 10px;
  border-radius: 8px;
  color: #374151;
}

.nav-link.active {
  background: #eff6ff;
  color: #1d4ed8;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 24px;
  margin-top: 24px;
  margin-bottom: 40px;
}

.main-grid-single {
  grid-template-columns: 1fr;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-media {
  height: clamp(200px, 26vw, 340px);
  background: #e5e7eb;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  padding: 16px;
}

.badge {
  display: inline-block;
  font-size: 12px;
  color: #1d4ed8;
  background: #eff6ff;
  border-radius: 999px;
  padding: 4px 10px;
}

.hero-title {
  margin: 12px 0 10px;
  font-size: clamp(18px, 2.5vw, 28px);
  line-height: 1.25;
}

.hero-meta {
  color: var(--muted);
  font-size: 14px;
}

.hero-more-section {
  margin-top: 10px;
}

.hero-more-grid {
  display: grid;
  gap: 26px;
}

.hero-more-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) calc((100% - 36px) / 3);
  gap: 18px;
}

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

.hero-mini-card .post-card-media {
  height: 250px;
  position: relative;
}

.hero-mini-card .post-card-content {
  padding: 14px;
}

.hero-mini-card h3 {
  margin: 8px 0 10px;
  font-size: 24px;
  line-height: 1.25;
}

.hero-mini-meta {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hero-mini-desc {
  margin: 0 0 14px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.65;
}

.hero-mini-read {
  color: #0ea5a4;
  font-weight: 700;
}

.hero-mini-card-sm .post-card-media {
  height: 180px;
}

.hero-mini-card-sm h3 {
  font-size: 19px;
}

.section {
  margin-top: 24px;
}

.section-title-row h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

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

.post-card,
.list-item,
.side-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.post-card-media {
  height: 190px;
  background: #ffffff;
}

.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.post-card-content {
  padding: 12px;
}

.post-card h3 {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.4;
}

.list-stack {
  display: grid;
  gap: 10px;
}

.list-item {
  display: grid;
  grid-template-columns: 150px 1fr;
}

.list-item-media {
  height: 160px;
  background: #e5e7eb;
}

.list-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-item-content {
  padding: 12px;
}

.list-item h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

.list-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.load-more {
  display: block;
  width: 100%;
  margin-top: 12px;
  min-height: 44px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

.sidebar-col {
  display: grid;
  align-content: start;
  gap: 14px;
}

.side-box {
  padding: 14px;
}

.side-box h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

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

.category-list a {
  display: block;
  padding: 8px 0;
  color: #374151;
  border-bottom: 1px dashed var(--border);
}

.popular-list {
  display: grid;
  gap: 10px;
}

.popular-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: background 140ms ease-out, border-color 140ms ease-out, transform 140ms ease-out;
}

.popular-item img {
  width: 74px;
  height: 74px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
  object-fit: contain;
  padding: 8px;
  border: 1px solid rgba(226, 232, 240, 0.95);
}

.popular-item h4 {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: #0f172a;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.popular-item:hover {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(226, 232, 240, 0.95);
  transform: translateY(-1px);
}

.popular-item:active {
  transform: translateY(0);
}

.side-box h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.side-box h3::after {
  content: "";
  height: 1px;
  flex: 1;
  margin-left: 12px;
  background: linear-gradient(90deg, rgba(226, 232, 240, 0.2), rgba(148, 163, 184, 0.65), rgba(226, 232, 240, 0.2));
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #fff;
  margin-top: auto;
}

.post-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.post-head {
  padding: 18px 18px 8px;
}

.post-title {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.post-actions {
  margin-top: 12px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #1d4ed8;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

.download-btn:hover {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
}

.post-meta {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.meta-item {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.meta-icon {
  opacity: 0.9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.meta-icon-svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.meta-link {
  color: #b45309;
  font-weight: 700;
}

.post-body {
  padding: 14px 18px 18px;
  border-top: 1px solid var(--border);
}

.list-plain {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #1d4ed8;
}

.md-content h1,
.md-content h2,
.md-content h3,
.md-content h4,
.md-content h5,
.md-content h6 {
  margin: 22px 0 10px;
  line-height: 1.25;
  color: var(--prose);
}

.md-content h1 {
  font-size: 24px;
}
.md-content h2 {
  font-size: 20px;
}
.md-content h3 {
  font-size: 17px;
}

.md-content p {
  margin: 0 0 14px;
  color: var(--prose);
  font-size: 16px;
  line-height: 1.8;
  word-break: break-word;
}

.md-content a {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(29, 78, 216, 0.35);
}

.md-content a:hover {
  text-decoration-color: rgba(29, 78, 216, 0.75);
}

.md-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.92em;
  padding: 0.12em 0.35em;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.md-content ul,
.md-content ol {
  margin: 0 0 14px 20px;
  padding: 0;
}

.md-content li {
  margin: 6px 0;
  line-height: 1.7;
}

.md-content blockquote {
  margin: 14px 0;
  padding: 10px 12px;
  border-left: 4px solid rgba(37, 99, 235, 0.55);
  background: #f8fafc;
  color: var(--prose-muted);
  border-radius: 10px;
}

.md-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

.code-block {
  margin: 14px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--code-bg);
  color: #e5e7eb;
}

.code-lang {
  padding: 8px 12px;
  font-size: 12px;
  color: rgba(229, 231, 235, 0.85);
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid var(--code-border);
}

.code-block pre {
  margin: 0;
  padding: 12px;
  overflow: auto;
}

.code-block code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
  padding: 0;
  border: none;
  background: transparent;
}

/* Avoid overriding markdown typography inside .md-content */
.post-body > p {
  margin: 0 0 16px;
  color: #111827;
  font-size: 18px;
  line-height: 1.9;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.table-wrap th,
.table-wrap td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  vertical-align: top;
  font-size: 14px;
  line-height: 1.55;
  color: var(--prose);
}

.table-wrap th {
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  font-weight: 800;
  letter-spacing: 0.01em;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.table-wrap tbody tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.55);
}

.table-wrap tbody tr:hover td {
  background: rgba(37, 99, 235, 0.06);
}

.table-wrap td {
  white-space: nowrap;
}

.table-wrap td:first-child,
.table-wrap th:first-child {
  white-space: normal;
  min-width: 160px;
}

/* Right-align numeric-looking cells for readability */
.table-wrap td:has(> :is(code, strong)) {
  white-space: normal;
}

.table-wrap td:nth-child(n + 2) {
  font-variant-numeric: tabular-nums;
}

/* Softer scrollbars (Chromium/WebKit) */
.table-wrap::-webkit-scrollbar {
  height: 10px;
}
.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.6);
  border-radius: 999px;
}
.table-wrap::-webkit-scrollbar-track {
  background: rgba(226, 232, 240, 0.65);
  border-radius: 999px;
}

.post-figure {
  margin: 18px 0;
}

.post-figure img {
  border-radius: 14px;
  border: 1px solid var(--border);
}

.post-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}

.pager-card {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 6px;
}

.pager-kicker {
  font-size: 12px;
  letter-spacing: 0.06em;
  font-weight: 800;
  color: #6b7280;
}

.pager-title {
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.related-section {
  margin-top: 22px;
}

.related-title {
  letter-spacing: 0.1em;
  font-weight: 900;
  font-size: 18px;
}

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

.related-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: grid;
}

.related-media {
  aspect-ratio: 16 / 9;
  background: #e5e7eb;
}

.related-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-content {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.related-cat {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #b45309;
}

.related-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.related-author {
  justify-self: start;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* Recommended Reports + footer: narrow viewports (matches mobile header breakpoint) */
@media (max-width: 960px) {
  .related-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Footer: stacked, centered, breathable — avoids cramped wrap & bottom edge clipping */
  .site-footer {
    padding-top: 8px;
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 16px;
    min-height: unset;
    padding: 8px 12px 4px;
  }

  .copyright {
    font-size: 12px;
    line-height: 1.55;
    max-width: 36em;
    text-wrap: balance;
  }

  .footer-nav {
    justify-content: center;
    flex-wrap: wrap;
    row-gap: 10px;
    column-gap: 8px;
    max-width: 100%;
  }

  .footer-nav a {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(241, 245, 249, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.95);
  }

  .footer-nav a:hover {
    background: rgba(239, 246, 255, 0.95);
    border-color: rgba(191, 219, 254, 0.9);
  }
}

.footer-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 18px 0;
}

.copyright {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #64748b;
}

.footer-nav {
  display: flex;
  gap: 12px;
  color: #4b5563;
  flex-shrink: 0;
}

.footer-nav a {
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
}

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

.category-shell {
  background: transparent;
}

.category-head {
  text-align: center;
  margin-bottom: 22px;
}

.category-head h1 {
  margin: 0 0 6px;
  font-size: 26px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

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

.article-card {
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.95);
  transition: transform 160ms ease-out, box-shadow 160ms ease-out, border-color 160ms ease-out;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  border-color: rgba(148, 163, 184, 0.9);
}

.article-card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #ffffff;
}

.article-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.article-card-body {
  padding: 16px 18px 14px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.article-card-meta {
  display: flex;
  justify-content: flex-start;
}

.article-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #ecfdf3;
  color: #166534;
}

.article-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: #0f172a;
}

.article-card-desc {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.article-card-footer {
  margin-top: 4px;
  display: flex;
  justify-content: flex-end;
}

.article-card-link {
  font-size: 13px;
  font-weight: 600;
  color: #1d4ed8;
}

.article-card-link::after {
  content: "";
}

.category-showcase {
  margin-top: 36px;
}

.showcase-head {
  text-align: center;
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.showcase-head h2 {
  margin: 0;
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.showcase-head p {
  margin: 0;
  color: #6b7280;
  font-size: 16px;
}

.showcase-btn {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  border: 1px solid #1d4ed8;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.showcase-btn:hover {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
  transform: translateY(-1px);
}

.showcase-btn:active {
  transform: translateY(0);
}

.showcase-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 20px;
}

/* Home page visual enrichment */
.home-page {
  background: var(--bg);
}

.home-page .hero-more-section {
  margin-top: 16px;
}

.home-page .hero-more-grid {
  gap: 30px;
}

.home-page .hero-mini-card {
  border-color: rgba(203, 213, 225, 0.95);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.home-page .hero-mini-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.13);
  border-color: rgba(147, 197, 253, 0.9);
}

.home-page .hero-mini-card .post-card-content {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, #ffffff 100%);
}

.home-page .hero-mini-card .badge {
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.home-page .hero-mini-read {
  color: #0284c7;
}

.home-page .category-showcase {
  margin-top: 44px;
}

.home-page .showcase-head {
  gap: 8px;
  margin-bottom: 16px;
}

.home-page .showcase-head h2 {
  font-size: clamp(30px, 4.2vw, 46px);
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #0f172a 0%, #1d4ed8 55%, #0f172a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-page .showcase-head p {
  max-width: 820px;
  margin: 0 auto;
}

.home-page .showcase-panel {
  border-color: rgba(203, 213, 225, 0.9);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.9) 100%),
    #fff;
}

.home-page .article-card {
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.home-page .article-card:hover {
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.14);
}

.home-page .article-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-page .article-card-desc {
  font-size: 12px;
  letter-spacing: 0.02em;
}

/* Align legacy legal pages to site container width */
body.legal-page .page {
  margin-top: 24px;
  margin-bottom: 40px;
}

body.legal-page .page > .wrap,
body.legal-page .page .wrap.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

body.legal-page .page-content-container {
  display: block;
}

body.legal-page .page-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px;
}

body.legal-page .page-content h1 {
  margin: 0 0 14px;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.15;
}

.search-shell {
  display: grid;
  gap: 16px;
}

.search-head h1 {
  margin: 0 0 6px;
  font-size: 32px;
}

.search-head p {
  margin: 0;
  color: #6b7280;
}

.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.search-input {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #fff;
  padding: 0 14px;
  font-size: 15px;
}

.search-submit {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid #1d4ed8;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.search-summary {
  margin: 0;
  color: #475569;
  font-size: 14px;
}

@media (max-width: 960px) {
  .main-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-col {
    order: 2;
  }

  .header-grid {
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand actions";
    row-gap: 0;
    padding-bottom: 0;
  }

  .brand-inline {
    grid-area: brand;
  }

  .header-actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
  }

  .nav-menu-btn {
    display: inline-grid;
  }

  .nav-center {
    /* 浮在正文上方，不撑开 header，避免整页上下位移 */
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 30;
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: 0 !important;
    white-space: normal;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    padding: 0 4px;
    margin: 0;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid transparent;
    box-shadow: none;
    transition:
      max-height 0.28s ease,
      opacity 0.22s ease,
      padding 0.22s ease,
      border-color 0.22s ease,
      box-shadow 0.22s ease;
  }

  .header-grid:has(.site-nav-toggle:checked) .nav-center {
    max-height: 320px;
    opacity: 1;
    pointer-events: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    border-bottom-color: rgba(226, 232, 240, 0.95);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  }

  .site-header:has(.site-nav-toggle:checked) {
    z-index: 40;
  }

  .nav-center .nav-link {
    width: 100%;
    text-align: left;
    padding: 12px 12px;
    border-radius: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-menu-bar,
  .nav-center {
    transition: none !important;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(1120px, calc(100% - 20px));
  }

  .topbar {
    min-height: 58px;
  }

  .brand {
    font-size: 20px;
  }

  .lang-select {
    max-width: 120px;
  }

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

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

  .showcase-head h2 {
    font-size: 34px;
  }

  .hero-more-top {
    grid-template-columns: 1fr;
  }

  .hero-more-bottom {
    grid-template-columns: 1fr;
  }

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

  .list-item {
    grid-template-columns: 1fr;
  }

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

  .post-card-media {
    height: 170px;
  }

  .list-item-media {
    height: 180px;
  }
}
