/* ============================================================
   main.css — CSS 聚合入口
   将全局通用样式按模块 @import，所有页面均加载此文件。
   页面专属样式通过 head.ejs 的按路由加载机制额外引入。
============================================================ */

/* ── 1. Design Tokens ── */


/* ── 2. Reset & Base ── */


/* ── 3. Surface Utilities ── */


/* ── 4. Layout ── */





/* ── 5. Components ── */













/* ── 6. Dark Mode ── */


/* Bundled CSS - Do not edit directly */
/* Source: ./base/tokens.css */
/* ============================================================
   DESIGN TOKENS — iOS-inspired
   引用：所有页面（通过 main.css @import）
============================================================ */
:root {
  --accent: #ff6b35;
  --accent-light: #ff8c5a;
  --accent-dark: #e55a24;
  --accent-tint: rgba(255, 107, 53, 0.12);
  --blue: #007aff;
  --blue-tint: rgba(0, 122, 255, 0.12);
  --green: #34c759;
  --yellow: #ff9f0a;

  --surface-1-bg: #ffffff;
  --surface-2-bg: rgba(255, 255, 255, 0.92);
  --surface-3-bg: rgba(236, 236, 241, 0.9);
  --surface-hover: rgba(0, 0, 0, 0.04);

  --surface-border: rgba(60, 60, 67, 0.2);
  --surface-border-2: rgba(60, 60, 67, 0.12);
  --separator: rgba(60, 60, 67, 0.12);

  --surface-shadow-1:
    0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.08), 0 12px 32px rgba(0, 0, 0, 0.1);
  --surface-shadow-2:
    0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0, 0, 0, 0.07), 0 6px 18px rgba(0, 0, 0, 0.08);

  --navbar-bg: rgba(248, 248, 253, 0.92);
  --navbar-height: 64px;
  --tab-bar-height: 56px;

  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  --border-radius: 16px;
  --border-radius-lg: 22px;
  --border-radius-xl: 28px;
  --border-radius-pill: 999px;

  --text-primary: #1c1c1e;
  --text-secondary: rgba(60, 60, 67, 0.6);
  --text-tertiary: rgba(60, 60, 67, 0.4);

  --font-mono: 'SF Mono', 'Fira Code', Consolas, monospace;
}

/* Source: ./base/reset.css */
/* ============================================================
   RESET & BASE
   引用：所有页面（通过 main.css @import）
============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #ebebf0;
  color: var(--text-primary);
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'SF Pro Text',
    'PingFang SC',
    'Hiragino Sans GB',
    'Microsoft YaHei',
    'Helvetica Neue',
    sans-serif;
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
  padding: 0;
  padding-top: var(--navbar-height);
}

a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
}

/* ============================================================
   SCROLLBAR
============================================================ */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 99px;
}

