:root {
  --color-sd-bg: var(--color-canvas-default);
  --color-sd-text: var(--color-fg-default);
  --color-sd-muted: var(--color-fg-muted);
  --color-sd-border: var(--color-border-default);
  --color-sd-accent: var(--color-accent-fg);
  --color-sd-code-bg: var(--color-canvas-subtle);
  --color-sd-success: #1a7f37;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

.hero {
  background: var(--color-sd-code-bg);
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  border: 1px solid var(--color-sd-border);
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.hero .btn {
  padding: 0.5rem 1.25rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.hero .btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.stats-bar {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--color-sd-border);
  border-bottom: 1px solid var(--color-sd-border);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.stats-bar .stat-item {
  text-align: center;
  flex: 0 0 auto;
  min-width: 80px;
}

.stats-bar .stat-value {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--color-sd-text);
  line-height: 1.2;
}

.stats-bar .stat-label {
  font-size: 0.8125rem;
  color: var(--color-sd-muted);
  margin-top: 0.25rem;
}

.category-card {
  background: var(--color-sd-bg);
  border: 1px solid var(--color-sd-border);
  border-radius: 8px;
  padding: 1rem;
  display: block;
  height: 100%;
  transition: all 0.2s ease;
  position: relative;
}

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

.category-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-sd-text);
  margin-bottom: 0.25rem;
}

.category-card .count {
  font-size: 0.75rem;
  color: var(--color-sd-muted);
}

.guide-card {
  background: var(--color-sd-bg);
  border: 1px solid var(--color-sd-border);
  border-radius: 8px;
  padding: 1.25rem;
  display: block;
  height: 100%;
  transition: all 0.2s ease;
}

.guide-card:hover {
  border-color: var(--color-sd-accent);
  box-shadow: var(--shadow-md);
}

.guide-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-sd-text);
  margin-bottom: 0.5rem;
}

.guide-card h3 a {
  color: inherit;
  text-decoration: none;
}

.guide-card h3 a:hover {
  color: var(--color-sd-accent);
}

.guide-card .meta {
  font-size: 0.75rem;
  color: var(--color-sd-muted);
  margin-bottom: 0.5rem;
}

.guide-card .description {
  font-size: 0.875rem;
  color: var(--color-sd-muted);
  line-height: 1.5;
}

.gutter {
  margin-left: -8px;
  margin-right: -8px;
}

.gutter > div {
  padding-left: 8px;
  padding-right: 8px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-sd-border);
  margin-bottom: 1rem;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-cloud .btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.tag-cloud .btn:hover {
  background: var(--color-sd-accent);
  color: #fff;
  border-color: var(--color-sd-accent);
}

.markdown-body code {
  padding: 0.2em 0.4em;
  margin: 0;
  font-size: 85%;
  background-color: var(--color-sd-code-bg);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

.markdown-body pre code {
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.markdown-body pre {
  padding: 1rem;
  overflow: auto;
  font-size: 85%;
  line-height: 1.45;
  background-color: var(--color-sd-code-bg);
  border-radius: 6px;
}

.markdown-body table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1rem;
}

.markdown-body table th,
.markdown-body table td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-sd-border);
}

.markdown-body table th {
  background: var(--color-sd-code-bg);
  font-weight: 600;
}

.markdown-body table tr:nth-child(even) {
  background: var(--color-sd-code-bg);
}

.markdown-body blockquote {
  margin: 0 0 1rem;
  padding: 0 1rem;
  color: var(--color-sd-muted);
  border-left: 0.25em solid var(--color-sd-border);
}

.markdown-body hr {
  height: 0.25em;
  padding: 0;
  margin: 1.5rem 0;
  background-color: var(--color-sd-border);
  border: 0;
  border-radius: 2px;
}

.markdown-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.footer a {
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.Label {
  display: inline-block;
  padding: 0.15em 0.65em;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: 2em;
}

.Label--outline {
  border-color: var(--color-sd-border);
  background: transparent;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
}

.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border-default);
}

.article-header h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.article-meta time {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.article-body {
  font-size: 1rem;
  line-height: 1.75;
}

.article-body h2 {
  font-size: 1.375rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border-default);
}

.article-body h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.article-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.guide-list-item {
  border-bottom: 1px solid var(--color-border-default);
  padding: 1rem 0;
}

.guide-list-item:last-child {
  border-bottom: none;
}

.guide-list-item h2 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.guide-list-item h2 a {
  color: var(--color-fg-default);
  text-decoration: none;
}

.guide-list-item h2 a:hover {
  color: var(--color-accent-fg);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1.5rem;
}

.list-header {
  margin-bottom: 1.5rem;
}

.list-header h1 {
  border-bottom: 1px solid var(--color-border-default);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

#search-result {
  margin-top: 1rem;
}

#search-result li {
  list-style: none;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.guide-card,
.category-card {
  animation: fadeIn 0.3s ease-out;
}

@media (min-width: 768px) {
  .hero {
    padding: 3rem 2rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .stats-bar {
    gap: 3rem;
  }
  
  .stats-bar .stat-value {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .category-card h3 {
    font-size: 1rem;
  }
  
  .guide-card h3 {
    font-size: 1.125rem;
  }
  
  .article-header h1 {
    font-size: 2.25rem;
  }
  
  .article-body h2 {
    font-size: 1.5rem;
  }
  
  .article-body h3 {
    font-size: 1.25rem;
  }
}

@media (max-width: 767px) {
  .hero {
    padding: 1.5rem 1rem;
  }
  
  .hero h1 {
    font-size: 1.375rem;
  }
  
  .hero .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .stats-bar {
    gap: 1rem;
    padding: 1rem 0;
  }
  
  .stats-bar .stat-item {
    flex: 1 1 40%;
    min-width: 60px;
  }
  
  .stats-bar .stat-value {
    font-size: 1.5rem;
  }
  
  .stats-bar .stat-label {
    font-size: 0.6875rem;
  }
  
  .footer ul {
    flex-direction: column;
    text-align: center;
  }
  
  .footer .mr-3 {
    margin-right: 0;
    margin-bottom: 0.5rem;
  }
  
  .footer .mx-2 {
    display: none;
  }
  
  .article-header h1 {
    font-size: 1.5rem;
  }
  
  .article-body h2 {
    font-size: 1.125rem;
  }
  
  .article-body h3 {
    font-size: 1rem;
  }
  
  .guide-list-item h2 {
    font-size: 1rem;
  }
  
  .category-card {
    padding: 0.875rem;
  }
  
  .category-card h3 {
    font-size: 0.875rem;
  }
}
