/*
Theme Name: Minimal Blog
Theme URI: https://example.com
Author: Z.ai
Author URI: https://z.ai
Description: An ultra-minimal WordPress blog theme with featured posts carousel, pagination options, floating sidebar, dark mode (3-state), switchable search engines, category navigation, per-category thumbnails, and i18n support.
Version: 1.0.13
License: MIT
License URI: https://opensource.org/licenses/MIT
Text Domain: minimal-blog
Domain Path: /languages
Tags: blog, two-columns, custom-colors, custom-logo, featured-images, infinite-scroll, translation-ready
*/

/* ========== CSS Variables ========== */
:root {
  --color-accent: #e85d3a;
  --color-accent-hover: #d14e2e;
  --color-accent-light: #e85d3a18;
  --color-bg: #ffffff;
  --color-bg-secondary: #f5f5f5;
  --color-text: #1a1a1a;
  --color-text-secondary: #666666;
  --color-text-tertiary: #999999;
  --color-border: #e0e0e0;
  --color-card: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1200px;
  --sidebar-width: 300px;
  --header-height: 68px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

[data-theme="dark"] {
  --color-bg: #121212;
  --color-bg-secondary: #1e1e1e;
  --color-text: #e8e8e8;
  --color-text-secondary: #999999;
  --color-text-tertiary: #666666;
  --color-border: #333333;
  --color-card: #1e1e1e;
  --color-accent-light: #e85d3a25;
}

/* ========== Reset ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--color-bg); color: var(--color-text); line-height: 1.6; font-size: 16px; min-height: 100vh; }
a { color: var(--color-accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--color-accent-hover); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { font-family: inherit; }

/* ========== SVG Icon Utility ========== */
.icon-svg { width: 1em; height: 1em; vertical-align: -0.125em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ========== Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}

/* Accent header variant */
.site-header.header-accent {
  background: var(--color-accent);
  border-bottom-color: var(--color-accent);
}
.site-header.header-accent .site-title a,
.site-header.header-accent .site-description,
.site-header.header-accent .header-cats-list > li > a,
.site-header.header-accent .header-cats-more-btn {
  color: rgba(255,255,255,.9);
}
.site-header.header-accent .site-title a:hover,
.site-header.header-accent .header-cats-list > li > a:hover,
.site-header.header-accent .header-cats-more-btn:hover {
  color: #fff;
}
.site-header.header-accent .header-cats-list > li.current-cat > a {
  color: #fff;
  font-weight: 600;
}
.site-header.header-accent .site-logo { color: rgba(255,255,255,.9); }
.site-header.header-accent .sidebar-toggle {
  border-color: rgba(255,255,255,.4);
  color: #fff;
}
.site-header.header-accent .sidebar-toggle:hover {
  border-color: #fff;
}
.site-header.header-accent .header-cats-dropdown {
  background: var(--color-card);
  border-color: var(--color-border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
}

/* Site branding */
.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Logo: no background, transparent */
.site-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-accent);
  overflow: hidden;
  text-decoration: none;
  transition: opacity .15s;
}
.site-logo:hover { opacity: .8; }
.site-logo img { width: 100%; height: 100%; object-fit: contain; }

/* Layout A: square icon + name + description */
.site-branding.layout-a .site-logo-square { width: 36px; height: 36px; border-radius: var(--radius-sm); }
.site-branding.layout-a .brand-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.site-branding.layout-a .site-title { font-size: 18px; font-weight: 700; line-height: 1.2; }
.site-branding.layout-a .site-description { font-size: 12px; color: var(--color-text-secondary); line-height: 1.2; }
.site-header.header-accent .site-branding.layout-a .site-description { color: rgba(255,255,255,.65); }

/* Layout B: square logo + name (no description) */
.site-branding.layout-b .site-logo-square { width: 36px; height: 36px; border-radius: var(--radius-sm); }
.site-branding.layout-b .site-title { font-size: 18px; font-weight: 700; line-height: 1.3; }
.site-branding.layout-b .site-description { display: none; }

/* Layout C: rectangular logo only */
.site-branding.layout-c .site-logo-rect { width: auto; max-height: calc(var(--header-height) - 20px); border-radius: var(--radius-sm); }
.site-branding.layout-c .site-logo-rect img { max-height: calc(var(--header-height) - 20px); width: auto; height: auto; }
.site-branding.layout-c .brand-text { display: none; }
.site-branding.layout-c .site-logo svg.icon-svg { width: 40px; height: 40px; }

.site-title { margin: 0; padding: 0; line-height: 1.3; }
.site-title a { color: var(--color-text); transition: color .15s; }
.site-title a:hover { color: var(--color-accent); text-decoration: none; }

