/* post.css: shared styles for the on-site Bytes and Insights posts in /insights/.
   Loaded after /site.css. Pages are generated by scripts/insights/build-insights.mjs. */

.post-hero {
    background: linear-gradient(135deg, #0050a0 0%, #003d80 100%);
    color: #fff;
    padding: 3rem 5% 3.25rem;
}
.post-hero-inner { max-width: 820px; margin: 0 auto; }
.post-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 1.5rem;
}
.post-back:hover { text-decoration: underline; }
.post-back svg { width: 16px; height: 16px; }
.post-eyebrow {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.75rem;
}
.post-hero h1 {
    font-size: 2.3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}
.post-dek {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 1.25rem;
}
.post-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.post-tag {
    display: inline-block;
    padding: 0.25rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}
.post-tag:hover { background: rgba(255, 255, 255, 0.15); }
.post-hero a:focus-visible { outline-color: #fff; }

.post-body {
    max-width: 820px;
    margin: 0 auto;
    padding: 2.5rem 5% 1rem;
}
.post-body p {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #333;
    margin-bottom: 1.15rem;
    overflow-wrap: anywhere;
}
.post-body ul,
.post-body ol { padding-left: 1.6rem; margin-bottom: 1.15rem; }
.post-body li {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 0.45rem;
    overflow-wrap: anywhere;
}
.post-body a { color: #0050a0; text-decoration: underline; }
.post-body a:hover { color: #003d80; }

.post-toc {
    background: #f8f9fa;
    border-left: 4px solid #0050a0;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2.5rem;
}
.post-toc h2 {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 0.75rem;
}
.post-toc ul { list-style: none; padding-left: 0; margin-bottom: 0; }
.post-toc li { font-size: 1rem; margin-bottom: 0.35rem; }
.post-toc .post-toc-author { color: #666; font-size: 0.9rem; }

.post-article { margin-bottom: 2.5rem; padding-top: 2.25rem; border-top: 1px solid #e0e4ec; }
.post-article:first-of-type { border-top: 0; padding-top: 0; }
.post-article[id] { scroll-margin-top: 110px; }
.post-article h2 {
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.25;
    color: #0050a0;
    margin-bottom: 0.6rem;
}
.post-article h3 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
    margin: 1.9rem 0 0.6rem;
}
.post-body .post-byline { color: #595959; font-size: 0.95rem; font-weight: 600; margin-bottom: 1.25rem; }
.post-figure { margin: 1.5rem auto; text-align: center; }
.post-figure img { max-width: 100%; height: auto; border-radius: 8px; }
.post-figure--side { float: right; max-width: 42%; margin: 0.35rem 0 1rem 1.5rem; }
.post-article { display: flow-root; }
.post-body .post-button { margin: 1.5rem 0; }
.post-body .post-button a { color: #fff; text-decoration: none; }
.post-body .post-attribution { color: #595959; font-size: 0.95rem; font-style: italic; }

.post-table-wrap { overflow-x: auto; margin: 1.5rem 0; clear: both; }
.post-table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.6; }
.post-table caption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.post-table th,
.post-table td { border: 1px solid #cfd6e2; padding: 0.7rem 0.9rem; text-align: left; vertical-align: top; color: #333; }
.post-table thead th { background: #e8eef8; color: #1a1a1a; }
.post-table tbody th { background: #f8f9fa; white-space: nowrap; }

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 5% 2.5rem;
}
.post-nav a {
    display: block;
    padding: 1rem 1.25rem;
    border: 1px solid #dde3ec;
    border-radius: 8px;
    color: #0050a0;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.4;
}
.post-nav a:hover { border-color: #0050a0; box-shadow: 0 2px 8px rgba(0, 80, 160, 0.12); }
.post-nav .post-nav-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #595959;
    margin-bottom: 0.3rem;
}
.post-nav .post-nav-next { text-align: right; grid-column: 2; }

.post-related-section { background: #f8f9fa; padding: 2.75rem 5%; border-top: 1px solid #e0e4ec; }
.post-related-inner { max-width: 820px; margin: 0 auto; }
.post-related-inner h2 { font-size: 1.3rem; color: #1a1a1a; margin-bottom: 1.25rem; }
.post-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}
.post-related-link {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    background: #fff;
    border: 1px solid #dde3ec;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
}
.post-related-link:hover { border-color: #0050a0; box-shadow: 0 2px 8px rgba(0, 80, 160, 0.12); }
.post-related-link svg { width: 22px; height: 22px; flex-shrink: 0; color: #0050a0; margin-top: 0.15rem; }
.post-related-link strong { display: block; color: #0050a0; font-size: 0.98rem; }
.post-related-link span { display: block; font-size: 0.86rem; color: #555; line-height: 1.45; }

.post-cta-section { background: #1a1a1a; color: #fff; padding: 3rem 5%; text-align: center; }
.post-cta-section h2 { font-size: 1.6rem; margin-bottom: 0.6rem; }
.post-cta-section p { color: rgba(255, 255, 255, 0.8); max-width: 620px; margin: 0 auto 1.5rem; }

@media (max-width: 768px) {
    .post-hero { padding: 2.25rem 5% 2.5rem; }
    .post-hero h1 { font-size: 1.7rem; }
    .post-article h2 { font-size: 1.4rem; }
    .post-figure--side { float: none; max-width: 100%; margin: 1.5rem auto; }
    .post-nav { grid-template-columns: 1fr; }
    .post-nav .post-nav-next { grid-column: 1; text-align: left; }
}
