:root {
  --bg-page: #f2f6fb;
  --bg-card: #ffffff;
  --bg-subtle: #f4f7fc;
  --bg-header: rgba(255, 255, 255, 0.92);
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #8a94a6;
  --accent: #1677ff;
  --accent-hover: #0958d9;
  --accent-soft: #e6f2ff;
  --border: #e8eef6;
  --divider: #edf2f7;
  --shadow-card: 0 6px 24px rgba(15, 35, 66, 0.045);
  --shadow-hover: 0 12px 30px rgba(22, 119, 255, 0.11);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", "Inter", sans-serif;
}

[data-theme="dark"] {
  --bg-page: #0b1120;
  --bg-card: #131c2e;
  --bg-subtle: #1b273d;
  --bg-header: rgba(19, 28, 46, 0.92);
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.18);
  --border: #23314c;
  --divider: #1f2d45;
  --shadow-card: 0 8px 28px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 12px 32px rgba(59, 130, 246, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

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

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.brand-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.18);
  border: 2px solid #e2ecff;
}

.brand-avatar img,
.hero-author-avatar img,
.meta-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-primary);
}

.brand-title .accent {
  color: var(--accent);
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  letter-spacing: 0.5px;
}

/* Primary Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 13px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 8px;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  font-weight: 600;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -17px;
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 120;
}

.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(4px);
}

.nav-dropdown a {
  padding: 7px 12px;
  font-size: 13.5px;
  color: var(--text-secondary);
  border-radius: 8px;
}

.nav-dropdown a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.search-box {
  position: relative;
  width: 215px;
}

.search-box input {
  width: 100%;
  height: 38px;
  padding: 0 38px 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}

.search-box input:focus {
  border-color: var(--accent);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-box button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.search-box button:hover {
  color: var(--accent);
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.header-slogan {
  position: relative;
  font-size: 15px;
  font-weight: 700;
  font-style: italic;
  color: #1e3a5f;
  white-space: nowrap;
  padding-bottom: 4px;
  letter-spacing: 1px;
}

[data-theme="dark"] .header-slogan {
  color: #93c5fd;
}

.header-slogan svg {
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 7px;
}

/* ===== Main Wrapper ===== */
.main-wrap {
  padding: 20px 0 36px;
}

/* ===== Hero Bento Grid ===== */
.hero-grid {
  display: grid;
  grid-template-columns: 1.52fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.hero-main {
  position: relative;
  height: 416px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.hero-main:hover .hero-slide.active .hero-slide-bg {
  transform: scale(1.03);
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    95deg,
    rgba(9, 16, 30, 0.90) 0%,
    rgba(9, 16, 30, 0.72) 45%,
    rgba(9, 16, 30, 0.20) 100%
  );
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 32px 34px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-width: 68%;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: var(--accent);
  color: #ffffff;
  width: fit-content;
  letter-spacing: 0.4px;
}

.pill-badge.glass {
  background: rgba(22, 119, 255, 0.88);
  backdrop-filter: blur(6px);
}

.hero-title {
  font-size: 29px;
  font-weight: 800;
  line-height: 1.32;
  color: #ffffff;
  margin: 14px 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.hero-excerpt {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
}

.hero-author {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.9);
}

.hero-author-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1e3a8a;
  border: 2px solid rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-author-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.hero-author-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.hero-author-date {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.72);
}

.hero-cta {
  position: absolute;
  right: 26px;
  bottom: 24px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #1677ff);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(22, 119, 255, 0.42);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(22, 119, 255, 0.55);
  color: #fff;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  gap: 7px;
}

.hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.hero-dot.active {
  width: 22px;
  background: #ffffff;
}

/* Right Stacked 2 Hero Cards */
.hero-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 416px;
}

.hero-sub-card {
  position: relative;
  flex: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: #0f172a;
  display: block;
}

.hero-sub-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-sub-card:hover img {
  transform: scale(1.05);
}

.hero-sub-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    95deg,
    rgba(10, 18, 34, 0.86) 0%,
    rgba(10, 18, 34, 0.58) 55%,
    rgba(10, 18, 34, 0.15) 100%
  );
}

.hero-sub-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-width: 78%;
}