/* ============================================================
   ANIMATIONS
============================================================ */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-fade-in-up {
  animation: fade-in-up 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* Source: ./components/surface.css */
/* ============================================================
   SURFACE UTILITY CLASSES
   引用：所有页面（通过 main.css @import）
============================================================ */
.surface-1 {
  background: var(--surface-1-bg);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: var(--surface-shadow-1);
  transition:
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.surface-2 {
  background: var(--surface-2-bg);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: var(--surface-shadow-2);
}
.surface-3 {
  background: var(--surface-3-bg);
  border: 1px solid var(--surface-border-2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Source: ./layout/container.css */
/* ============================================================
   CONTAINER & PAGE LAYOUT
   引用：所有页面（通过 main.css @import）
============================================================ */
.container {
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}
@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-xl);
  }
}
@media (min-width: 1280px) {
  .container {
    padding: 0 var(--space-2xl);
  }
}

.page-container {
  max-width: 1520px;
  margin: 0 auto;
  padding: 24px 1rem;
  padding-bottom: calc(var(--tab-bar-height) + 24px);
}
@media (min-width: 640px) {
  .page-container {
    padding: 32px 1.5rem;
    padding-bottom: 32px;
  }
}
@media (min-width: 768px) {
  .page-container {
    padding-bottom: 32px;
  }
}
@media (min-width: 1280px) {
  .page-container {
    padding: 32px 3rem;
  }
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}
@media (min-width: 1280px) {
  .article-layout {
    grid-template-columns: 1fr 220px;
  }
}

/* Source: ./layout/navbar.css */
/* ============================================================
   NAVBAR
   引用：所有页面（通过 main.css @import）
============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: var(--navbar-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--surface-border);
  z-index: 1000;
  transition: box-shadow 0.3s;
}
.navbar.scrolled {
  box-shadow: var(--surface-shadow-2);
}

.navbar-inner {
  max-width: 1520px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}
@media (min-width: 640px) {
  .navbar-inner {
    padding: 0 1.5rem;
  }
}
@media (min-width: 1280px) {
  .navbar-inner {
    padding: 0 3rem;
  }
}

.navbar-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}
.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 800;
  background: transparent;
  border: 1px solid var(--surface-border);
  box-shadow: none;
  transition: transform 0.3s;
  overflow: hidden;
}
.logo-icon:has(img) {
  background: transparent;
  border: none;
  box-shadow: none;
}
.navbar-logo-wrap:hover .logo-icon {
  transform: rotate(6deg);
}
.logo-text {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}
@media (max-width: 480px) {
  .logo-text {
    display: inline-block;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.navbar-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 800;
  background: transparent;
  border: 1px solid var(--surface-border);
  box-shadow: none;
  flex-shrink: 0;
  transition: transform 0.3s;
  text-decoration: none;
}
.navbar-logo:has(img) {
  border: none;
}
.navbar-logo:hover {
  transform: rotate(6deg);
}

.navbar-brand {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.navbar-nav {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: 1rem;
}
@media (min-width: 768px) {
  .navbar-nav {
    display: flex;
  }
}

.nav-link {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  transition:
    background 0.15s,
    color 0.15s;
  text-decoration: none;
}
.nav-link:hover {
  background: var(--surface-3-bg);
}
.nav-link.active {
  background: var(--accent-tint);
  color: var(--accent);
}

.navbar-search {
  display: none;
  align-items: center;
  gap: 6px;
  background: var(--surface-3-bg);
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: text;
  transition: border-color 0.2s;
}
@media (min-width: 640px) {
  .navbar-search {
    display: flex;
  }
}
.navbar-search:focus-within {
  border-color: var(--accent);
}
.navbar-search input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  width: 140px;
  color: var(--text-primary);
  font-family: inherit;
}
.navbar-search input::placeholder {
  color: var(--text-tertiary);
}
.navbar-search svg {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.navbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--surface-3-bg);
  border: 1px solid var(--surface-border);
  cursor: pointer;
  font-size: 16px;
}
@media (min-width: 640px) {
  .navbar-search-btn {
    display: none;
  }
}

.navbar-menu-btn {
  display: flex;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: var(--surface-3-bg);
  border: 1px solid var(--surface-border);
  cursor: pointer;
  font-size: 18px;
}
@media (min-width: 768px) {
  .navbar-menu-btn {
    display: none;
  }
}

/* ============================================================
   MOBILE DRAWER
============================================================ */
.mobile-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 10001;
}
.mobile-drawer-overlay.open {
  display: block;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 60vw;
  background: var(--surface-1-bg);
  border-left: 1px solid var(--surface-border);
  z-index: 10002;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
  box-shadow: var(--surface-shadow-1);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-drawer.open {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--surface-border);
}
.mobile-drawer-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}
.mobile-drawer-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex-shrink: 0;
  font-size: 1rem;
}
.mobile-drawer-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mobile-drawer-brand-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mobile-drawer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mobile-drawer-close {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--surface-3-bg);
  border: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-secondary);
  font-family: inherit;
}
.mobile-drawer-close:hover {
  background: var(--surface-hover);
}
.mobile-drawer-nav {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
}
.mobile-drawer-link {
  display: block;
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 6px;
  font-size: 15px;
  border: 1px solid transparent;
  background: var(--surface-2-bg);
}
.mobile-drawer-link:hover {
  background: var(--surface-3-bg);
  border-color: var(--surface-border);
}
.mobile-drawer-link.active {
  background: var(--accent-tint);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--surface-border));
}
.mobile-drawer-link-child {
  padding: 10px 16px 10px 32px;
  font-size: 13px;
  opacity: 0.9;
}

