/* 生活知识百科 (www.ixinwei.cn) - 本地化现代编辑风样式表 */
:root {
  --brand: #1365a8;
  --brand-dark: #0d4d82;
  --brand-sky: #29a5dc;
  --brand-tint: #eef7fc;
  --amber: #d97706;
  --amber-bg: #fffbeb;
  --green: #059669;
  --green-bg: #ecfdf5;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

a:hover {
  color: var(--brand-dark);
}

h1, h2, h3, h4 {
  color: var(--text);
  margin: 0;
  line-height: 1.35;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.site-logo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.site-logo img {
  height: 44px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.nav-link {
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  color: var(--text-body);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--brand);
  background: var(--brand-tint);
}

.nav-link-pill {
  background: var(--brand-tint);
  color: var(--brand);
  font-weight: 600;
}

.nav-link-pill.is-active,
.nav-link-pill:hover {
  background: var(--brand);
  color: #fff;
}

.header-search {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 4px 2px 12px;
  width: 215px;
  flex-shrink: 0;
}

.header-search:focus-within {
  border-color: var(--brand-sky);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(41, 165, 220, 0.14);
}

.header-search input {
  border: 0;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--text);
  width: 100%;
  min-width: 0;
}

.header-search button {
  border: 0;
  background: var(--brand);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.header-search button:hover {
  background: var(--brand-dark);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 7px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Announcement Bar (Directly under Nav on Home) */
.announce-bar {
  background: linear-gradient(90deg, #eef7fc 0%, #f0fdf4 55%, #fffbeb 100%);
  border-bottom: 1px solid #dbeafe;
}

.announce-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
  min-height: 44px;
}

.announce-badge {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  padding: 2px 9px;
  border-radius: 999px;
}

.announce-text {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
}

.announce-action {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  white-space: nowrap;
}

/* Hero Section */
.hero {
  background: linear-gradient(160deg, #ffffff 0%, #eef7fc 60%, #e0f2fe 100%);
  border-bottom: 1px solid var(--border);
  padding: 44px 0 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.95fr;
  gap: 36px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--brand);
  background: rgba(19, 101, 168, 0.1);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.hero-copy h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.hero-lead {
  font-size: 15.5px;
  color: var(--text-body);
  margin: 0 0 22px;
}

.hero-search {
  display: flex;
  background: #fff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 5px;
  box-shadow: var(--shadow-md);
  max-width: 560px;
}

.hero-search:focus-within {
  border-color: var(--brand);
}

.hero-search input {
  flex: 1;
  border: 0;
  outline: none;
  padding: 10px 14px;
  font-size: 15px;
  color: var(--text);
  min-width: 0;
}

.hero-search button {
  border: 0;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.hero-search button:hover {
  background: var(--brand-dark);
}

.hero-hot-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.hero-hot-tags a {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #cbd5e1;
  color: var(--text-body);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
}

.hero-hot-tags a:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: #fff;
}

/* Hero Quick Panel */
.hero-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
}

.hero-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}

.panel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.quick-tile {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.quick-tile:hover {
  border-color: var(--brand-sky);
  background: var(--brand-tint);
  transform: translateY(-2px);
}

.qt-tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand);
  background: #fff;
  border: 1px solid #bfdbfe;
  padding: 1px 7px;
  border-radius: 999px;
  margin-bottom: 2px;
}

.quick-tile strong {
  font-size: 14px;
  color: var(--text);
}

.quick-tile small {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  text-align: center;
}

.hero-stats strong {
  display: block;
  font-size: 18px;
  color: var(--brand);
}

.hero-stats span {
  font-size: 12px;
  color: var(--text-muted);
}

/* Sections */
.section {
  padding: 40px 0;
}

.section-tinted {
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-head h2 {
  font-size: 22px;
  font-weight: 800;
}

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

.more-link {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* Category Cards */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cat-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.cat-card:hover {
  border-color: var(--brand-sky);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.cat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cat-info {
  flex: 1;
  min-width: 0;
}

.cat-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.cat-title-row h3 {
  font-size: 16px;
  font-weight: 700;
}

.cat-count {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.cat-info p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Featured Grid */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.guide-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-sky);
}

.guide-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

.card-cover {
  position: relative;
  height: 112px;
  padding: 14px 16px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.card-cover-pattern {
  position: absolute;
  right: -24px;
  top: -24px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.card-cover-cat {
  position: relative;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.22);
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: 999px;
}

.card-cover-icon {
  position: absolute;
  right: 18px;
  bottom: 14px;
  opacity: 0.92;
}

.card-cover-time {
  position: relative;
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0.95;
}

.guide-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.guide-card-body h3 {
  font-size: 16.5px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.45;
}

.guide-card:hover .guide-card-body h3 {
  color: var(--brand);
}

.guide-card-body p {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

/* Main + Sidebar Layout */
.content-sidebar-grid,
.article-layout,
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.article-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.article-row:hover {
  border-color: #93c5fd;
  box-shadow: var(--shadow-md);
}

.article-row-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.cat-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
}

.cat-pill-mini {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-tint);
  padding: 2px 8px;
  border-radius: 6px;
}

.save-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--amber);
  background: var(--amber-bg);
  border: 1px solid #fde68a;
  padding: 1px 8px;
  border-radius: 999px;
}

.diff-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-bg);
  padding: 2px 9px;
  border-radius: 999px;
}

