/* Blog list cards + one post's performance page (docs/BLOG.md, "How posts are doing").
   Built on the app.css tokens, so it follows the palette. The one extra is the soft
   blue of past-week bars, the same as the marketing overview's (--pulse-past). */

.bn {
    --bn-past: #A9C9EE;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.bn h2 { margin: 0; font-size: 1rem; font-weight: 600; color: var(--cc-text); }
.bn-muted { font-size: 0.8rem; color: var(--cc-text-muted); }
.bn-note { margin: 0; font-size: 0.8rem; color: var(--cc-text-muted); max-width: 80ch; }
.bn-num { font-variant-numeric: tabular-nums; }

.bn-card {
    background: var(--cc-surface);
    border: 1px solid var(--cc-border);
    border-radius: 8px;
    padding: 14px 16px;
    min-width: 0;
}
.bn-card-head {
    display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
    gap: 4px 12px; margin-bottom: 10px;
}
.bn-card-head p { margin: 0; font-size: 0.8rem; color: var(--cc-text-muted); }

/* At a glance */
.bn-glance ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bn-glance li { display: flex; gap: 12px; align-items: flex-start; max-width: 90ch; font-size: 0.92rem; }
.bn-dot { flex: 0 0 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: var(--cc-accent); }
.bn-dot.is-attention { background: var(--cc-marigold, #EFA537); }
.bn-path { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.84em; }

/* Summary tiles */
.bn-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.bn-kicker {
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--cc-text-muted);
}
.bn-big { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 6px; }
.bn-big-n { font-size: 1.6rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--cc-text); }
.bn-sub { margin-top: 4px; font-size: 0.78rem; color: var(--cc-text-muted); }
.bn-up { color: var(--cc-success, #448361); font-weight: 600; }
.bn-down { color: var(--cc-error, #B4524A); font-weight: 600; }

/* Twelve weekly bars, this week in blue */
.bn-spark { display: block; flex-shrink: 0; }
.bn-spark .is-past { fill: var(--bn-past); }
.bn-spark .is-now { fill: var(--cc-accent); }
.bn-spark .is-zero { fill: var(--cc-border-strong); }

/* Controls */
.bn-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.bn-seg {
    display: inline-flex; overflow: hidden; flex-wrap: wrap;
    border: 1px solid var(--cc-border-strong); border-radius: 8px; background: var(--cc-surface);
}
.bn-seg a {
    display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 14px;
    font-size: 0.85rem; font-weight: 500; color: var(--cc-text); text-decoration: none;
}
.bn-seg a + a { border-left: 1px solid var(--cc-border-strong); }
.bn-seg a:hover { background: var(--cc-surface-2); text-decoration: none; }
.bn-seg a[aria-current="page"] { background: var(--cc-text); color: var(--cc-surface); font-weight: 600; }
.bn-seg a:focus-visible { outline: 2px solid var(--cc-accent); outline-offset: -2px; }
.bn-seg .bn-count { font-size: 0.75rem; font-weight: 600; color: var(--cc-text-muted); }
.bn-seg a[aria-current="page"] .bn-count { color: var(--cc-border-strong); }
.bn-sorts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.bn-sorts label { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 0.82rem; color: var(--cc-text-muted); }
.bn-sorts select { width: auto; min-height: 36px; font-size: 0.85rem; }

/* The post cards */
.bn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.bn-post {
    background: var(--cc-surface); border: 1px solid var(--cc-border); border-radius: 10px;
    overflow: hidden; display: flex; flex-direction: column; min-width: 0;
}
.bn-thumb {
    position: relative; display: block; aspect-ratio: 2 / 1; overflow: hidden;
    background: var(--cc-accent-soft, #E7F2FC); color: var(--bn-past);
}
/* Held to the frame's shape: the photo's own proportions never stretch the card. */
.bn-thumb img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.bn-thumb-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    width: 100%; height: 100%; font-size: 0.8rem; color: var(--cc-text-muted);
    background: var(--cc-bg); border-bottom: 1px dashed var(--cc-border-strong);
}
.bn-thumb-empty svg { width: 36px; height: 36px; color: var(--cc-text-faint, #7B8494); }
.bn-badge {
    position: absolute; top: 10px; left: 10px;
    font-size: 0.72rem; font-weight: 600; padding: 0.12rem 0.55rem; border-radius: 999px;
    box-shadow: 0 1px 2px rgba(31, 42, 55, 0.12);
}
.bn-badge-pub { color: #0A6B2D; background: #E3F1E8; }
.bn-badge-sched { color: var(--cc-attention-text, #7A4E05); background: #FBF0D9; }
.bn-badge-draft { color: var(--cc-text-muted); background: var(--cc-surface-2); }
.bn-pbody { padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.bn-ptitle {
    margin: 0; font-size: 1rem; font-weight: 600; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bn-ptitle a { color: var(--cc-text); }
.bn-pmeta { display: flex; flex-direction: column; gap: 1px; font-size: 0.8rem; color: var(--cc-text-muted); }
.bn-slug {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.75rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bn-views {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
    padding-top: 10px; border-top: 1px solid var(--cc-surface-2);
}
.bn-pn { font-size: 1.45rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.bn-pn-label { margin-top: 2px; font-size: 0.76rem; color: var(--cc-text-muted); }
.bn-new {
    display: inline-block; margin-left: 4px; padding: 0.05rem 0.45rem; vertical-align: 2px;
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
    border-radius: 999px; background: var(--cc-accent-soft, #E7F2FC); color: var(--cc-accent-hover, #165A9F);
}
.bn-pstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bn-pstat b { display: block; font-size: 0.95rem; font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; }
.bn-pstat span { font-size: 0.74rem; color: var(--cc-text-muted); }
.bn-led { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--cc-text-muted); }
.bn-chip {
    display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px;
    background: var(--cc-accent-soft, #E7F2FC); color: var(--cc-accent-hover, #165A9F);
    font-weight: 600; font-size: 0.74rem;
}
.bn-warn {
    font-size: 0.78rem; color: var(--cc-attention-text, #7A4E05);
    background: var(--cc-attention-soft, #FDF4E3); border: 1px solid var(--cc-attention-border, #F5DDB0);
    border-radius: 6px; padding: 6px 8px;
}
.bn-pending { font-size: 0.82rem; color: var(--cc-text-muted); padding-top: 10px; border-top: 1px solid var(--cc-surface-2); }
.bn-pfoot {
    display: flex; align-items: center; gap: 12px; margin-top: auto;
    padding: 10px 16px; border-top: 1px solid var(--cc-surface-2); font-size: 0.85rem;
}
.bn-pfoot .bn-push { margin-left: auto; color: var(--cc-text-muted); }

/* One post's report */
.bn-who-meta { margin-top: 2px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 0.82rem; color: var(--cc-text-muted); }
.bn-who-meta .bn-badge { position: static; box-shadow: none; }
.bn-days {
    display: flex; align-items: flex-end; gap: 3px; height: 140px;
    border-bottom: 1px solid var(--cc-border);
}
.bn-days span { flex: 1 1 0; min-width: 0; background: var(--bn-past); border-radius: 2px 2px 0 0; }
.bn-days span.is-now { background: var(--cc-accent); }
.bn-days span.is-zero { background: var(--cc-border-strong); }
.bn-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 0.75rem; color: var(--cc-text-muted); }
.bn-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 12px; }
.bn-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bn-bars li { display: flex; flex-direction: column; gap: 3px; }
.bn-bar-row {
    display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(60px, 2fr) 92px;
    gap: 10px; align-items: center; font-size: 0.88rem;
}
.bn-track { height: 8px; border-radius: 4px; background: var(--cc-surface-2); overflow: hidden; }
.bn-track span { display: block; height: 100%; border-radius: 4px; background: var(--bn-past); }
.bn-track span.is-lead { background: var(--cc-accent); }
.bn-bar-n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bn-bar-n small { color: var(--cc-text-muted); font-size: 0.78rem; }
.bn-places { font-size: 0.78rem; color: var(--cc-text-muted); }
.bn-kv { list-style: none; margin: 0; padding: 0; }
.bn-kv li {
    display: flex; justify-content: space-between; gap: 12px;
    padding: 6px 0; border-bottom: 1px solid var(--cc-border); font-size: 0.88rem;
}
.bn-kv li:last-child { border-bottom: 0; }
.bn-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bn-checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; }
.bn-checks svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; }
.bn-checks .is-done svg { color: var(--cc-success, #448361); }
.bn-checks .is-missing svg { color: var(--cc-marigold, #EFA537); }
.bn-checks small { display: block; color: var(--cc-text-muted); font-size: 0.78rem; }

@media (max-width: 640px) {
    .bn-grid { grid-template-columns: minmax(0, 1fr); }
    .bn-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bn-big-n { font-size: 1.3rem; }
    .bn-sorts { width: 100%; }
    .bn-sorts label { flex: 1 1 45%; }
    .bn-sorts select { width: 100%; }
    .bn-bar-row { grid-template-columns: minmax(0, 1fr) minmax(48px, 1fr) 84px; }
}

/* The list as a table (?layout=table), for comparing many posts at once. */
.bn-table-card { padding: 4px 12px; }
.bn-table th {
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--cc-text-muted); white-space: nowrap; border-bottom-color: var(--cc-border);
}
.bn-table td { font-size: 0.9rem; vertical-align: middle; border-bottom-color: var(--cc-surface-2); }
.bn-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bn-table .num .bn-spark { margin-left: auto; }
.bn-table-post { min-width: 220px; }
.bn-table-post a { font-weight: 600; color: var(--cc-text); }
.bn-table-post .bn-badge { position: static; box-shadow: none; margin-left: 6px; vertical-align: 1px; }
.bn-small { font-size: 0.72rem; }
.bn .nowrap { white-space: nowrap; }

/* What happened on the chart: a marigold dot over the day, named underneath. */
.bn-days span.has-marker { position: relative; }
.bn-days span.has-marker::after {
    content: ""; position: absolute; top: -10px; left: 50%;
    width: 6px; height: 6px; margin-left: -3px; border-radius: 50%;
    background: var(--cc-marigold, #EFA537);
}
.bn-days { padding-top: 12px; }
.bn-markers { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.8rem; color: var(--cc-text-muted); }
.bn-markers li { display: flex; align-items: center; gap: 6px; }
.bn-marker-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cc-marigold, #EFA537); flex: 0 0 6px; }