/* ============================================================
   THEME TOGGLE BUTTON
============================================================ */
.theme-toggle-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
  background: var(--surface-3-bg);
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s,
    transform 0.15s;
}
.theme-toggle-btn:hover {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================================
   NAV DROPDOWN
============================================================ */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-trigger {
  cursor: default;
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 160px;
  background: var(--surface-1-bg);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  box-shadow: var(--surface-shadow-1);
  overflow: hidden;
  z-index: 100;
}
.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-item {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s;
}
.nav-dropdown-item:hover {
  background: var(--accent-tint);
  color: var(--accent);
}

/* Source: ./layout/footer.css */
/* ============================================================
   FOOTER
   引用：所有页面（通过 main.css @import）
============================================================ */
.site-footer {
  background: var(--surface-1-bg);
  border-top: 1px solid var(--surface-border);
  margin-top: 64px;
}
.footer-inner {
  max-width: 1520px;
  margin: 0 auto;
  padding: 32px 1rem 24px;
}
@media (min-width: 640px) {
  .footer-inner {
    padding: 32px 1.5rem 24px;
  }
}
@media (min-width: 1280px) {
  .footer-inner {
    padding: 32px 3rem 24px;
  }
}
@media (max-width: 767.98px) {
  .footer-inner {
    padding-bottom: calc(24px + var(--tab-bar-height) + env(safe-area-inset-bottom, 0));
  }
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 24px;
}
@media (min-width: 640px) {
  .footer-grid {
    flex-direction: row;
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 640px) {
  .footer-brand {
    flex: 1;
  }
}

.footer-brand-name {
  font-size: 15px;
  font-weight: 700;
}
.footer-brand-desc {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.6;
}
.footer-run-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-tertiary);
}
.footer-run-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
  background: #34c759;
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.2);
}
.footer-run-badge {
  font-family: monospace;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(52, 199, 89, 0.1);
  color: #34c759;
  font-size: 11px;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (min-width: 640px) {
  .footer-links-grid {
    display: contents;
  }
}

.footer-links-col h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-tertiary);
  margin: 0 0 8px;
}
.footer-links-col a {
  display: block;
  padding: 3px 0;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 16px;
  border-top: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
@media (min-width: 640px) {
  .footer-bottom {
    flex-wrap: nowrap;
  }
}
.footer-copyright {
  font-size: 14px;
  color: var(--text-primary);
}
.footer-powered {
  font-size: 13px;
  color: var(--text-primary);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-3-bg);
  border: 1px solid var(--surface-border);
  display: inline;
}

/* Social links */
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface-3-bg);
  border: 1px solid var(--surface-border);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
}
.footer-social-link:hover {
  background: var(--accent-tint);
  color: var(--accent);
  border-color: var(--accent);
}

/* Source: ./layout/tab-bar.css */
/* ============================================================
   MOBILE TAB BAR
   引用：所有页面（通过 main.css @import）
============================================================ */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  height: var(--tab-bar-height);
  background: var(--navbar-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
@media (min-width: 768px) {
  .tab-bar {
    display: none;
  }
}
.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.tab-item .tab-icon {
  font-size: 20px;
  line-height: 1;
}
.tab-item .tab-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-tertiary);
  transition: color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tab-item.active .tab-icon {
  transform: scale(1.1) translateY(-1px);
}
.tab-item.active .tab-label {
  color: var(--accent);
  font-weight: 600;
}

/* ============================================================
   SCROLL TO TOP BUTTON
============================================================ */
.scroll-top-btn {
  position: fixed;
  bottom: calc(var(--tab-bar-height) + 16px);
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: 1px solid var(--surface-border);
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.3);
  z-index: 9998;
  opacity: 0;
  transform: translateY(10px) scale(0.9);
  transition: all 0.3s;
  font-size: 18px;
  pointer-events: none;
}
.scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}
.scroll-top-btn:hover {
  background: var(--accent-light);
  transform: scale(1.1) translateY(-2px);
}
@media (min-width: 768px) {
  .scroll-top-btn {
    bottom: 24px;
  }
}

/* Source: ./components/badges.css */
/* ============================================================
   BADGES & CHIPS
   引用：所有页面（通过 main.css @import）
============================================================ */
.badge,
.badge-category,
.badge-tag,
.badge-pinned {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  white-space: nowrap;
}

.badge-accent,
.badge-category {
  background: var(--accent-tint);
  color: var(--accent);
  border: 1px solid rgba(255, 107, 53, 0.15);
}
.badge-accent:hover,
.badge-category:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.badge-blue,
.badge-tag {
  background: var(--blue-tint);
  color: var(--blue);
  border: 1px solid rgba(0, 122, 255, 0.15);
}
.badge-blue:hover,
.badge-tag:hover {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  transform: translateY(-1px);
}

.badge-pinned {
  background: rgba(255, 59, 48, 0.08);
  color: #ff3b30;
  border: 1px solid rgba(255, 59, 48, 0.15);
}

/* Tag chip (larger inline variant) */
.tag-chip {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: var(--surface-3-bg);
  border: 1px solid var(--surface-border);
  color: var(--text-secondary);
  text-decoration: none;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}
.tag-chip:hover {
  background: var(--accent-tint);
  color: var(--accent);
  border-color: rgba(255, 107, 53, 0.2);
}

/* Source: ./components/sidebar.css */
/* ============================================================
   SIDEBAR CARDS
   引用：所有有侧边栏的页面（通过 main.css @import）
============================================================ */
.sidebar-card {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  background: var(--surface-1-bg);
  border: 1px solid var(--surface-border);
  box-shadow: var(--surface-shadow-1);
}
.sidebar-card > .sidebar-card-title {
  margin: 0;
  padding: var(--space-lg);
  padding-bottom: var(--space-sm);
}
.sidebar-card > .sidebar-section-header {
  padding: var(--space-md) var(--space-lg);
}
.sidebar-card .tag-cloud {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
}
.sidebar-card .sidebar-list {
  padding: 0 var(--space-lg) var(--space-md);
}