/* Sidebar toggle (hamburger, mobile only) */
.sidebar-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color .15s, color .15s;
}
.sidebar-toggle:hover { border-color: var(--color-accent); color: var(--color-accent); }
.sidebar-toggle svg { width: 22px; height: 22px; }

/* ========== Header Category Nav (desktop) ========== */
.header-cats { flex: 1; display: flex; justify-content: flex-end; min-width: 0; overflow: visible; }
.header-cats-list { display: flex; align-items: center; gap: 0; flex-wrap: nowrap; white-space: nowrap; }
.header-cats-list > li { position: relative; }
.header-cats-list > li > a {
  display: block;
  padding: 0 12px;
  height: var(--header-height);
  line-height: var(--header-height);
  font-size: 14px;
  color: var(--color-text-secondary);
  transition: color .15s;
}
.header-cats-list > li > a:hover,
.header-cats-list > li.current-cat > a { color: var(--color-accent); }

/* Dropdown (sub-categories) */
.header-cats-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  min-width: 160px;
  z-index: 110;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.has-dropdown:hover > .header-cats-dropdown { display: block; }
.header-cats-dropdown li a {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--color-text-secondary);
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.header-cats-dropdown li a:hover { color: var(--color-accent); background: var(--color-bg-secondary); }

/* More button */
.header-cats-more { position: relative; }
.header-cats-more-btn {
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  height: 32px;
  font-size: 13px;
  color: var(--color-text-secondary);
  cursor: pointer;
  font-family: var(--font);
  transition: border-color .15s, color .15s;
}
.header-cats-more-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
.header-cats-more .header-cats-dropdown { right: 0; left: auto; }
.header-cats-more .header-cats-dropdown.active { display: block; }

/* ========== Layout ========== */
.site-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  gap: 24px;
  padding: 24px;
  align-items: flex-start;
}
.site-main { flex: 1; min-width: 0; }

/* ========== Sidebar ========== */
.site-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--header-height) + 24px);
  max-height: calc(100vh - var(--header-height) - 48px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--color-card);
  border: 1px solid var(--color-border);
}
.site-sidebar::-webkit-scrollbar { width: 4px; }
.site-sidebar::-webkit-scrollbar-track { background: transparent; }
.site-sidebar::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }

/* Sidebar search */
.sidebar-search { padding: 12px 16px; border-bottom: 1px solid var(--color-border); }
.search-form { display: flex; gap: 6px; }
.search-field {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  min-width: 0;
  transition: border-color .15s;
}
.search-field:focus { border-color: var(--color-accent); }
.search-field::placeholder { color: var(--color-text-tertiary); }
.search-submit {
  padding: 8px 10px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.search-submit:hover { background: var(--color-accent-hover); }
.search-submit svg { width: 16px; height: 16px; }
.search-engine-switch {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--color-text-secondary);
}
.search-engine-label { display: flex; align-items: center; gap: 3px; cursor: pointer; }
.search-engine-label input { margin: 0; accent-color: var(--color-accent); }

/* Sidebar categories (mobile) */
.sidebar-cats {
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--color-border);
  display: none;
}
.sidebar-cats .widget-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-border);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.sidebar-cats ul li { font-size: 14px; padding: 0; }
.sidebar-cats ul li a {
  display: block;
  padding: 6px 0;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
  transition: color .15s;
}
.sidebar-cats ul li a:hover { color: var(--color-accent); }
.sidebar-cats ul li:last-child a { border-bottom: none; }
.cat-has-children > .cat-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 6px 0;
  background: none;
  border: none;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font);
  transition: color .15s;
}
.cat-toggle-btn:hover { color: var(--color-accent); }
.cat-arrow svg { width: 12px; height: 12px; transition: transform .2s; }
.cat-has-children > .cat-toggle-btn.active .cat-arrow { transform: rotate(90deg); }
.cat-children { display: none; }
.cat-children.open { display: block; }
.cat-children li a { padding-left: 12px; font-size: 13px; }

/* Sidebar body (widgets) */
.sidebar-body { flex: 1; padding: 16px; }
.sidebar-body .widget { margin-bottom: 20px; }
.sidebar-body .widget:last-child { margin-bottom: 0; }
.sidebar-body .widget-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ========== 3-State Dark Mode Toggle ========== */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--color-border);
  font-size: 14px;
  color: var(--color-text-secondary);
}
.theme-toggle-label { white-space: nowrap; }
.theme-toggle-btns {
  display: flex;
  gap: 2px;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-sm);
  padding: 2px;
}
.theme-toggle-btn {
  width: 34px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.theme-toggle-btn:hover { color: var(--color-text); }
.theme-toggle-btn.active { background: var(--color-card); color: var(--color-accent); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.theme-toggle-btn svg { width: 16px; height: 16px; }

/* Sidebar footer */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--color-border);
  font-size: 12px;
  color: var(--color-text-secondary);
  text-align: center;
  line-height: 1.6;
}
.sidebar-footer a { color: var(--color-text-secondary); }
.sidebar-footer a:hover { color: var(--color-accent); }