.meta-muted {
  font-size: 12.5px;
  color: var(--text-muted);
}

.article-row h2,
.article-row h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.article-row h2 a,
.article-row h3 a {
  color: var(--text);
}

.article-row h2 a:hover,
.article-row h3 a:hover {
  color: var(--brand);
}

.article-row p {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--text-body);
}

.article-row-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.tag-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-inline a {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 6px;
}

.tag-inline a:hover {
  color: var(--brand);
  background: var(--brand-tint);
}

.read-more {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* Sidebar */
.side-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.side-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.side-box-accent {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.side-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.side-box-head h3 {
  font-size: 15.5px;
  font-weight: 800;
}

.side-box-head a {
  font-size: 12.5px;
  font-weight: 600;
}

.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rank-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.rank-num {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.rank-num.is-top {
  background: var(--brand);
  color: #fff;
}

.rank-body {
  min-width: 0;
}

.rank-body a {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
}

.rank-body a:hover {
  color: var(--brand);
}

.rank-body small {
  font-size: 12px;
  color: var(--text-muted);
}

.mini-check-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mini-check-item {
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
}

.mini-check-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 13px;
}

.mini-check-top span {
  color: var(--brand);
  font-weight: 700;
  font-size: 12px;
}

.mini-check-item p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.side-tool-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.side-tool-links a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
}

.side-tool-links a:hover {
  background: var(--brand-tint);
  color: var(--brand);
}

/* Page Banner */
.page-banner {
  color: #fff;
  padding: 32px 0 36px;
}

.page-banner h1 {
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.page-banner p {
  margin: 0;
  font-size: 15px;
  opacity: 0.92;
  max-width: 780px;
}

.banner-title-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.banner-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--brand);
}

.breadcrumb-light,
.breadcrumb-light a {
  color: rgba(255, 255, 255, 0.85);
}

.breadcrumb-light a:hover {
  color: #fff;
}

.crumb-current {
  color: var(--text);
  font-weight: 500;
}

.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.cat-tab {
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-body);
  font-size: 13.5px;
  font-weight: 500;
}

.cat-tab:hover,
.cat-tab.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* Article Detail */
.article-wrap {
  padding: 28px 0 56px;
}

.article-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  box-shadow: var(--shadow-sm);
}

.article-header {
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.article-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.article-header h1 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.38;
  margin-bottom: 12px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.tldr-box,
.pitfall-box,
.copy-box {
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 22px 0;
}

.tldr-box {
  background: var(--brand-tint);
  border: 1px solid #bae6fd;
  border-left: 4px solid var(--brand);
}

.pitfall-box {
  background: var(--red-bg);
  border: 1px solid #fecaca;
  border-left: 4px solid var(--red);
}

.copy-box {
  background: var(--green-bg);
  border: 1px solid #a7f3d0;
}

.box-title,
.copy-box-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.copy-box-head {
  justify-content: space-between;
}

.box-tag {
  font-size: 12px;
  font-weight: 700;
  background: var(--brand);
  color: #fff;
  padding: 2px 9px;
  border-radius: 6px;
}

.box-tag-warn {
  background: var(--red);
}

.box-tag-ok {
  background: var(--green);
}

.tldr-box p,
.pitfall-box p {
  margin: 0;
  font-size: 15px;
  color: var(--text);
}

.copy-btn {
  border: 1px solid var(--green);
  background: #fff;
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.copy-btn:hover {
  background: var(--green);
  color: #fff;
}

.copy-pre {
  margin: 0;
  padding: 14px;
  background: #fff;
  border: 1px solid #d1fae5;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.article-content {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-body);
}

.article-content h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 30px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--brand-sky);
  scroll-margin-top: 84px;
}

.article-content h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 20px 0 8px;
}

.article-content p {
  margin: 0 0 14px;
}

.article-content ul,
.article-content ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content strong {
  color: var(--text);
}

.toc-box {
  position: sticky;
  top: 86px;
}

.toc-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-list a {
  font-size: 13.5px;
  color: var(--text-body);
}

.toc-list a:hover {
  color: var(--brand);
}

.article-tags-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 18px;
  margin-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

.article-tags-row a {
  background: var(--bg);
  color: var(--text-body);
  padding: 3px 10px;
  border-radius: 999px;
}

.article-tags-row a:hover {
  background: var(--brand-tint);
  color: var(--brand);
}

.article-pager {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.pager-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.pager-next {
  text-align: right;
}

.pager-item small {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.pager-item a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.pager-item a:hover {
  color: var(--brand);
}

.related-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.related-section h2 {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 14px;
}

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

.related-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg);
  color: inherit;
}