/* Profile card */
.profile-banner {
  height: 80px;
  background: linear-gradient(135deg, var(--accent) 0%, #ff9966 50%, #ffd166 100%);
  position: relative;
}
.profile-avatar-wrap {
  position: absolute;
  bottom: 0;
  left: 20px;
  transform: translateY(50%);
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-1-bg);
  box-shadow: var(--surface-shadow-2);
}
.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  object-fit: cover;
}
.profile-avatar-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
}
.profile-body {
  padding: 40px 20px 20px;
}
.profile-name {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 4px;
}
.profile-bio {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.profile-stats {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--surface-border);
  border-bottom: 1px solid var(--surface-border);
  margin-bottom: 16px;
}
.profile-stat {
  flex: 1;
  text-align: center;
}
.profile-stat-value {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  display: block;
}
.profile-stat-label {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
  display: block;
}
.profile-stat-divider {
  width: 1px;
  height: 28px;
  background: var(--surface-border);
  flex-shrink: 0;
}
.profile-actions,
.profile-links {
  display: flex;
  gap: 8px;
}
.profile-action-btn,
.profile-link-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface-3-bg);
  border: 1px solid var(--surface-border);
  text-decoration: none;
  transition: color 0.2s;
}
.profile-action-btn:hover {
  color: var(--accent);
}

.profile-link-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  background: var(--surface-3-bg);
  border: 1px solid var(--surface-border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.profile-link-btn:hover {
  background: var(--accent-tint);
  color: var(--accent);
  border-color: transparent;
}

/* Profile social links */
.profile-social {
  display: flex;
  gap: 8px;
  margin: 6px 0 12px;
}
.profile-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--surface-3-bg);
  border: 1px solid var(--surface-border);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12px;
  transition: all 0.2s;
}
.profile-social-link:hover {
  background: var(--accent-tint);
  color: var(--accent);
}

/* Sidebar section header / list */
.sidebar-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  line-height: 1;
}
.sidebar-card-title-icon {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.sidebar-section-header {
  padding: 14px 16px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--surface-border);
}
.sidebar-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.sidebar-list li {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--surface-border);
  font-size: 13px;
}
.sidebar-list li:last-child {
  border-bottom: none;
}
.sidebar-list a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
  flex: 1;
}
.sidebar-list a:hover {
  color: var(--accent);
}
.sidebar-list .meta {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* Latest article list */
.latest-article-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  min-height: 44px;
  margin: 6px 0;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition:
    background 0.15s,
    color 0.15s;
}
.latest-article-item:not(:last-child) {
  border-bottom: 1px dashed var(--surface-border);
  padding-bottom: 12px;
}
.latest-article-item:hover {
  background: var(--accent-tint);
}
.latest-article-num {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.num-1 {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
}
.num-2 {
  background: linear-gradient(135deg, #ff9f0a, #ffd60a);
  color: #fff;
}
.num-3 {
  background: linear-gradient(135deg, #34c759, #78e08f);
  color: #fff;
}
.num-other {
  background: var(--surface-3-bg);
  color: var(--text-tertiary);
}
.latest-article-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

/* Countdown widget */
.countdown-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--surface-border);
}
.countdown-item:last-child {
  border-bottom: none;
}
.countdown-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.countdown-percent {
  font-weight: 600;
  color: var(--text-primary);
}
.progress-bar {
  height: 5px;
  background: var(--surface-3-bg);
  border-radius: var(--border-radius-pill);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: var(--border-radius-pill);
  background: linear-gradient(to right, var(--accent), var(--accent-light));
  transition: width 1s;
}
.runtime-badge {
  margin-top: var(--space-sm);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-tertiary);
}
.runtime-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 2px rgba(52, 199, 89, 0.3);
}

/* Tag cloud */
.tag-cloud {
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag-cloud-item {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: var(--surface-3-bg);
  color: var(--text-secondary);
  border: 1px solid var(--surface-border);
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s,
    transform 0.15s;
  text-decoration: none;
}
.tag-cloud-item:hover {
  background: var(--accent-tint);
  color: var(--accent);
  border-color: rgba(255, 107, 53, 0.25);
  transform: translateY(-1px);
}

/* Category count chip */
.cat-count {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-3-bg);
  border: 1px solid var(--surface-border);
  font-size: 11px;
  color: var(--text-tertiary);
}

