:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1b2430;
  --muted: #5b6676;
  --border: #e3e8f0;
  --accent: #b91c1c;
  --accent-dark: #991b1b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; border-radius: 8px; display: block; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 18px; }
.site-header {
  background: #141b24;
  color: #fff;
  border-bottom: 3px solid var(--accent);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.4px;
}
.brand:hover { text-decoration: none; }
.brand img { border-radius: 6px; width: 36px; height: 36px; object-fit: cover; }
.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 14px;
}
.main-nav a { color: #e2e8f0; font-weight: 500; }
.main-nav a:hover { color: #fff; }
.page-main { padding-top: 26px; padding-bottom: 42px; min-height: 70vh; }
.hero-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 24px;
}
.hero-box h1 { margin: 0 0 8px; font-size: 26px; line-height: 1.3; }
.hero-box p { margin: 0; color: var(--muted); }
.cat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.cat-pill {
  background: #fef2f2;
  color: var(--accent-dark);
  border: 1px solid #fecaca;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.post-card-thumb {
  background: #0f172a;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}
.post-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.post-meta { font-size: 12px; color: var(--muted); }
.post-card-title { margin: 0; font-size: 17px; line-height: 1.4; }
.post-card-title a { color: var(--text); font-weight: 700; }
.post-card-title a:hover { color: var(--accent); }
.post-excerpt { margin: 0; font-size: 14px; color: var(--muted); }
.article-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px;
}
.article-box h1 { margin-top: 0; font-size: 28px; line-height: 1.3; }
.article-content { font-size: 16px; }
.article-content figure { margin: 18px 0; }
.article-content table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.article-content th, .article-content td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
}
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.site-footer {
  background: #141b24;
  color: #cbd5e1;
  padding: 22px 0;
  font-size: 14px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.footer-copy { margin: 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-nav a { color: #e2e8f0; }
@media (max-width: 640px) {
  .article-box { padding: 18px; }
  .hero-box { padding: 18px; }
  .hero-box h1, .article-box h1 { font-size: 22px; }
}