.related-card:hover {
  background: #fff;
  border-color: var(--brand-sky);
  box-shadow: var(--shadow-sm);
}

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

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

/* Tools Page */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 84px;
}

.tool-head {
  margin-bottom: 18px;
}

.tool-head h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 8px 0 6px;
}

.tool-head p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

.field-row {
  margin-bottom: 12px;
}

.field-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}

.field-row input,
.field-row select,
.field-row textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text);
  background: #fff;
}

.field-row input:focus,
.field-row select:focus,
.field-row textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(19, 101, 168, 0.12);
}

.field-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.compare-col {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 12px;
}

.compare-col h3 {
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--brand);
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-dark);
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.tool-btn {
  width: 100%;
}

.tool-result {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  background: var(--brand-tint);
  border: 1px solid #bae6fd;
  border-radius: var(--radius-sm);
  text-align: center;
}

.tool-result span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.tool-result strong {
  display: block;
  font-size: 16px;
  color: var(--brand-dark);
  margin-top: 2px;
}

.tool-tip {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Checklist Table */
.check-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.check-toolbar .cat-tabs {
  margin-bottom: 0;
}

.check-filter-wrap {
  width: 280px;
  max-width: 100%;
}

.check-filter-wrap input {
  width: 100%;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  font-size: 13.5px;
  background: #fff;
}

.table-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.data-table th,
.data-table td {
  padding: 13px 15px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  vertical-align: top;
}

.data-table th {
  background: #f8fafc;
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
}

.data-table tbody tr:hover {
  background: #f8fbff;
}

.metric-text {
  font-weight: 700;
  color: var(--brand);
}

.caution-cell {
  color: #991b1b;
  font-size: 13px;
}

/* Search & Empty & About */
.hero-search-banner {
  margin-top: 16px;
}

.hot-tag-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.search-summary {
  margin: 0 0 16px;
  font-size: 14.5px;
}

.empty-state {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 24px;
  text-align: center;
}

.empty-code {
  font-size: 56px;
  font-weight: 900;
  color: var(--brand-sky);
  line-height: 1;
  margin-bottom: 10px;
}

.empty-state p {
  color: var(--text-muted);
  max-width: 520px;
  margin: 10px auto 20px;
}

.empty-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.about-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.about-card h2 {
  font-size: 20px;
  margin: 24px 0 10px;
}

.about-card h2:first-child {
  margin-top: 0;
}

.about-list {
  padding-left: 20px;
}

.about-list li {
  margin-bottom: 8px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.page-btn,
.page-num {
  padding: 7px 14px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
}

.page-num.is-active,
.page-btn:hover,
.page-num:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 44px 0 28px;
  margin-top: 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo-wrap {
  display: inline-block;
  background: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.footer-desc {
  margin: 0;
  font-size: 13.5px;
  color: #94a3b8;
  max-width: 380px;
}

.footer-col h3 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 12px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer-col a {
  color: #94a3b8;
  font-size: 13.5px;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 20px;
  font-size: 13px;
  color: #94a3b8;
}

.footer-bottom p {
  margin: 0;
}

.footer-beian a {
  color: #cbd5e1;
}

.footer-beian a:hover {
  color: #fff;
}

.sep {
  margin: 0 8px;
  opacity: 0.4;
}

/* Back to Top */
.back-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--brand);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 90;
}

.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.back-top:hover {
  background: var(--brand);
  color: #fff;
}

/* Responsive Breakpoints */
@media (max-width: 1080px) {
  .header-search {
    width: 170px;
  }
  .hero-grid,
  .content-sidebar-grid,
  .article-layout,
  .about-grid {
    grid-template-columns: 1fr;
  }
  .toc-box {
    position: static;
  }
  .category-grid,
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .nav-toggle {
    display: flex;
  }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }
  .site-nav.is-open {
    display: flex;
  }
  .header-search {
    width: 100%;
    order: 4;
    display: none;
  }
  .site-nav.is-open + .header-search {
    display: flex;
  }
  .tools-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 14px;
  }
  .site-logo img {
    height: 36px;
  }
  .announce-inner {
    flex-wrap: wrap;
    gap: 6px 10px;
  }
  .announce-action {
    font-size: 12.5px;
  }
  .hero {
    padding: 28px 0 32px;
  }
  .hero-copy h1 {
    font-size: 24px;
  }
  .hero-search {
    flex-direction: column;
    gap: 6px;
  }
  .hero-search button {
    width: 100%;
  }
  .quick-links-grid,
  .category-grid,
  .featured-grid,
  .related-grid,
  .article-pager,
  .field-grid-3,
  .compare-grid,
  .tool-result {
    grid-template-columns: 1fr;
  }
  .article-main,
  .about-card {
    padding: 20px 16px;
  }
  .article-header h1,
  .page-banner h1 {
    font-size: 22px;
  }
  .pager-next {
    text-align: left;
  }
  .check-filter-wrap {
    width: 100%;
  }
}
