/* Blog / engineering-note pages.
   Depends on tokens from css/whistant.css (:root). No inline styles anywhere —
   Cloudflare's CSP blocks them, and every page keeps its CSS in a file. */

.post-wrap {
    max-width: 780px;
    margin: 0 auto;
    padding: 96px 24px 64px;
}

.post-header {
    margin-bottom: 40px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.post-kicker {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.post-header h1 {
    font-size: clamp(28px, 4.2vw, 40px);
    line-height: 1.22;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.post-dek {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-dim);
    margin-bottom: 20px;
}

.post-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.post-body {
    font-size: 17px;
    line-height: 1.75;
    color: var(--text);
}

.post-body h2 {
    font-size: 24px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 48px 0 16px;
}

.post-body h3 {
    font-size: 19px;
    font-weight: 600;
    margin: 32px 0 12px;
}

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

.post-body a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(59, 130, 246, 0.35);
}

.post-body a:hover {
    border-bottom-color: var(--accent);
}

.post-body strong {
    font-weight: 600;
    color: #fff;
}

.post-body code {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.88em;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 1px 5px;
    word-break: break-word;
}

.post-body pre {
    background: #101017;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    overflow-x: auto;
    margin: 24px 0;
}

.post-body pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: #d7d7de;
}

.post-body figure {
    margin: 32px 0;
}

.post-body figure img {
    width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: block;
}

.post-body figcaption {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-top: 10px;
}

.post-body ul,
.post-body ol {
    margin: 0 0 20px 22px;
}

.post-body li {
    margin-bottom: 8px;
}

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

.post-body blockquote {
    border-left: 2px solid var(--border-accent);
    padding-left: 18px;
    color: var(--text-dim);
    margin: 24px 0;
}

.post-footer-note {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 15px;
    color: var(--text-dim);
}

.post-nav {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 24px 72px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 14px;
}

.post-nav a {
    color: var(--text-dim);
    text-decoration: none;
}

.post-nav a:hover {
    color: var(--text);
}

/* Two tall phone screenshots: side by side on desktop, stacked on narrow screens.
   A 1290x2796 capture at full article width is ~1700px tall, which is too much. */
.post-figures {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 32px 0;
    align-items: start;
}

.post-figures figure {
    margin: 0;
}

.post-figures figcaption {
    font-size: 12.5px;
}

@media (max-width: 720px) {
    .post-figures {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

@media (max-width: 640px) {
    .post-wrap {
        padding: 84px 18px 48px;
    }
    .post-body {
        font-size: 16px;
    }
    .post-body pre {
        padding: 14px;
        font-size: 12.5px;
    }
}