.hero-sub-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: #ffffff;
  margin-top: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-sub-date {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hero-sub-arrow {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-sub-card:hover .hero-sub-arrow {
  transform: translateX(3px);
  background: var(--accent);
  color: #fff;
}

/* ===== Brand Strip ===== */
.brand-strip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  padding: 10px 8px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}

.brand-strip::-webkit-scrollbar {
  display: none;
}

.brand-pill {
  flex: 1;
  min-width: 106px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  border-radius: 10px;
  position: relative;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.brand-pill:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 22%;
  height: 56%;
  width: 1px;
  background: var(--divider);
}

.brand-pill:hover,
.brand-pill.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.brand-dot {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

/* ===== Content Grid (Left Feed + Right Sidebar) ===== */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
  margin-bottom: 22px;
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px 22px 24px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--divider);
  padding-bottom: 13px;
  margin-bottom: 18px;
}

.tab-list {
  display: flex;
  align-items: center;
  gap: 22px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px 0;
  position: relative;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.tab-btn:hover,
.tab-btn.active {
  color: var(--accent);
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
}

.more-link {
  font-size: 13px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.more-link:hover {
  color: var(--accent);
}

/* 1-Column Editorial Article Cards */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.article-card {
  display: flex;
  gap: 20px;
  padding: 16px 12px;
  margin: 0 -12px;
  border-radius: var(--radius-md);
  border-bottom: 1px solid var(--divider);
  transition: background 0.2s ease, transform 0.2s ease;
}

.article-card:last-child {
  border-bottom: none;
  padding-bottom: 6px;
}

.article-card:hover {
  background: var(--bg-subtle);
}

.article-thumb {
  width: 244px;
  height: 158px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-subtle);
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.article-card:hover .article-thumb img {
  transform: scale(1.05);
}

.article-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cat-tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  width: fit-content;
  margin-bottom: 8px;
}

.cat-tag.soft {
  background: var(--accent-soft);
  color: var(--accent);
}

.article-title {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.article-card:hover .article-title {
  color: var(--accent);
}

.article-excerpt {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.meta-left {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.meta-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.meta-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Sidebar Hot Articles */
.sidebar-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

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

.hot-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 4px;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.hot-item:hover {
  background: var(--bg-subtle);
}

.hot-rank {
  width: 22px;
  font-size: 16px;
  font-weight: 800;
  line-height: 52px;
  text-align: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.hot-item:nth-child(1) .hot-rank { color: #ef4444; }
.hot-item:nth-child(2) .hot-rank { color: #2563eb; }
.hot-item:nth-child(3) .hot-rank { color: #f59e0b; }

.hot-thumb {
  width: 74px;
  height: 54px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-subtle);
}

.hot-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.hot-item-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.hot-item:hover .hot-item-title {
  color: var(--accent);
}

.hot-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===== Footer Matrix Banner ===== */
.matrix-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(125deg, #e5f0ff 0%, #f5f9ff 48%, #dcebff 100%);
  border: 1px solid #d9e7fb;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow-card);
}

[data-theme="dark"] .matrix-banner {
  background: linear-gradient(125deg, #132038 0%, #162440 50%, #12213d 100%);
  border-color: var(--border);
}

.matrix-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.matrix-slogan-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  padding-left: 14px;
  border-left: 1px solid rgba(22, 119, 255, 0.2);
}

.matrix-center {
  flex: 1;
  min-width: 0;
}

.matrix-heading {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.matrix-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.matrix-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(22, 119, 255, 0.12);
  border-radius: 10px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

[data-theme="dark"] .matrix-card {
  background: rgba(19, 28, 46, 0.85);
  border-color: var(--border);
}

.matrix-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 6px 16px rgba(22, 119, 255, 0.14);
}

.matrix-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.matrix-info {
  min-width: 0;
  line-height: 1.25;
}

.matrix-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.matrix-handle {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.matrix-right {
  font-size: 14px;
  font-weight: 700;
  font-style: italic;
  color: #2563eb;
  white-space: nowrap;
  flex-shrink: 0;
}

[data-theme="dark"] .matrix-right {
  color: #93c5fd;
}

.site-copyright {
  text-align: center;
  padding: 20px 0 12px;
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.site-copyright a {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.site-copyright a:hover {
  color: var(--accent);
}

.site-copyright .beian-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
}

/* ===== Responsive ===== */
@media (max-width: 1120px) {
  .header-slogan,
  .matrix-right {
    display: none;
  }
  .content-layout {
    grid-template-columns: 1fr;
  }
  .matrix-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .matrix-cards {
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
  }
}

@media (max-width: 860px) {
  .main-nav,
  .search-box {
    display: none;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-main {
    height: 360px;
  }
  .hero-slide-content {
    max-width: 100%;
    padding: 24px 20px;
  }
  .hero-title {
    font-size: 22px;
  }
  .hero-side {
    height: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .hero-sub-card {
    height: 185px;
  }
  .articles-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .container {
    padding: 0 14px;
  }
  .hero-side {
    grid-template-columns: 1fr;
  }
  .article-thumb {
    width: 120px;
    height: 92px;
  }
  .matrix-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================================
   Article Detail Page (Single Post)
   ========================================= */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

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

.single-layout {
  display: grid;
  grid-template-columns: 204px minmax(0, 1fr) 310px;
  gap: 20px;
  align-items: start;
  margin-bottom: 28px;
}

/* Left Sticky Column: TOC + Actions */
.single-left {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.toc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 16px 14px;
}

.toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--divider);
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 360px;
  overflow-y: auto;
}

.toc-link {
  display: block;
  padding: 7px 10px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-secondary);
  border-radius: 7px;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.toc-link:hover {
  color: var(--accent);
  background: var(--bg-subtle);
}

.toc-link.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-left-color: var(--accent);
  font-weight: 600;
}

.toc-link.toc-h3 {
  padding-left: 20px;
  font-size: 12.5px;
}

.action-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover,
.action-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* Center Main Article */
.single-article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 30px 36px 36px;
}

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

.single-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.single-tag-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.single-title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 18px;
  letter-spacing: -0.2px;
}

.single-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--divider);
}

.single-author-wrap {
  display: flex;
  align-items: center;
  gap: 11px;
}

.single-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent-soft);
  background: #fff;
  flex-shrink: 0;
}

.single-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-author-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
}

.single-meta-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.tts-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(22, 119, 255, 0.28);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tts-btn:hover,
.tts-btn.speaking {
  background: var(--accent);
  color: #fff;
}

.single-summary-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Entry Content Typography */
.entry-content {
  font-size: 16px;
  line-height: 1.88;
  color: var(--text-primary);
}

.entry-content p {
  margin-bottom: 18px;
}

.entry-content h2,
.entry-content h3 {
  font-weight: 800;
  color: var(--text-primary);
  margin: 28px 0 14px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
  line-height: 1.4;
  scroll-margin-top: 94px;
}

.entry-content h2 {
  font-size: 20px;
}

.entry-content h3 {
  font-size: 17.5px;
}

.entry-content figure,
.entry-content img {
  border-radius: 12px;
  margin: 18px auto;
}

.entry-content figure img {
  margin: 0 auto;
  width: 100%;
  height: auto;
}

/* Right Sidebar Cards for Single Page */
.single-right {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.related-item {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 4px;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.related-item:hover {
  background: var(--bg-subtle);
}

.related-thumb {
  width: 88px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-subtle);
}

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

.related-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 5px;
}

.related-item:hover .related-title {
  color: var(--accent);
}

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

.tag-cloud-item {
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 12.5px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.tag-cloud-item:hover,
.tag-cloud-item.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.sidebar-matrix-card {
  background: linear-gradient(135deg, #e5f0ff 0%, #f4f8ff 55%, #dbeafe 100%);
  border: 1px solid #d7e6fc;
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

[data-theme="dark"] .sidebar-matrix-card {
  background: linear-gradient(135deg, #132038 0%, #172744 100%);
  border-color: var(--border);
}

.sidebar-matrix-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.sidebar-matrix-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.follow-pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
}

.mini-social-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mini-social-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.mini-social-dot:hover {
  transform: translateY(-2px);
}

.toast-tip {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(17, 24, 39, 0.9);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 999;
}

.toast-tip.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1120px) {
  .single-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .single-left {
    display: none;
  }
}

@media (max-width: 860px) {
  .single-layout {
    grid-template-columns: 1fr;
  }
  .single-article-card {
    padding: 22px 18px;
  }
  .single-title {
    font-size: 23px;
  }
}

/* Prev/Next, Pagination & Comments */
.single-nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--divider);
}

.single-nav-prev a,
.single-nav-next a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.single-nav-next a {
  text-align: right;
}

.single-nav-prev a:hover,
.single-nav-next a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.nav-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.pagination-wrap {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.pagination-wrap .nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination-wrap .page-numbers {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.pagination-wrap .page-numbers.current,
.pagination-wrap .page-numbers:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.comments-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.comment-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.comment-list .comment-body {
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.comment-list .comment-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 6px;
}

.comment-list .comment-author img {
  border-radius: 50%;
}

.comment-list .comment-metadata {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.comment-respond .comment-reply-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  margin-top: 6px;
  margin-bottom: 12px;
  outline: none;
}

.comment-form textarea:focus,
.comment-form input:focus {
  border-color: var(--accent);
  background: var(--bg-card);
}

.digimao-submit-btn {
  padding: 10px 24px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.digimao-submit-btn:hover {
  background: var(--accent-hover);
}
