* { box-sizing: border-box; }

/* ---------- Home ------------------------------------------------------- */

.page-home {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #333;
  background: #fff;
  line-height: 1.6;
}
.page-home a { color: #1a6fc4; text-decoration: none; }
.page-home a:hover { text-decoration: underline; }
.page-home .site-header {
  background: #f7f7f7;
  border-bottom: 1px solid #e5e5e5;
  padding: 24px 0;
  text-align: center;
}
.page-home .site-title { margin: 0; font-size: 2.4rem; font-weight: 700; }
.page-home .site-title a { color: #222; }
.page-home .container { max-width: 900px; margin: 0 auto; padding: 24px 20px; }
.page-home .home-logo { width: 200px; position: absolute; top: 0; }
.page-home .lead { color: #666; margin: 0 0 24px; }
.page-home .post { border-bottom: 1px solid #ddd; padding-bottom: 22px; margin-bottom: 22px; }
.page-home .post:last-of-type { border-bottom: none; }
.page-home .post h2 { font-size: 1.25rem; margin: 0 0 4px; }
.page-home .post h2 a { color: #222; }
.page-home .post .meta { font-size: 0.82rem; color: #999; margin: 0 0 10px; }
.page-home .post p { margin: 0 0 8px; font-size: 0.95rem; }
.page-home .empty { color: #999; text-align: center; padding: 40px 0; }
.page-home .site-footer {
  background: #f7f7f7;
  border-top: 1px solid #e5e5e5;
  padding: 16px;
  text-align: center;
  font-size: 0.85rem;
  color: #888;
}

/* ---------- Category --------------------------------------------------- */

.page-cat * { margin: 0; padding: 0; }
.page-cat {
  font-family: Arial, sans-serif;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 24px;
  color: #333;
  line-height: 1.7;
}
.page-cat header { border-bottom: 2px solid #0073aa; padding-bottom: 12px; margin-bottom: 28px; }
.page-cat header a { font-size: 1rem; color: #0073aa; text-decoration: none; }
.page-cat header .site { font-size: 1.6rem; font-weight: bold; }
.page-cat h1 { font-size: 1.7rem; margin-bottom: 12px; }
.page-cat h2.section { font-size: 1.2rem; margin: 28px 0 14px; color: #444; border-bottom: 1px solid #ddd; padding-bottom: 6px; }
.page-cat .sub-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 8px; }
.page-cat .sub-card { border: 1px solid #e5e5e5; border-radius: 6px; padding: 14px 16px; }
.page-cat .sub-card a { color: #0073aa; font-weight: 600; text-decoration: none; }
.page-cat .sub-card a:hover { text-decoration: underline; }
.page-cat .sub-card .count { display: block; color: #888; font-size: 0.85rem; margin-top: 3px; }
.page-cat .post { border-bottom: 1px solid #ddd; padding-bottom: 22px; margin-bottom: 22px; }
.page-cat .post:last-of-type { border-bottom: none; }
.page-cat .post h2 { font-size: 1.15rem; margin-bottom: 4px; }
.page-cat .post h2 a { color: #0073aa; text-decoration: none; }
.page-cat .post h2 a:hover { text-decoration: underline; }
.page-cat .meta { font-size: 0.82rem; color: #999; margin-bottom: 10px; }
.page-cat .post p { margin-bottom: 8px; font-size: 0.95rem; }
.page-cat .empty { color: #999; padding: 12px 0; }
.page-cat footer { border-top: 1px solid #ddd; margin-top: 36px; padding-top: 12px; font-size: 0.8rem; color: #aaa; text-align: center; }

/* ---------- Pagination (home + category) ------------------------------- */

.pagination { margin: 24px 0; }
.pagination a { color: #1a6fc4; font-weight: bold; text-decoration: none; }
.page-cat .pagination a { color: #0073aa; }
.pagination a:hover { text-decoration: underline; }
.pagination strong { margin: 0 6px; }

/* ---------- Single post ------------------------------------------------ */

:is(.page-single, body:not([class])) {
  font-family: Georgia, serif;
  max-width: 860px;
  margin: 0 auto;
  padding: 30px 20px;
  color: #222;
  line-height: 1.7;
  background: #fff;
}
:is(.page-single, body:not([class])) header { border-bottom: 2px solid #ccc; margin-bottom: 24px; padding-bottom: 10px; }
:is(.page-single, body:not([class])) header a { font-size: 1.4em; font-weight: bold; text-decoration: none; color: #1a1a8c; }
:is(.page-single, body:not([class])) h1 { font-size: 2em; margin-bottom: 4px; }
:is(.page-single, body:not([class])) .meta { font-size: 0.85em; color: #666; margin-bottom: 24px; }
:is(.page-single, body:not([class])) h2 { font-size: 1.25em; margin-top: 32px; border-left: 4px solid #1a1a8c; padding-left: 10px; }
:is(.page-single, body:not([class])) img { max-width: 100%; height: auto; margin: 12px 0; display: block; }
:is(.page-single, body:not([class])) ul { padding-left: 20px; }
:is(.page-single, body:not([class])) ul li { margin-bottom: 6px; }
:is(.page-single, body:not([class])) ul li a { color: #1a1a8c; text-decoration: none; }
:is(.page-single, body:not([class])) ul li a:hover { text-decoration: underline; }
:is(.page-single, body:not([class])) .recent-posts { margin-top: 40px; padding-top: 16px; border-top: 1px solid #ddd; }
:is(.page-single, body:not([class])) footer { margin-top: 40px; font-size: 0.8em; color: #999; border-top: 1px solid #eee; padding-top: 12px; }
:is(.page-single, body:not([class])) p { margin: 12px 0; }
