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

:root {
    --ink:    #1a1a2e;
    --muted:  #6b7280;
    --line:   #e5e7eb;
    --paper:  #f9fafb;
    --blue:   #2563eb;
    --white:  #ffffff;
    --navy:   #1a2e4a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    margin: 0;
}

a { color: var(--blue); }
a:hover { text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── Header ── */
.blog-header {
    background: var(--navy);
    padding: 0 24px;
}
.blog-header-inner {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 16px;
}
.blog-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
}
.blog-brand-mark {
    width: 38px;
    height: 38px;
    background: var(--blue);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}
.blog-brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.blog-brand-name {
    font-weight: 700;
    font-size: 14px;
}
.blog-brand-tag {
    font-size: 11px;
    opacity: 0.65;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.blog-member-link {
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    white-space: nowrap;
}
.blog-member-link:hover { color: white; }

/* ── Shell ── */
.blog-shell {
    max-width: 820px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

/* ── Notices ── */
.blog-notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: 14px;
}
.blog-notice.success { background: #d1fae5; color: #065f46; }
.blog-notice.error   { background: #fee2e2; color: #991b1b; }

/* ── Post list ── */
.blog-posts {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.blog-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}
.blog-card-image-wrap { display: block; }
.blog-card-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
}
.blog-card-body {
    padding: 28px;
}
.blog-card-meta {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 10px;
}
.blog-card-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.3;
}
.blog-card-title a {
    text-decoration: none;
    color: var(--ink);
}
.blog-card-title a:hover { color: var(--blue); }
.blog-card-excerpt {
    font-size: 15px;
    color: var(--muted);
    margin: 0 0 16px;
    line-height: 1.6;
}
.blog-read-more {
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

/* ── Pagination ── */
.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-top: 1px solid var(--line);
    margin-top: 16px;
}
.blog-page-btn {
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
    color: var(--ink);
}
.blog-page-btn:hover { border-color: var(--blue); color: var(--blue); }
.blog-page-info { font-size: 13px; color: var(--muted); }

.blog-empty { color: var(--muted); font-size: 15px; }

/* ── Single post ── */
.blog-post { background: var(--white); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 40px; }
.blog-post-hero img { width: 100%; max-height: 420px; object-fit: cover; }
.blog-post-header { padding: 36px 40px 24px; border-bottom: 1px solid var(--line); }
.blog-post-meta { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.blog-post-title { font-size: 32px; font-weight: 800; margin: 0 0 12px; line-height: 1.25; }
.blog-post-excerpt { font-size: 17px; color: var(--muted); margin: 0; line-height: 1.6; }

.blog-post-content {
    padding: 36px 40px;
    font-size: 16px;
    line-height: 1.8;
    color: #374151;
}
.blog-post-content h2 { font-size: 24px; font-weight: 700; margin: 32px 0 12px; color: var(--ink); }
.blog-post-content h3 { font-size: 20px; font-weight: 700; margin: 24px 0 10px; color: var(--ink); }
.blog-post-content p { margin: 0 0 18px; }
.blog-post-content ul, .blog-post-content ol { margin: 0 0 18px; padding-left: 24px; }
.blog-post-content li { margin-bottom: 6px; }
.blog-post-content blockquote { border-left: 3px solid var(--blue); margin: 24px 0; padding: 12px 20px; background: #eff6ff; color: #1e40af; font-style: italic; border-radius: 0 6px 6px 0; }
.blog-post-content a { color: var(--blue); }
.blog-post-content img { border-radius: 6px; margin: 24px 0; }
.blog-post-content strong { color: var(--ink); }
.blog-post-content pre { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 16px; overflow-x: auto; font-size: 14px; margin: 0 0 18px; }

.blog-post-footer { padding: 20px 40px; border-top: 1px solid var(--line); }
.blog-back { font-size: 14px; font-weight: 600; text-decoration: none; }

/* ── Comments ── */
.blog-comments-section {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 36px 40px;
}
.blog-comments-heading {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}
.blog-comment {
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}
.blog-comment:last-of-type { border-bottom: none; }
.blog-comment-meta {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
}
.blog-comment-meta strong { font-size: 15px; }
.blog-comment-date { font-size: 12px; color: var(--muted); }
.blog-comment-body { font-size: 15px; line-height: 1.6; color: #374151; }

.blog-comment-form-wrap { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.blog-comment-form-wrap h3 { font-size: 18px; font-weight: 700; margin: 0 0 20px; }
.blog-comment-form { display: flex; flex-direction: column; gap: 14px; }
.blog-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.blog-comment-form label { display: flex; flex-direction: column; gap: 5px; font-size: 14px; font-weight: 600; }
.blog-comment-form input, .blog-comment-form textarea {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 9px 12px;
    font-size: 15px;
    font-family: inherit;
    width: 100%;
    background: var(--paper);
    transition: border-color 0.15s;
}
.blog-comment-form input:focus, .blog-comment-form textarea:focus {
    outline: none;
    border-color: var(--blue);
    background: var(--white);
}
.blog-comment-form textarea { resize: vertical; min-height: 120px; }
.req { color: #dc2626; }
.req-note { font-weight: 400; color: var(--muted); font-size: 12px; }
.blog-submit-btn {
    display: inline-block;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 11px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    align-self: flex-start;
    font-family: inherit;
    transition: background 0.15s;
}
.blog-submit-btn:hover { background: #1d4ed8; }

/* ── Footer ── */
.blog-footer { background: var(--navy); padding: 24px; margin-top: auto; }
.blog-footer-inner { max-width: 820px; margin: 0 auto; }
.blog-footer p { margin: 0; font-size: 13px; color: rgba(255,255,255,0.5); }
.blog-footer a { color: rgba(255,255,255,0.7); }
.blog-footer a:hover { color: white; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .blog-shell { padding: 24px 16px 60px; }
    .blog-post-header, .blog-post-content, .blog-post-footer { padding-left: 20px; padding-right: 20px; }
    .blog-comments-section { padding: 24px 20px; }
    .blog-post-title { font-size: 24px; }
    .blog-form-row { grid-template-columns: 1fr; }
}