/* Source: ./components/form-controls.css */
/* ============================================================
   FORM CONTROLS
   引用：所有页面（通过 main.css @import）
============================================================ */
.form-control {
  padding: 10px 16px;
  font-size: 14px;
  border: 1px solid var(--surface-border);
  border-radius: var(--border-radius-pill);
  background: var(--surface-1-bg);
  color: var(--text-primary);
  font-family: inherit;
  transition: border-color 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
}

/* Source: ./components/pagination.css */
/* ============================================================
   PAGINATION
   引用：所有页面（通过 main.css @import）
============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.page-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  background: var(--surface-1-bg);
  border: 1px solid var(--surface-border);
  color: var(--text-primary);
  text-decoration: none;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
  cursor: pointer;
}
.page-btn:hover {
  background: var(--accent-tint);
  color: var(--accent);
  border-color: rgba(255, 107, 53, 0.2);
}
.page-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.page-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Source: ./components/breadcrumb.css */
/* ============================================================
   BREADCRUMB
   引用：所有页面（通过 main.css @import）
============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 20px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.breadcrumb a {
  color: var(--text-tertiary);
  text-decoration: none;
  flex-shrink: 0;
}
.breadcrumb a:hover {
  color: var(--accent);
}
.breadcrumb-sep {
  color: var(--surface-border);
  flex-shrink: 0;
}
.breadcrumb-current {
  color: var(--text-secondary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 767px) {
  .breadcrumb {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--surface-1-bg);
    border: 1px solid var(--surface-border);
    box-shadow: var(--surface-shadow-2);
    font-size: 12px;
    gap: 5px;
  }
  .breadcrumb a,
  .breadcrumb-current {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .breadcrumb-sep {
    opacity: 0.7;
  }
}

/* Source: ./components/flash.css */
/* ============================================================
   FLASH MESSAGES
   引用：所有页面（通过 main.css @import）
============================================================ */
.flash {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.flash-success {
  background: rgba(52, 199, 89, 0.12);
  color: #1a7a3a;
  border: 1px solid rgba(52, 199, 89, 0.25);
}
.flash-error {
  background: rgba(255, 59, 48, 0.1);
  color: #cc2200;
  border: 1px solid rgba(255, 59, 48, 0.2);
}

/* Source: ./components/empty-state.css */
/* ============================================================
   EMPTY STATE
   引用：所有页面（通过 main.css @import）
============================================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--surface-2-bg);
  border: 1px solid var(--surface-border);
  border-radius: 24px;
  color: var(--text-secondary);
}
.empty-state h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
}
.empty-state p {
  font-size: 14px;
  margin: 0;
}

/* Source: ./components/search-overlay.css */
/* ============================================================
   MOBILE SEARCH OVERLAY
   引用：所有页面（通过 main.css @import）
============================================================ */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--surface-1-bg);
  display: flex;
  flex-direction: column;
  transform: translateY(-100%);
  opacity: 0;
  transition:
    transform 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 0.32s ease;
  pointer-events: none;
}
.search-overlay.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
.search-overlay-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px var(--space-md);
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  background: var(--navbar-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--surface-border);
  flex-shrink: 0;
}
.search-overlay-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-3-bg);
  border: 1.5px solid var(--surface-border);
  border-radius: var(--border-radius-pill);
  padding: 9px 14px;
  transition: border-color 0.2s;
}
.search-overlay-field:focus-within {
  border-color: var(--accent);
  background: var(--surface-1-bg);
}
.search-overlay-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 16px;
  color: var(--text-primary);
}
.search-overlay-cancel {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  padding: 4px 2px;
  white-space: nowrap;
}
.search-overlay-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
}
.search-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: var(--space-2xl) var(--space-lg);
  color: var(--text-tertiary);
  text-align: center;
}
.search-hint-icon {
  font-size: 48px;
  opacity: 0.5;
}
.search-hint-text {
  font-size: 15px;
  color: var(--text-tertiary);
}

/* Source: ./components/hero-card.css */
/* ============================================================
   HERO CARD (archive / search / links / category / tag 共用)
   引用：所有页面（通过 main.css @import）
============================================================ */
.archive-modern-shell {
  max-width: 100%;
}
.archive-hero-card {
  background: var(--surface-2-bg);
  border: 1px solid var(--surface-border);
  border-radius: 20px;
  padding: 22px 22px 18px;
  box-shadow: var(--surface-shadow-1);
  margin-bottom: 16px;
}
.archive-hero-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.archive-hero-emoji {
  font-size: 22px;
}
.archive-hero-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.4px;
}
.archive-hero-sub {
  margin: 0;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ── Archive search bar (archive + search 共用) ── */
.archive-search {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.archive-search .search-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: var(--surface-1-bg);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  font-family: inherit;
}
.archive-search .search-btn {
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
}

/* ── Year row layout (archive + search 共用) ── */
.archive-year-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 14px;
  align-items: start;
  margin-top: 10px;
}
@media (max-width: 767px) {
  .archive-year-row {
    grid-template-columns: 1fr;
  }
}
.archive-year-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  background: #fafafd;
  border: 1px solid rgba(60, 60, 67, 0.12);
  font-size: 18px;
  font-weight: 800;
  color: #1f2329;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
