/* ═══════════════════════════════════════════════════════
   NeuralGate Blog Styles
   ═══════════════════════════════════════════════════════ */

/* ── Post layout ── */
.post {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.post-header {
    padding-top: 40px;
    margin-bottom: 32px;
}

.post-back {
    display: inline-block;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.post-back:hover { color: var(--accent-light); }

.post-meta {
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.post-header h1 {
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    line-height: 1.2;
}

.post-hero {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 40px;
    border: 1px solid var(--border);
}

/* ── Post body ── */
.post-body {
    line-height: 1.75;
    font-size: 16px;
}

.post-body p {
    margin-bottom: 16px;
}

.post-lead {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.post-hint {
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
}

.post-body h2 {
    margin-top: 48px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    font-size: clamp(1.3rem, 3vw, 1.7rem);
}

.post-body h3 {
    margin-top: 32px;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.post-body hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 32px 0;
}

.post-body ul, .post-body ol {
    margin: 12px 0 20px 24px;
}
.post-body li {
    margin-bottom: 6px;
}

.post-body strong {
    color: var(--text);
    font-weight: 600;
}

.post-body em {
    color: var(--text-secondary);
}

/* ── Images ── */
.post-img {
    width: 100%;
    border-radius: var(--radius-sm);
    margin: 24px 0;
    border: 1px solid var(--border);
}

/* ── Tables ── */
.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    font-size: 14px;
}
.post-body th {
    text-align: left;
    padding: 10px 12px;
    background: var(--bg-surface);
    color: var(--accent-light);
    font-weight: 600;
    border-bottom: 1px solid var(--border-light);
}
.post-body td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.post-body tr:hover td {
    background: rgba(99,102,241,0.03);
}

/* ── Code ── */
.post-body pre {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 18px 22px;
    overflow-x: auto;
    margin: 16px 0 24px;
    font-size: 13.5px;
    line-height: 1.55;
}

.post-body code {
    font-family: var(--font-mono);
    font-size: 13.5px;
}

.post-body p code,
.post-body td code,
.post-body li code {
    background: rgba(99,102,241,0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
    color: var(--accent-light);
}

/* ── Diagram ── */
.post-diagram {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin: 16px 0 24px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent-light);
    text-align: center;
    overflow-x: auto;
    white-space: nowrap;
}

/* ── Pipeline ── */
.post-pipeline {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
    margin: 16px 0 24px;
    font-size: 13px;
}
.post-pipeline span {
    padding: 6px 14px;
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 6px;
    color: var(--accent-light);
    font-weight: 600;
    white-space: nowrap;
}
.post-pipeline .arrow {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0 2px;
    font-weight: 400;
}

/* Circuit breaker states */
.state-green { background: rgba(16,185,129,0.1) !important; border-color: rgba(16,185,129,0.3) !important; color: var(--success) !important; }
.state-red { background: rgba(239,68,68,0.1) !important; border-color: rgba(239,68,68,0.3) !important; color: var(--error) !important; }
.state-yellow { background: rgba(245,158,11,0.1) !important; border-color: rgba(245,158,11,0.3) !important; color: var(--warning) !important; }

/* ── Bug cards ── */
.bug-card {
    background: rgba(245,158,11,0.04);
    border: 1px solid rgba(245,158,11,0.15);
    border-left: 3px solid rgba(245,158,11,0.5);
    border-radius: var(--radius-sm);
    padding: 18px 22px;
    margin: 16px 0;
}
.bug-card h4 {
    color: var(--warning);
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
}
.bug-card p {
    font-size: 14.5px;
    margin-bottom: 8px;
}
.bug-fix {
    color: var(--accent-light) !important;
    font-style: italic;
}
.bug-lesson {
    color: var(--success) !important;
    font-size: 13px !important;
    margin-top: 6px !important;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* ── CTA ── */
.post-cta {
    background: rgba(99,102,241,0.06);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: var(--radius);
    padding: 28px;
    margin: 40px 0;
    text-align: center;
}
.post-cta h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--accent-light);
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .post-body pre { font-size: 12px; padding: 12px; }
    .post-body table { font-size: 12px; }
    .post-pipeline { font-size: 11px; }
    .bug-card { padding: 14px 16px; }
    .post-header h1 { font-size: 1.5rem; }
}
