
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --red: #BF2409;
  --orange: #EB611B;
  --orange-light: #EA7235;
  --black: #1A1A1A;
  --white: #FFFFFF;
  --bg: #E6E3E1;
  --card-bg: #F5F3F1;
  --text: #1A1A1A;
  --muted: #6F6D6C;
  --border: #D0CDC9;
}
body { font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif; color: var(--text); background: var(--bg); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Header */
header { background: var(--black); color: white; padding: 20px 0 0; }
.header-inner { display: flex; align-items: center; padding-bottom: 16px; }
.logo-link { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.logo-img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.logo-name { display: block; font-size: 1.15rem; font-weight: 700; color: white; line-height: 1.2; }
.logo-sub { display: block; font-size: 0.75rem; color: rgba(255,255,255,0.5); font-weight: 400; margin-top: 2px; }
.search-bar { padding: 0 24px 20px; }
#search { width: 100%; max-width: 640px; padding: 13px 18px; border: none; border-radius: 10px; font-size: 0.95rem; outline: none; font-family: inherit; box-shadow: 0 2px 12px rgba(0,0,0,0.2); }
#search:focus { box-shadow: 0 0 0 3px var(--orange), 0 2px 12px rgba(0,0,0,0.2); }

/* Main */
main { padding: 40px 24px; }
h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 8px; }
.subtitle { color: var(--muted); margin-bottom: 32px; font-size: 0.95rem; }

/* Category Cards */
.categories { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 40px; }
.category-card { background: var(--card-bg); border-radius: 14px; padding: 22px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); text-decoration: none; color: inherit; transition: transform 0.18s, box-shadow 0.18s; border: 1px solid var(--border); border-top: 3px solid var(--red); }
.category-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(191,36,9,0.15); border-top-color: var(--orange); }
.category-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 5px; color: var(--black); }
.category-card .count { font-size: 0.82rem; color: var(--muted); }
.category-icon { font-size: 1.8rem; margin-bottom: 10px; }

/* Article List */
.article-list { list-style: none; background: var(--card-bg); border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.article-list li { border-bottom: 1px solid var(--border); }
.article-list li:last-child { border-bottom: none; }
.article-list a { display: flex; align-items: center; gap: 10px; padding: 15px 20px; color: var(--text); text-decoration: none; font-size: 0.93rem; transition: background 0.15s, color 0.15s; }
.article-list a::before { content: '→'; color: var(--red); font-weight: 700; flex-shrink: 0; }
.article-list a:hover { background: rgba(191,36,9,0.06); color: var(--red); }

/* Breadcrumb */
.breadcrumb { font-size: 0.82rem; color: var(--muted); margin-bottom: 22px; }
.breadcrumb a { color: var(--red); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* Article Body */
.article-body { background: var(--card-bg); border-radius: 14px; padding: 44px; border: 1px solid var(--border); }
.article-body h1 { font-size: 1.65rem; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 3px solid var(--red); color: var(--black); }
.article-body h2 { font-size: 1.2rem; margin: 30px 0 12px; color: var(--black); font-weight: 600; }
.article-body h3 { font-size: 1.05rem; margin: 22px 0 8px; color: var(--black); font-weight: 600; }
.article-body h4 { font-size: 0.95rem; margin: 16px 0 8px; color: var(--black); font-weight: 600; }
.article-body p { line-height: 1.75; margin-bottom: 14px; color: #333; }
.article-body ul, .article-body ol { margin: 12px 0 18px 22px; }
.article-body li { line-height: 1.75; margin-bottom: 6px; }
.article-body code { background: rgba(191,36,9,0.08); color: var(--red); padding: 2px 7px; border-radius: 5px; font-size: 0.88em; }
.article-body pre { background: var(--black); color: #f0f0f0; padding: 22px; border-radius: 10px; overflow-x: auto; margin: 18px 0; }
.article-body a { color: var(--red); text-decoration: none; }
.article-body a:hover { color: var(--orange); text-decoration: underline; }
.source-link { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 0.83rem; color: var(--muted); }
.source-link a { color: var(--red); }

/* Search Results */
.search-results { display: none; }
.search-results.active { display: block; }
.no-results { color: var(--muted); padding: 48px 0; text-align: center; font-size: 0.95rem; }

/* Footer */
footer { padding: 36px 24px; text-align: center; color: var(--muted); font-size: 0.83rem; border-top: 1px solid var(--border); margin-top: 48px; }
footer strong { color: var(--red); }
footer a { color: var(--red); text-decoration: none; }

/* Responsive */
@media (max-width: 640px) {
  .categories { grid-template-columns: 1fr 1fr; }
  .article-body { padding: 24px; }
  h1 { font-size: 1.4rem; }
}
@media (max-width: 400px) {
  .categories { grid-template-columns: 1fr; }
}
