:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #0f766e;
  --primary-hover: #115e59;
  --primary-soft: #f0fdfa;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.68; font-size: 16px;
}
a { color: var(--primary); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 18px; }

/* 1. Two-Tier Header (Logo Slot + Right Brand Slot + Nav Bar) */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; box-shadow: var(--shadow); }
.header-brand-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; }
.brand-wrap { display: flex; align-items: center; gap: 14px; color: var(--text); min-width: 0; flex: 1; }
.brand-text { min-width: 0; }
.site-logo { max-height: 52px; width: auto; border-radius: 8px; object-fit: contain; flex-shrink: 0; }
.logo-emblem { width: 46px; height: 46px; border-radius: 10px; background: linear-gradient(135deg, var(--primary) 0%, #0d9488 100%); color: #fff; font-weight: 800; font-size: 1.35rem; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 2px 6px rgba(15, 118, 110, 0.25); }
.logo-emblem-sm { width: 36px; height: 36px; font-size: 1.05rem; border-radius: 8px; }
.brand-title { font-size: 1.38rem; font-weight: 800; color: #0f172a; line-height: 1.2; letter-spacing: -0.02em; display: block; }
.brand-tagline { font-size: 0.84rem; color: var(--muted); display: block; margin-top: 2px; }
.header-Highlight { text-align: right; max-width: 420px; background: var(--bg); border: 1px dashed var(--border); padding: 8px 14px; border-radius: 8px; }
.header-domain-badge { font-size: 0.76rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.04em; display: block; }
.header-desc { font-size: 0.8rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.header-nav-bar { background: #f1f5f9; border-top: 1px solid var(--border); }
.header-right { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 18px; flex-wrap: wrap; }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--border); padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 0.9rem; color: var(--text); flex-shrink: 0; white-space: nowrap; }
.main-nav ul { display: flex; align-items: center; gap: 8px; list-style: none; flex-wrap: wrap; }
.main-nav a { color: #334155; font-weight: 600; font-size: 0.92rem; padding: 6px 11px; border-radius: 6px; display: inline-block; }
.main-nav a:hover { color: var(--primary); background: var(--surface); }
.search-form { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px 12px; }
.search-form input { border: none; background: transparent; padding: 4px 6px; font-size: 0.86rem; color: var(--text); outline: none; width: 175px; }
.search-form button { border: none; background: transparent; color: var(--primary); font-weight: 700; cursor: pointer; font-size: 0.84rem; padding-left: 6px; }

/* 2. Hero & Custom Site Banner Slots */
.site-banner-wrap { margin-top: 20px; }
.site-banner-box { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.site-banner-img { width: 100%; max-height: 280px; object-fit: cover; }
.site-banner-caption { background: rgba(15, 23, 42, 0.78); color: #f8fafc; padding: 10px 18px; font-size: 0.92rem; }
.hero-intro-banner { background: linear-gradient(135deg, #0f172a 0%, #134e4a 100%); color: #fff; border-radius: var(--radius); padding: 28px 32px; box-shadow: var(--shadow); }
.hero-kicker { display: inline-block; background: rgba(255, 255, 255, 0.14); color: #5eead4; font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; }
.hero-title { font-size: 1.65rem; font-weight: 800; line-height: 1.25; margin-bottom: 6px; }
.hero-subtitle { color: #cbd5e1; font-size: 0.96rem; max-width: 760px; margin-bottom: 14px; }
.hero-topic-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-pill { background: rgba(255, 255, 255, 0.12); color: #f1f5f9; font-size: 0.82rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.18); }
.topic-pill:hover { background: #14b8a6; color: #0f172a; border-color: #14b8a6; }

/* 3. Main 2-Column Layout & Spotlight Magazine Grid */
.main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; padding: 24px 18px 44px; align-items: start; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid var(--border); }
.section-title { font-size: 1.25rem; font-weight: 800; color: #0f172a; }
.section-more { font-size: 0.88rem; font-weight: 600; }
.category-block-desc { font-size: 0.9rem; color: var(--muted); margin: -6px 0 14px; }
.featured-section, .category-block { margin-bottom: 32px; }
.spotlight-layout { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; align-items: stretch; }
.spotlight-single { grid-template-columns: 1fr; }
.spotlight-thumb-link .post-thumb, .spotlight-placeholder { height: 240px; }
.spotlight-title { font-size: 1.28rem; font-weight: 800; line-height: 1.35; margin-bottom: 10px; }
.spotlight-title a { color: #0f172a; }
.spotlight-side { display: flex; flex-direction: column; gap: 12px; }
.spotlight-side-card { flex-direction: row; align-items: stretch; }
.spotlight-side-thumb { width: 120px; flex-shrink: 0; background: #e2e8f0; overflow: hidden; display: block; }
.spotlight-side-thumb img, .spotlight-side-thumb .post-thumb-placeholder { width: 100%; height: 100%; min-height: 104px; object-fit: cover; font-size: 0.75rem; }
.ad-header-wrap { margin-top: 16px; }
.ad-slot { background: var(--surface); border: 1px dashed #cbd5e1; border-radius: var(--radius); padding: 10px 14px 12px; margin: 16px 0; text-align: center; overflow: hidden; }
.sidebar-col .ad-slot, .ad-header-wrap .ad-slot { margin: 0; }
.ad-slot-label { display: block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #94a3b8; margin-bottom: 6px; }
.ad-placeholder-box { background: linear-gradient(135deg, #f8fafc 0%, #f0fdfa 100%); border: 1px solid #99f6e4; border-radius: 8px; padding: 16px 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #0f766e; font-size: 0.85rem; min-height: 90px; }
.ad-slot-sidebar .ad-placeholder-box { min-height: 220px; }
.ad-slot-sidebar_sticky .ad-placeholder-box { min-height: 280px; }
.ad-placeholder-box span { color: var(--muted); font-size: 0.78rem; }
.sidebar-sticky-wrap { position: sticky; top: 82px; }

/* 4. Post Cards & Lists */
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.post-list { display: flex; flex-direction: column; gap: 16px; }
.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.post-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08); }
.post-card-row { flex-direction: row; align-items: stretch; }
.post-thumb-link { display: block; background: #e2e8f0; overflow: hidden; flex-shrink: 0; }
.post-card .post-thumb { width: 100%; height: 180px; object-fit: cover; }
.post-card-row .post-thumb-link { width: 220px; }
.post-card-row .post-thumb, .post-card-row .post-thumb-placeholder { height: 100%; min-height: 150px; }
.post-thumb-placeholder { width: 100%; height: 180px; background: linear-gradient(135deg, #ccfbf1 0%, #e0f2fe 100%); display: flex; align-items: center; justify-content: center; color: var(--primary); font-weight: 700; font-size: 0.86rem; padding: 12px; text-align: center; }
.post-body { padding: 14px 16px; display: flex; flex-direction: column; flex: 1; }
.post-badge { display: inline-block; align-self: flex-start; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; background: var(--primary-soft); color: var(--primary); padding: 2px 8px; border-radius: 4px; margin-bottom: 6px; }
.post-title { font-size: 1.02rem; font-weight: 700; line-height: 1.38; margin-bottom: 6px; }
.post-title a { color: #0f172a; }
.post-title a:hover, .spotlight-title a:hover { color: var(--primary); }
.post-excerpt { font-size: 0.9rem; color: #475569; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { margin-top: auto; font-size: 0.78rem; color: var(--muted); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* 5. Article Detail & Auto TOC */
.post-detail, .page-detail { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 0.85rem; color: var(--muted); margin-bottom: 14px; list-style: none; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: #cbd5e1; }
.article-title { font-size: 1.75rem; font-weight: 800; color: #0f172a; line-height: 1.3; margin-bottom: 12px; }
.article-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 0.85rem; color: var(--muted); padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.article-lead { font-size: 1.04rem; font-weight: 600; color: #334155; background: #f8fafc; border-left: 4px solid var(--primary); padding: 12px 16px; border-radius: 0 6px 6px 0; margin-bottom: 20px; }
.toc-box { background: var(--primary-soft); border: 1px solid #99f6e4; border-radius: 8px; padding: 14px 18px; margin-bottom: 22px; }
.toc-header { display: flex; align-items: center; justify-content: space-between; font-weight: 700; color: #0f172a; font-size: 0.95rem; }
.toc-toggle { background: var(--surface); border: 1px solid #99f6e4; color: var(--primary); font-size: 0.8rem; font-weight: 600; padding: 3px 10px; border-radius: 4px; cursor: pointer; }
.toc-list { list-style: none; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #99f6e4; display: flex; flex-direction: column; gap: 6px; font-size: 0.91rem; }
.toc-list.is-collapsed { display: none; }
.toc-item-h3 { padding-left: 18px; font-size: 0.87rem; }
.entry-content { font-size: 1.02rem; color: #1e293b; line-height: 1.76; overflow-wrap: break-word; word-break: break-word; }
.entry-content table, .entry-content pre, .entry-content iframe { max-width: 100%; overflow-x: auto; display: block; }
.entry-content h2 { font-size: 1.38rem; font-weight: 800; color: #0f172a; margin: 26px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); scroll-margin-top: 80px; }
.entry-content h3 { font-size: 1.16rem; font-weight: 700; color: #1e293b; margin: 20px 0 8px; scroll-margin-top: 80px; }
.entry-content p, .entry-content ul, .entry-content ol, .entry-content blockquote { margin-bottom: 15px; }
.entry-content ul, .entry-content ol { padding-left: 22px; }
.entry-content blockquote { border-left: 4px solid var(--primary); background: #f8fafc; padding: 12px 16px; font-style: italic; color: #475569; }
.article-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px dashed var(--border); }
.tags-label { font-size: 0.82rem; font-weight: 700; color: var(--muted); margin-right: 4px; }
.tag-chip { background: #f1f5f9; color: #334155; font-size: 0.8rem; font-weight: 600; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--border); }
.tag-chip:hover { background: var(--primary-soft); color: var(--primary); border-color: #99f6e4; }
.related-section { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--border); }

/* 6. Sidebar Widgets & Brand Footer */
.sidebar-col { display: flex; flex-direction: column; gap: 20px; }
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.brand-sidebar-card { background: linear-gradient(180deg, var(--primary-soft) 0%, var(--surface) 100%); border-color: #99f6e4; }
.brand-sidebar-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.sidebar-logo { max-height: 38px; width: auto; border-radius: 6px; }
.brand-sidebar-name { font-size: 1.02rem; font-weight: 800; color: #0f172a; line-height: 1.25; }
.brand-sidebar-desc { font-size: 0.87rem; color: #475569; margin-bottom: 10px; }
.sidebar-cta-btn { display: block; text-align: center; background: var(--primary); color: #fff; font-weight: 700; font-size: 0.85rem; padding: 8px 12px; border-radius: 6px; }
.sidebar-cta-btn:hover { background: var(--primary-hover); color: #fff; }
.widget-title { font-size: 1.02rem; font-weight: 800; color: #0f172a; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); }
.cat-list, .popular-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.cat-list li a { display: flex; align-items: center; justify-content: space-between; color: #334155; font-weight: 500; font-size: 0.92rem; padding: 3px 0; }
.cat-count { background: #f1f5f9; color: var(--muted); font-size: 0.75rem; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.popular-item { display: flex; gap: 10px; align-items: flex-start; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.popular-item:last-child { border-bottom: none; padding-bottom: 0; }
.popular-rank { width: 24px; height: 24px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: 0.78rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.popular-title { font-size: 0.89rem; font-weight: 600; line-height: 1.36; color: #1e293b; display: block; }
.popular-meta { font-size: 0.75rem; color: var(--muted); margin-top: 2px; display: block; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.page-link { padding: 7px 13px; border: 1px solid var(--border); background: var(--surface); border-radius: 6px; font-weight: 600; font-size: 0.88rem; color: var(--text); }
.page-link.active, .page-link:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.empty-box { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 32px; text-align: center; color: var(--muted); }
.site-footer { background: #0f172a; color: #cbd5e1; padding: 34px 0 28px; margin-top: 20px; font-size: 0.9rem; }
.footer-brand-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-logo-line { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.footer-site-name { font-size: 1.1rem; color: #fff; }
.footer-menus { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; }
.footer-menus a { color: #e2e8f0; font-weight: 600; }
.footer-menus a:hover { color: #5eead4; }
.footer-custom { color: #94a3b8; line-height: 1.65; max-width: 680px; }

@media (max-width: 900px) {
  .main-grid, .spotlight-layout, .post-grid { grid-template-columns: 1fr; }
  .header-Highlight { display: none; }
  .post-card-row { flex-direction: column; }
  .post-card-row .post-thumb-link { width: 100%; }
  .nav-toggle { display: inline-block; }
  .header-right { display: none; width: 100%; flex-direction: column; align-items: stretch; padding: 10px 18px; }
  .header-right.is-open { display: flex; }
  .main-nav, .main-nav ul, .main-nav li, .main-nav a { width: 100%; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .search-form, .search-form input { width: 100%; }
  .post-detail, .page-detail { padding: 18px 16px; }
  .hero-intro-banner { padding: 20px 18px; }
  .article-title { font-size: 1.42rem; }
  .hero-title { font-size: 1.38rem; }
}
@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .header-brand-bar { padding: 12px 14px; gap: 10px; }
  .brand-title { font-size: 1.15rem; }
  .brand-tagline { font-size: 0.78rem; }
  .spotlight-side-thumb { width: 104px; }
  .footer-brand-row, .footer-menus { flex-direction: column; gap: 12px; }
}
