:root {
    --max-width: 1100px;
    --text: #1a1a1a;
    --muted: #6b7280;
    --border: #e5e7eb;
    --accent: #2563eb;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    line-height: 1.65;
    background: #fff;
}

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

img { max-width: 100%; height: auto; display: block; border-radius: 8px; }

.site-header {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 16px;
    border-bottom: 1px solid var(--border);
}
.site-logo { font-size: 1.3rem; font-weight: 700; color: var(--text); }

.site-main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 32px 16px;
    min-height: 60vh;
}

/* Homepage grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}
.article-card {
    display: block;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    color: var(--text);
}
.article-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); text-decoration: none; }
.article-card img { border-radius: 0; aspect-ratio: 16/10; object-fit: cover; }
.article-card-body { padding: 14px 16px; }
.article-card-body h2 { font-size: 1.05rem; margin: 0 0 8px; }
.article-card-body p { color: var(--muted); font-size: 0.9rem; margin: 0 0 10px; }
.article-meta { font-size: 0.8rem; color: var(--muted); }

.pagination {
    display: flex; justify-content: center; align-items: center; gap: 16px;
    margin-top: 40px; color: var(--muted); font-size: 0.9rem;
}

/* Article detail */
.article-detail h1 { font-size: 2rem; margin-bottom: 8px; }
.article-meta-bar { color: var(--muted); font-size: 0.9rem; margin-bottom: 24px; display: flex; gap: 8px; }
.article-detail .article-hero img,
.article-detail .intro-image img,
.article-detail .core-image img,
.article-detail .outro-image img { margin: 20px 0; }
.article-detail h2 { margin-top: 32px; font-size: 1.4rem; }
.article-detail h3 { margin-top: 24px; font-size: 1.15rem; }
.related-terms { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); }
.related-terms p { font-weight: 600; font-size: 0.85rem; color: var(--muted); text-transform: uppercase; }
.related-posts { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); }
.related-posts ul { padding-left: 20px; }
.related-posts li { margin-bottom: 6px; }
.manual-internal-link { font-style: italic; }

.static-page h1 { font-size: 1.8rem; }

.site-footer {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 16px 40px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center;
}
.footer-nav { display: flex; justify-content: center; gap: 18px; margin-bottom: 12px; flex-wrap: wrap; }