.archive-year-list {
  background: var(--surface-1-bg);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  overflow: hidden;
}

/* ── Archive item row (archive + search 共用) ── */
.archive-item {
  display: grid;
  grid-template-columns: 56px 6px 1fr auto;
  gap: 10px;
  min-height: 46px;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid rgba(60, 60, 67, 0.09);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.archive-item:last-child {
  border-bottom: none;
}
.archive-item:hover {
  background: rgba(0, 0, 0, 0.02);
}
.archive-item:hover .archive-item-title {
  color: var(--accent);
}
.archive-item-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(60, 60, 67, 0.42);
}
.archive-item-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  border: 1px solid #9ba0a6;
}
.archive-item-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  color: #2c3138;
  transition: color 0.2s;
}
.archive-item-cat {
  font-size: 11px;
  color: rgba(60, 60, 67, 0.48);
  background: #f0f1f4;
  border: 1px solid rgba(60, 60, 67, 0.14);
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 6px;
}
@media (max-width: 767px) {
  .archive-item-cat {
    display: none;
  }
}

/* ── Empty result state ── */
.archive-match-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
  font-size: 15px;
}

/* ── Dark mode overrides ── */
[data-theme='dark'] .archive-year-chip {
  background: #2c2c2e;
  border-color: rgba(255, 255, 255, 0.08);
  color: #f2f2f7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
[data-theme='dark'] .archive-item {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
[data-theme='dark'] .archive-item:hover {
  background: rgba(255, 255, 255, 0.04);
}
[data-theme='dark'] .archive-item-date {
  color: rgba(235, 235, 245, 0.6);
}
[data-theme='dark'] .archive-item-dot {
  border-color: rgba(235, 235, 245, 0.3);
}
[data-theme='dark'] .archive-item-title {
  color: #f2f2f7;
}
[data-theme='dark'] .archive-item-cat {
  background: #2c2c2e;
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(235, 235, 245, 0.6);
}

/* Source: ./components/article-detail.css */
/* ============================================================
   ARTICLE DETAIL CARD (article + /p 独立页面共用)
   引用：所有页面（通过 main.css @import）
============================================================ */
.article-main-col {
  min-width: 0;
}
.article-detail-card {
  border-radius: var(--border-radius-xl);
  overflow: hidden;
  background: var(--surface-1-bg);
  border: 1px solid var(--surface-border);
  box-shadow: var(--surface-shadow-2);
}
.article-detail-cover {
  width: 100%;
  object-fit: cover;
  display: block;
}
.article-cover-placeholder {
  color: #fff;
}
.article-detail-body {
  padding: var(--space-2xl);
}
@media (max-width: 767px) {
  .article-detail-body {
    padding: 20px 16px;
  }
}
.article-header-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.article-detail-title {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.article-detail-meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--surface-border);
}
.article-detail-meta a {
  color: var(--text-tertiary);
  text-decoration: none;
}
.article-detail-meta a:hover {
  color: var(--accent);
}
.article-detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-3-bg);
  border: 1px solid var(--surface-border);
  font-size: 12px;
  font-weight: 500;
}
@media (max-width: 767px) {
  .article-detail-meta {
    gap: 8px;
  }
}

/* TOC sidebar (shared by article + page) */
.article-aside-sticky {
  position: sticky;
  top: calc(var(--navbar-height) + 16px);
}
@media (max-width: 1023px) {
  .article-aside-sticky {
    display: none;
  }
}
@media (max-width: 1279px) {
  .article-aside-sticky {
    position: static;
  }
}
.toc-card {
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-1-bg);
  border: 1px solid var(--surface-border);
  box-shadow: var(--surface-shadow-1);
}
.toc-sticky {
  position: sticky;
  top: calc(var(--navbar-height) + 16px);
}
.toc-title {
  padding: 14px 16px;
  border-bottom: 1px solid var(--surface-border);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-tertiary);
}
.toc-list {
  padding: 8px;
  max-height: 60vh;
  overflow-y: auto;
}
.toc-link {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  line-height: 1.4;
  transition:
    color 0.15s,
    background 0.15s;
}
.toc-link:hover {
  color: var(--accent);
  background: var(--accent-tint);
}
.toc-link.active {
  color: var(--accent);
  background: var(--accent-tint);
}
.toc-level-2 { font-size: 13px; font-weight: 600; }
.toc-level-3 { padding-left: 22px; font-size: 12px; }
.toc-level-4 { padding-left: 34px; font-size: 12px; opacity: 0.9; }
.toc-backtop-wrap {
  margin-top: 16px;
  text-align: center;
}
.toc-backtop-btn {
  width: 100%;
  padding: 10px;
  border-radius: 14px;
  background: var(--surface-3-bg);
  border: 1px solid var(--surface-border);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  transition:
    background 0.15s,
    color 0.15s;
}
.toc-backtop-btn:hover {
  background: var(--accent-tint);
  color: var(--accent);
}

