*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --border: #e8e4dc;
  --text: #111111;
  --muted: #5a5a5a;
  --accent: #2d5a27;
  --accent-light: #f0f4ef;
  --font: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  background: var(--surface);
}
.site-header .inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
}
.site-title a { color: var(--text); }
.site-nav { font-size: 13px; color: var(--muted); }
.admin-link { font-size: 12px; color: var(--muted); }

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* Filter tabs */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 5px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.6;
}
.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Index */
.page-heading {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.article-list { list-style: none; }
.article-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.article-list li:last-child { border-bottom: none; }

.article-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.article-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
}
.article-title a { color: var(--text); }
.article-title a:hover { color: var(--accent); text-decoration: none; }
.article-excerpt {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
}

/* Article */
.article-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.article-header .meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}
.article-header h1 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  color: #0f0f0f;
}

.article-body { font-size: 17px; line-height: 2; color: #111; }
.article-body h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 48px 0 18px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
  color: #0f0f0f;
}
.article-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: #1a1a1a;
}
.article-body h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 24px 0 8px;
  color: #1a1a1a;
}
.article-body p { margin-bottom: 20px; color: #111; }
.article-body li { color: #111; margin-bottom: 6px; }
.article-body strong { font-weight: 700; color: #0a0a0a; }
.article-body pre {
  background: #f4f2ef;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.7;
  overflow-x: auto;
  margin: 20px 0;
  color: #222;
  font-family: 'Courier New', Courier, monospace;
}

.article-footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}
.article-footer a { color: var(--accent); }

/* Research box */
.research-box {
  background: var(--accent-light);
  border: 1px solid #c8dcc5;
  border-radius: 6px;
  padding: 24px 28px;
  margin: 40px 0;
  font-size: 16px;
}
.research-box h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.research-box .framework {
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 16px;
  color: #111;
}
.research-box .framework-detail {
  color: #222;
  margin-bottom: 16px;
  line-height: 1.8;
  font-size: 15px;
}

/* Back link */
.back-link {
  display: inline-block;
  margin-bottom: 32px;
  font-size: 13px;
  color: var(--muted);
}
.back-link:hover { color: var(--accent); text-decoration: none; }

@media (max-width: 600px) {
  main { padding: 32px 16px 60px; }
  .site-header .inner { padding: 0 16px; }
  .article-header h1 { font-size: 24px; }
  .article-body { font-size: 16px; }
}

/* Like button */
.article-actions {
  margin-top: 10px;
}
.like-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.like-btn:hover { border-color: #e05; color: #e05; }
.like-btn.liked { background: #fff0f3; border-color: #e05; color: #e05; }
.like-btn .like-icon { font-size: 14px; line-height: 1; }
.like-btn .like-count { font-size: 11px; }

/* Article page like button */
.article-like-wrap {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.article-like-wrap .like-btn { font-size: 14px; padding: 6px 18px; }
