/* ── Blog Styles ──────────────────────────────────────────────────────
   Blog-specific styles on top of shared/styles.css.
   Used by the listing page (blog/index.html) and individual posts.
   ──────────────────────────────────────────────────────────────────── */

/* ── Post List (listing page) ────────────────────────────────────── */

.post-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 720px;
    margin: 0 auto;
    padding: 30px;
}

.post-card {
    background: var(--surface-card);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-light);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.15);
    border-color: var(--color-primary);
}

.post-card h3 {
    font-size: 1.15rem;
    color: var(--color-primary);
    margin-bottom: 6px;
}

.post-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ── Post Meta (date / reading time) ─────────────────────────────── */

.post-meta {
    font-size: 0.85rem;
    color: var(--text-disabled);
    margin-bottom: 8px;
}

.post-meta time {
    font-weight: 500;
}

/* ── Article Card — extra top padding for zoom toolbar ────────────── */

.content-section .card h2:first-child {
    padding-right: 90px;
}

/* ── Article Content ─────────────────────────────────────────────── */

.content-section .card blockquote {
    border-left: 4px solid var(--color-primary);
    margin: 16px 0;
    padding: 12px 20px;
    background: var(--surface-subtle);
    border-radius: 0 8px 8px 0;
    color: var(--text-secondary);
    font-style: italic;
}

.content-section .card code {
    background: var(--surface-elevated);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.9em;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

.content-section .card pre {
    background: var(--surface-elevated);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    margin: 16px 0;
}

.content-section .card pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.88em;
    line-height: 1.6;
}

.content-section .card img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

.content-section .card hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 24px 0;
}

/* ── Screenshot Figures ─────────────────────────────────────────────── */

.screenshot-figure {
    margin: 24px 0;
    text-align: center;
}

.content-section .card .screenshot-figure img {
    width: 480px;
    max-width: 100%;
    height: auto;
    margin: 0;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.content-section .card .screenshot-figure.narrow img {
    width: 280px;
}

.screenshot-figure figcaption {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: italic;
}

/* ── Savings Tier Bar ─────────────────────────────────────────────── */

.tier-bar {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    margin: 16px 0 24px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.3;
}

.tier-bar-segment {
    padding: 10px 6px;
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.tier-bar-segment .tier-range {
    font-weight: 400;
    font-size: 0.7rem;
    opacity: 0.85;
}

.tier-bar-segment:nth-child(1) { background: #b0b0b0; flex: 10; }
.tier-bar-segment:nth-child(2) { background: #7c9fc9; flex: 5; }
.tier-bar-segment:nth-child(3) { background: #5b9bd5; flex: 5; }
.tier-bar-segment:nth-child(4) { background: #4caf50; flex: 5; }
.tier-bar-segment:nth-child(5) { background: #2e7d32; flex: 25; }
.tier-bar-segment:nth-child(6) { background: #1b5e20; flex: 50; color: rgba(255,255,255,0.95); }

@media (max-width: 768px) {
    .tier-bar {
        flex-direction: column;
        border-radius: 8px;
    }

    .tier-bar-segment {
        flex-direction: row;
        justify-content: space-between;
        padding: 8px 12px;
    }

    .tier-bar-segment .tier-range {
        font-size: 0.75rem;
    }
}

/* ── Years-to-FI Table ───────────────────────────────────────────── */

.fi-table {
    width: 100%;
    max-width: 360px;
    margin: 20px auto 24px;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.fi-table th {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 2px solid var(--border-medium);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
}

.fi-table td {
    padding: 8px 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.fi-table td:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.fi-table th:last-child {
    text-align: right;
}

.fi-table-highlight td {
    font-weight: 600;
    color: var(--color-primary);
}

.fi-table caption {
    caption-side: bottom;
    padding-top: 8px;
    font-size: 0.78rem;
    color: var(--text-disabled);
    text-align: center;
}

/* ── Account Priority Stack ──────────────────────────────────────── */

.priority-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 16px 0 20px;
}

.priority-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--surface-elevated);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    border-left: 3px solid var(--color-primary);
}

.priority-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
}

.priority-step div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.priority-step strong {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.priority-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ── Empty State (no posts yet) ──────────────────────────────────── */

.post-list-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 1rem;
}

/* ── Responsive ──────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .post-list {
        padding: 15px;
        gap: 15px;
    }

    .post-card {
        padding: 16px;
    }

    .post-card h3 {
        font-size: 1.05rem;
    }

    .post-card p {
        font-size: 0.88rem;
    }
}