/* Source: ./components/article-row.css */
/* ============================================================
   ARTICLE ROW (list view item)
   引用：archive / search / category / tag 等列表页面
   引用：所有页面（通过 main.css @import）
============================================================ */
.article-row {
  padding: 20px;
  border-radius: 18px;
  background: var(--surface-1-bg);
  border: 1px solid var(--surface-border);
  box-shadow: var(--surface-shadow-2);
  margin-bottom: 12px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.article-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--surface-shadow-1);
}
.article-row-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
  transition: color 0.2s;
  color: var(--text-primary);
}
.article-row:hover .article-row-title {
  color: var(--accent);
}
.article-row-summary {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-row-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Source: ./components/prose.css */
/* ============================================================
   PROSE (rich text typography)
   引用：article / page 等内容详情页面
   引用：所有页面（通过 main.css @import）
============================================================ */
.prose,
.article-prose {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
  overflow-x: hidden;
  word-break: break-word;
}
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6,
.article-prose h1, .article-prose h2, .article-prose h3, .article-prose h4, .article-prose h5, .article-prose h6 {
  font-weight: 700;
  line-height: 1.35;
  margin: 2rem 0 1rem;
  letter-spacing: -0.3px;
  scroll-margin-top: 84px; /* Fix for fixed navbar (64px + 20px buffer) */
}
.prose h1 { font-size: 1.7rem; }
.prose h2 {
  font-size: 1.35rem;
  padding-left: 14px;
  border-left: 4px solid var(--accent);
}
.prose h3 { font-size: 1.15rem; }
.prose p { margin: 0 0 1.2rem; }
.prose a {
  color: #0a7aff;
  border-bottom: 1px dashed rgba(10, 122, 255, 0.4);
}
.prose a:hover { border-bottom-style: solid; }
.prose blockquote {
  border-left: 4px solid var(--surface-border);
  padding: 12px 20px;
  background: var(--surface-3-bg);
  border-radius: 0 12px 12px 0;
  color: var(--text-secondary);
  margin: 1.5rem 0;
}
.prose pre {
  background: #282c34;
  color: #abb2bf;
  border-radius: 12px;
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 15px;
  line-height: 1.55;
  margin: 1.5rem 0;
  border: none;
}
.prose code {
  background: rgba(236, 236, 241, 0.9);
  color: #ff3b30;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.88em;
}
.prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}
.prose img {
  max-width: 100%;
  border-radius: 12px;
  margin: 1.5rem auto;
  display: block;
  box-shadow: var(--surface-shadow-2);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 14px;
}
.prose th,
.prose td {
  border: 1px solid var(--surface-border);
  padding: 10px 14px;
}
.prose th {
  background: var(--surface-3-bg);
  font-weight: 600;
}
.prose tr:nth-child(even) { background: rgba(236, 236, 241, 0.4); }
.prose ul,
.prose ol {
  padding-left: 1.5rem;
  margin: 0 0 1.2rem;
}
.prose li { margin-bottom: 6px; }
.prose hr {
  border: none;
  border-top: 1px solid var(--surface-border);
  margin: 2rem 0;
}

