/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #1a1a2e; background: #f8f9fc; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.site-header { background: #fff; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 100; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-size: 1.3rem; font-weight: 800; color: #1a1a2e; }
.logo span { color: #6366f1; }
nav a { margin-left: 24px; font-size: 0.9rem; font-weight: 500; color: #555; transition: color .2s; }
nav a:hover { color: #6366f1; }

/* ===== Hero ===== */
.hero { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; padding: 72px 0 60px; text-align: center; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
.hero-sub { font-size: 1.1rem; opacity: 0.9; margin-bottom: 32px; }
.search-box input { width: min(560px, 90%); padding: 14px 20px; border-radius: 50px; border: none; font-size: 1rem; outline: none; box-shadow: 0 4px 20px rgba(0,0,0,0.15); }

/* ===== Categories ===== */
.categories { padding: 60px 0; }
.categories h2 { font-size: 1.7rem; font-weight: 700; margin-bottom: 32px; text-align: center; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.cat-card { background: #fff; border-radius: 12px; padding: 24px 20px; border: 1px solid #e5e7eb; transition: transform .2s, box-shadow .2s; display: block; }
.cat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); border-color: #6366f1; }
.cat-icon { font-size: 2rem; display: block; margin-bottom: 12px; }
.cat-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.cat-card p { font-size: 0.85rem; color: #666; margin-bottom: 12px; }
.cat-count { font-size: 0.75rem; background: #f0f0ff; color: #6366f1; padding: 2px 10px; border-radius: 20px; font-weight: 600; }

/* ===== Featured ===== */
.featured { background: #fff; padding: 60px 0; }
.featured h2 { font-size: 1.7rem; font-weight: 700; margin-bottom: 32px; text-align: center; }
.article-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.article-card { border: 1px solid #e5e7eb; border-radius: 12px; padding: 24px; display: block; transition: box-shadow .2s; position: relative; }
.article-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.1); border-color: #6366f1; }
.badge { font-size: 0.7rem; font-weight: 700; background: #fee2e2; color: #dc2626; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; margin-bottom: 10px; display: inline-block; }
.badge:contains("New") { background: #d1fae5; color: #059669; }
.article-card h3 { font-size: 1rem; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.article-card p { font-size: 0.875rem; color: #666; margin-bottom: 12px; }
.meta { font-size: 0.75rem; color: #9ca3af; font-weight: 500; }

/* ===== Trust ===== */
.trust { padding: 48px 0; background: #f0f0ff; }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; text-align: center; }
.trust-grid h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.trust-grid p { font-size: 0.875rem; color: #555; }

/* ===== Footer ===== */
.site-footer { background: #1a1a2e; color: #aaa; padding: 32px 0; text-align: center; font-size: 0.85rem; }
.site-footer a { color: #aaa; text-decoration: underline; margin: 0 6px; }
.disclaimer-note { margin-top: 8px; font-size: 0.8rem; opacity: 0.6; }

/* ===== Compare Page ===== */
.compare-table { width: 100%; border-collapse: collapse; margin: 32px 0; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.07); }
.compare-table th { background: #6366f1; color: #fff; padding: 14px 16px; text-align: left; font-size: 0.9rem; }
.compare-table td { padding: 14px 16px; border-bottom: 1px solid #f0f0f0; font-size: 0.9rem; vertical-align: top; }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:nth-child(even) td { background: #fafafa; }
.score { display: inline-block; background: #d1fae5; color: #059669; border-radius: 4px; padding: 1px 8px; font-weight: 700; font-size: 0.8rem; }
.score.mid { background: #fef3c7; color: #d97706; }
.score.low { background: #fee2e2; color: #dc2626; }

/* ===== Breadcrumb ===== */
.breadcrumb { font-size: 0.8rem; color: #9ca3af; padding: 16px 0; }
.breadcrumb a { color: #6366f1; }
.breadcrumb span { margin: 0 6px; }

/* ===== Article Content ===== */
.article-body { max-width: 780px; margin: 0 auto; padding: 40px 20px 80px; }
.article-body h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; line-height: 1.3; margin-bottom: 16px; }
.article-body .article-meta { color: #9ca3af; font-size: 0.85rem; margin-bottom: 32px; }
.article-body h2 { font-size: 1.4rem; font-weight: 700; margin: 40px 0 16px; }
.article-body h3 { font-size: 1.1rem; font-weight: 700; margin: 28px 0 12px; }
.article-body p { margin-bottom: 16px; color: #374151; }
.article-body ul, .article-body ol { margin: 0 0 16px 20px; }
.article-body li { margin-bottom: 6px; color: #374151; }

/* ===== CTA Box ===== */
.cta-box { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; border-radius: 12px; padding: 28px 32px; margin: 40px 0; text-align: center; }
.cta-box h3 { font-size: 1.2rem; margin-bottom: 10px; }
.cta-box p { opacity: 0.9; margin-bottom: 20px; font-size: 0.9rem; }
.btn { display: inline-block; background: #fff; color: #6366f1; padding: 12px 28px; border-radius: 8px; font-weight: 700; font-size: 0.95rem; transition: transform .15s; }
.btn:hover { transform: translateY(-1px); }

/* ===== TOC ===== */
.toc { background: #f8f9fc; border: 1px solid #e5e7eb; border-radius: 10px; padding: 20px 24px; margin: 32px 0; }
.toc h2 { font-size: 0.95rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #6366f1; margin-bottom: 12px; }
.toc ol { margin-left: 18px; }
.toc li { margin-bottom: 6px; font-size: 0.9rem; }
.toc a { color: #6366f1; text-decoration: underline; }

/* ===== Answer Box ===== */
.answer-box { background: #fffbeb; border-left: 4px solid #f59e0b; border-radius: 0 8px 8px 0; padding: 18px 20px; margin: 20px 0 32px; }
.answer-box p { margin: 0; color: #374151; }

/* ===== FAQ ===== */
.faq-item { border-bottom: 1px solid #e5e7eb; padding: 20px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; color: #1a1a2e; }
.faq-item p { margin: 0; font-size: 0.9rem; color: #374151; }

/* ===== Mobile ===== */
@media (max-width: 600px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-card { padding: 16px 14px; }
  nav { display: none; }
}