/* ========== Featured Carousel ========== */
.featured-carousel {
  position: relative;
  margin-bottom: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  height: 360px;
  background: var(--color-bg-secondary);
  user-select: none;
  -webkit-user-select: none;
}
.featured-slides {
  position: relative;
  width: 100%;
  height: 100%;
}
.featured-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
  pointer-events: none;
}
.featured-slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}
.featured-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 8s ease-out;
}
.featured-slide.active .featured-slide-bg {
  transform: scale(1.05);
}
.featured-slide-nobg {
  background: var(--color-bg-secondary);
}
.featured-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%);
  z-index: 1;
  text-decoration: none;
  cursor: pointer;
}
.featured-slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 28px;
  z-index: 2;
  color: #fff;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
}
.featured-slide-date {
  font-size: 12px;
  color: rgba(255,255,255,.7);
  margin-bottom: 6px;
  letter-spacing: .3px;
}
.featured-slide-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,.3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Featured nav buttons */
.featured-nav {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}
.featured-nav-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background .2s;
}
.featured-nav-btn:hover {
  background: rgba(255,255,255,.35);
}
.featured-nav-btn svg { width: 16px; height: 16px; }
.featured-prev svg { transform: rotate(180deg); }

/* Featured dots */
.featured-dots {
  display: flex;
  gap: 6px;
}
.featured-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.35);
  cursor: pointer;
  padding: 0;
  transition: background .2s, transform .2s;
}
.featured-dot.active {
  background: #fff;
  transform: scale(1.2);
}
.featured-dot:hover {
  background: rgba(255,255,255,.6);
}

@media (max-width: 768px) {
  .featured-carousel { height: 240px; }
  .featured-slide-title { font-size: 18px; }
  .featured-slide-content { padding: 16px 20px; }
}