/* Mac-style code block wrapper */
.code-block-wrapper {
  margin: 1.5rem 0;
  border-radius: 12px;
  overflow: hidden;
  background: #282c34;
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}
.code-block-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px 0 14px;
  background: linear-gradient(180deg, #3a3f4b 0%, #353942 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}
.code-chrome-dots {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}
.code-chrome-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.25),
    0 1px 2px rgba(0, 0, 0, 0.35);
}
.code-chrome-dot--red { background: #ff5f57; }
.code-chrome-dot--yellow { background: #febc2e; }
.code-chrome-dot--green { background: #28c840; }
.code-chrome-spacer {
  flex: 1;
  min-width: 8px;
}
.code-chrome-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.code-chrome-lang {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  user-select: none;
}
.code-copy-btn {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.75);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition:
    color 0.15s,
    background 0.15s;
}
.code-copy-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.code-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  cursor: pointer;
  transition:
    color 0.15s,
    background 0.15s,
    transform 0.2s;
}
.code-block-wrapper.is-collapsed .code-collapse-btn svg {
  transform: rotate(-90deg);
}
.code-block-body {
  overflow: hidden;
  max-height: 10000px;
  transition: max-height 0.4s ease;
}
.code-block-wrapper.is-collapsed .code-block-body {
  max-height: 0;
}
.code-block-wrapper pre {
  margin: 0;
  border-radius: 0;
  padding: 16px 18px 18px;
}

/* Source: ./base/dark-mode.css */
/* ============================================================
   DARK MODE OVERRIDES
   引用：所有页面（通过 main.css @import）
============================================================ */
[data-theme='dark'] {
  --surface-1-bg: #1c1c1e;
  --surface-2-bg: rgba(28, 28, 30, 0.95);
  --surface-3-bg: rgba(44, 44, 46, 0.95);
  --surface-border: rgba(255, 255, 255, 0.12);
  --surface-border-2: rgba(255, 255, 255, 0.08);
  --navbar-bg: rgba(28, 28, 30, 0.92);
  --text-primary: #f2f2f7;
  --text-secondary: rgba(235, 235, 245, 0.6);
  --text-tertiary: rgba(235, 235, 245, 0.4);
  --surface-shadow-1:
    0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}
[data-theme='dark'] body {
  background: #111113;
}

/* Prose */
[data-theme='dark'] .prose {
  color: var(--text-primary);
}
[data-theme='dark'] .prose h1,
[data-theme='dark'] .prose h2,
[data-theme='dark'] .prose h3,
[data-theme='dark'] .prose h4 {
  color: var(--text-primary);
}
[data-theme='dark'] .prose a {
  color: var(--accent-light);
}
[data-theme='dark'] .prose pre {
  background: #2c2c2e;
  border-color: rgba(255, 255, 255, 0.1);
}
[data-theme='dark'] .article-prose .code-block-wrapper,
[data-theme='dark'] .article-prose .code-block-wrapper pre {
  background: #282c34;
  border-color: transparent;
}
[data-theme='dark'] .article-prose .code-block-chrome {
  background: linear-gradient(180deg, #3d424e 0%, #383c48 100%);
}
[data-theme='dark'] .prose blockquote {
  border-color: var(--accent);
  background: rgba(255, 107, 53, 0.08);
}
[data-theme='dark'] .prose code:not(pre code) {
  background: rgba(255, 255, 255, 0.1);
  color: #ff8c5a;
}
[data-theme='dark'] .prose table th {
  background: rgba(255, 255, 255, 0.08);
}

/* Navbar & Footer */
[data-theme='dark'] .navbar {
  background: rgba(28, 28, 30, 0.92);
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme='dark'] .site-footer {
  background: #1c1c1e;
  border-color: rgba(255, 255, 255, 0.08);
}

/* Archive */
[data-theme='dark'] .archive-year-chip {
  background: #2c2c2e;
  border-color: rgba(255, 255, 255, 0.08);
  color: #f2f2f7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
[data-theme='dark'] .archive-item {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
[data-theme='dark'] .archive-item:hover {
  background: rgba(255, 255, 255, 0.04);
}
[data-theme='dark'] .archive-item-date {
  color: rgba(235, 235, 245, 0.6);
}
[data-theme='dark'] .archive-item-dot {
  border-color: rgba(235, 235, 245, 0.3);
}
[data-theme='dark'] .archive-item-title {
  color: #f2f2f7;
}
[data-theme='dark'] .archive-item-cat {
  background: #2c2c2e;
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(235, 235, 245, 0.6);
}

[data-theme='dark'] .archive-match-hero {
  background: #1c1c1e;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
[data-theme='dark'] .archive-match-title {
  color: #f2f2f7;
}
[data-theme='dark'] .archive-match-subtitle {
  color: rgba(235, 235, 245, 0.6);
}
[data-theme='dark'] .archive-match-year {
  color: #f2f2f7;
}
[data-theme='dark'] .archive-match-year-line {
  background: rgba(255, 255, 255, 0.08);
}
[data-theme='dark'] .archive-match-year-count {
  color: rgba(235, 235, 245, 0.6);
}
[data-theme='dark'] .archive-match-list {
  background: #1c1c1e;
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme='dark'] .archive-match-item {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
[data-theme='dark'] .archive-match-item:hover {
  background: rgba(255, 255, 255, 0.04);
}
[data-theme='dark'] .archive-match-date {
  color: rgba(235, 235, 245, 0.6);
}
[data-theme='dark'] .archive-match-dot {
  border-color: rgba(235, 235, 245, 0.3);
}
[data-theme='dark'] .archive-match-item-title {
  color: #f2f2f7;
}
[data-theme='dark'] .archive-match-category {
  background: #2c2c2e;
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(235, 235, 245, 0.6);
}

/* Theme toggle */
[data-theme='dark'] .theme-toggle-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

