/*
 * Convergence.ninja - Content Styles (post prose, about page, error page)
 * Loaded on pages that render content blocks; pairs with style.css
 * (light silver theme).
 */

/* ===== Prose container ===== */
.post-content {
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.75;
}

.post-content > * + * {
    margin-top: 1.15em;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    color: var(--text-primary);
    letter-spacing: -0.015em;
    margin-top: 1.9em;
    margin-bottom: 0.55em;
    scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

.post-content h2 {
    font-size: 1.45rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border);
}

.post-content h3 {
    font-size: 1.2rem;
}

.post-content h4 {
    font-size: 1.05rem;
}

.post-content p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

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

.post-content a {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-color: var(--border-strong);
    text-underline-offset: 3px;
    transition: text-decoration-color var(--transition-fast);
}

.post-content a:hover {
    text-decoration-color: var(--text-muted);
}

/* ===== Lists ===== */
.post-content ul,
.post-content ol {
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.post-content li + li {
    margin-top: 0.35em;
}

.post-content li::marker {
    color: var(--text-muted);
}

/* ===== Blockquotes ===== */
.post-content blockquote {
    margin: 1.5em 0;
    padding: 0.35rem 1.25rem;
    border-left: 3px solid var(--silver-edge);
    background: var(--bg-surface);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
    font-style: italic;
}

.post-content blockquote p {
    margin: 0.5rem 0;
}

/* ===== Inline code ===== */
.post-content code {
    font-family: var(--font-mono);
    font-size: 0.86em;
    background: var(--bg-chip);
    border: 1px solid var(--border);
    padding: 0.15em 0.45em;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
}

/* ===== Code blocks - dark ink on the light page ===== */
.post-content pre {
    background: var(--code-bg);
    color: var(--code-text);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.3rem;
    overflow-x: auto;
    line-height: 1.6;
    font-size: 0.9rem;
    box-shadow: var(--shadow-md);
}

.post-content pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.post-content pre::-webkit-scrollbar {
    height: 8px;
}

.post-content pre::-webkit-scrollbar-track {
    background: transparent;
}

.post-content pre::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

/* ===== Tables ===== */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.post-content th {
    background: var(--bg-chip);
    color: var(--text-primary);
    font-weight: 600;
    text-align: left;
}

.post-content th,
.post-content td {
    padding: 0.55rem 0.9rem;
    border-bottom: 1px solid var(--border);
}

.post-content tr:last-child td {
    border-bottom: none;
}

/* ===== Media & rules ===== */
.post-content img {
    max-width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.post-content hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 2.5em 0;
}

/* First heading needs no top margin (right under the page top) */
.post-content > h1:first-child,
.post-content > h2:first-child {
    margin-top: 0;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: var(--btn-gradient);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-strong);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== Error Page ===== */
.error-message {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.error-message h2 {
    font-size: 2.4rem;
    background: var(--steel-text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-message p {
    margin-bottom: 1.5rem;
}

/* ===== About Page ===== */
.about-container h1 {
    margin-bottom: 1.25rem;
}

.about-content {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2.25rem;
    box-shadow: var(--shadow-sm);
}

.about-content h2 {
    font-size: 1.2rem;
    margin-top: 2rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.about-content h2:first-child {
    margin-top: 0;
}

.about-content ul {
    padding-left: 1.4rem;
    color: var(--text-secondary);
}

.about-content li {
    margin-bottom: 0.45rem;
}

.about-content li::marker {
    color: var(--silver-edge);
}