/* ========== Post Cards ========== */
.post-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s;
  margin-bottom: 16px;
}
.post-card:hover { border-color: var(--color-accent); }
.post-card-inner {
  display: flex;
  gap: 16px;
  padding: 16px;
  align-items: center;
  color: var(--color-text);
  text-decoration: none;
}
.post-card-inner:hover {
  color: var(--color-text);
  text-decoration: none;
}
.post-card-thumbnail {
  width: 160px;
  min-width: 160px;
  height: 100px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-bg-secondary);
}
/* .post-card-thumbnail a removed: .post-card-inner is now the <a> tag */
.post-card-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.post-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--color-text-tertiary);
}
.post-card-placeholder svg { width: 28px; height: 28px; }
.post-card-content {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.post-card-meta {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-title a {
  color: var(--color-text);
  text-decoration: none;
  transition: color .15s;
}
.post-card-title a:hover { color: var(--color-accent); }
.post-card-excerpt {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Loading */
.load-more { text-align: center; padding: 24px; color: var(--color-text-secondary); font-size: 14px; }
.load-more .spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.no-more-posts { text-align: center; padding: 16px; font-size: 13px; color: var(--color-text-secondary); }

/* ========== Article Detail ========== */
.article-header { margin-bottom: 32px; }
.article-featured-image {
  width: 100%;
  height: 360px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: var(--radius);
}
@media (max-width: 768px) {
  .article-featured-image {
    height: 240px;
  }
}
.article-title { font-size: 28px; font-weight: 700; line-height: 1.3; color: var(--color-text); margin-bottom: 12px; }
.article-meta { font-size: 14px; color: var(--color-text-secondary); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.article-meta a { color: var(--color-accent); }
.article-content { font-size: 17px; line-height: 1.8; color: var(--color-text); }
.article-content h2 { font-size: 22px; font-weight: 700; margin: 32px 0 16px; color: var(--color-text); }
.article-content h3 { font-size: 18px; font-weight: 600; margin: 24px 0 12px; color: var(--color-text); }
.article-content p { margin-bottom: 20px; }
.article-content a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 2px; }
.article-content img { border-radius: var(--radius); margin: 24px 0; }
.article-content blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 12px 20px;
  margin: 24px 0;
  color: var(--color-text-secondary);
  font-style: italic;
  background: var(--color-bg-secondary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article-content ul, .article-content ol { margin: 16px 0; padding-left: 24px; }
.article-content li { margin-bottom: 8px; list-style: disc; }
.article-content ol li { list-style: decimal; }
.article-content pre {
  background: var(--color-bg-secondary);
  padding: 16px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 14px;
  margin: 24px 0;
  border: 1px solid var(--color-border);
}
.article-content code { background: var(--color-bg-secondary); padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.article-content pre code { background: none; padding: 0; }
.article-nav { display: flex; justify-content: space-between; margin-top: 48px; font-size: 14px; gap: 16px; }
.article-nav a { color: var(--color-text-secondary); max-width: 45%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.article-nav a:hover { color: var(--color-accent); }

/* ========== Comments ========== */
.comments-area { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--color-border); }
.comments-title { font-size: 20px; font-weight: 700; margin-bottom: 24px; color: var(--color-text); }
.comments-list { list-style: none; padding: 0; }
.comments-list .comment { padding: 16px 0; border-bottom: 1px solid var(--color-border); }
.comments-list .comment:last-child { border-bottom: none; }
.comments-list .children { list-style: none; padding-left: 32px; margin-top: 16px; }
.comment-author { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.comment-author img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-author cite { font-style: normal; font-weight: 600; font-size: 15px; color: var(--color-text); }
.comment-author .comment-metadata { font-size: 12px; color: var(--color-text-tertiary); }
.comment-author .comment-metadata a { color: var(--color-text-tertiary); }
.comment-author .comment-metadata a:hover { color: var(--color-accent); }
.comment-content { font-size: 15px; line-height: 1.6; color: var(--color-text); margin-bottom: 8px; }
.comment-content p { margin-bottom: 8px; }
.comment-content p:last-child { margin-bottom: 0; }
.comment-reply { font-size: 13px; }
.comment-reply a { color: var(--color-text-secondary); }
.comment-reply a:hover { color: var(--color-accent); }
.comment-awaiting-moderation { font-size: 13px; color: var(--color-accent); font-style: italic; margin-bottom: 8px; }
.comment-navigation { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 24px; }
.comment-navigation a { color: var(--color-text-secondary); }
.comment-navigation a:hover { color: var(--color-accent); }

/* Pingbacks & Trackbacks */
.pingback, .trackback { padding: 12px 0; border-bottom: 1px solid var(--color-border); font-size: 14px; }
.pingback a, .trackback a { color: var(--color-text-secondary); }

/* Comment form */
.comment-form { margin-top: 32px; }
.comment-form h3 { font-size: 18px; font-weight: 700; margin-bottom: 16px; color: var(--color-text); }
.comment-form .comment-notes { font-size: 13px; color: var(--color-text-secondary); margin-bottom: 16px; }
.comment-form .required { color: var(--color-accent); }
.comment-form p { margin-bottom: 16px; }
.comment-form label { display: block; font-size: 14px; font-weight: 600; color: var(--color-text); margin-bottom: 6px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color .15s;
}
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus { border-color: var(--color-accent); }
.comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  min-height: 120px;
  resize: vertical;
  transition: border-color .15s;
}
.comment-form textarea:focus { border-color: var(--color-accent); }
.comment-form .form-submit { margin-top: 8px; }
.comment-form .submit {
  display: inline-block;
  padding: 10px 24px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: background .15s;
}
.comment-form .submit:hover { background: var(--color-accent-hover); }
.comment-form .logged-in-as { font-size: 13px; color: var(--color-text-secondary); margin-bottom: 16px; }
.comment-form .logged-in-as a { color: var(--color-accent); }

/* ========== Widgets ========== */
.widget ul { padding: 0; }
.widget ul li { padding: 8px 0; border-bottom: 1px solid var(--color-border); font-size: 14px; }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--color-text-secondary); }
.widget ul li a:hover { color: var(--color-accent); }

/* ========== Overlay ========== */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 199; }
.sidebar-overlay.active { display: block; }

/* ========== Pagination (numbered buttons) ========== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 24px 0;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
  background: var(--color-card);
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.pagination .page-numbers.current {
  background: var(--color-accent-light);
  font-weight: 600;
}
.pagination .page-numbers.prev,
.pagination .page-numbers.next {
  font-size: 16px;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .sidebar-toggle { display: flex; }
  .header-cats { display: none; }
  .sidebar-cats { display: block; }
  .site-layout { flex-direction: column; padding: 16px; }
  .site-sidebar {
    display: none;
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    max-height: 100vh;
    z-index: 200;
    border-radius: 0;
    border: none;
    border-left: 1px solid var(--color-border);
    transition: right .3s ease;
    flex-direction: column;
  }
  .site-sidebar.open { display: flex; right: 0; }
  .post-card-inner { flex-direction: column; align-items: stretch; gap: 12px; }
  .post-card-thumbnail { width: 100%; min-width: 0; height: 180px; }
  .article-title { font-size: 22px; }
  .article-nav { flex-direction: column; }
  .article-nav a { max-width: 100%; }
}
@media (min-width: 769px) {
  .header-cats-list { overflow: hidden; }
}
