/* News / Blog Styles — comfortable reading layout */

/* ── Listing Page ── */
.news-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 3rem;
}

.news-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--parchment-dark);
    gap: 1.5rem;
}

.news-hero-text h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0.03em;
    margin-bottom: 0.2rem;
}

.news-hero .news-tagline {
    font-size: 1.05rem;
    color: var(--ink-light);
    font-style: italic;
}

.news-hero-actions {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
}

.news-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid var(--parchment-dark);
    background: var(--parchment);
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
    white-space: nowrap;
}

.news-hero-btn:hover {
    border-color: var(--gold);
    background: rgba(201, 162, 39, 0.06);
}

.news-hero-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    fill: currentColor;
}

.news-hero-btn.news-compose-btn {
    background: var(--accent);
    color: var(--parchment);
    border-color: var(--accent);
    font-weight: 600;
}

.news-hero-btn.news-compose-btn:hover {
    background: #7a3a10;
    border-color: #7a3a10;
}

@media (max-width: 520px) {
    .news-hero {
        flex-direction: column;
        text-align: center;
    }
    .news-hero-actions {
        justify-content: center;
    }
}

/* Post cards on listing page */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.news-card {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 1.5rem;
    background: var(--parchment);
    border: 1px solid var(--parchment-dark);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.news-card:hover {
    border-color: var(--gold);
    box-shadow: 0 2px 8px var(--shadow);
}

.news-card-cover {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    margin-bottom: 1rem;
}

.news-card h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.news-card-meta {
    font-size: 0.85rem;
    color: var(--ink-light);
    margin-bottom: 0.6rem;
}

.news-card-tags {
    display: inline;
}

.news-card-tag {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--accent);
    background: rgba(139, 69, 19, 0.08);
    padding: 0.15rem 0.5rem;
    margin-left: 0.4rem;
}

.news-card-excerpt {
    font-size: 0.95rem;
    color: var(--ink-light);
    line-height: 1.6;
}

.news-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--ink-light);
    font-style: italic;
}

.news-loading {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--ink-light);
}

/* ── Individual Post ── */
.news-post-page {
    max-width: 680px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 3rem;
}

.news-post-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--parchment-dark);
}

.news-post-back {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
    margin-bottom: 1rem;
    border-bottom: 1px solid transparent;
}

.news-post-back:hover {
    border-bottom-color: var(--accent);
}

.news-post-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.25;
    margin-bottom: 0.3rem;
}

.news-post-meta {
    font-size: 0.9rem;
    color: var(--ink-light);
    margin-bottom: 0;
}

.news-post-cover {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    margin-bottom: 1.2rem;
}

/* ── Article Content ── */
.news-post-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--ink);
}

.news-post-content > *:first-child {
    margin-top: 0;
}

.news-post-content h2 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 0.8rem;
    color: var(--ink);
}

.news-post-content h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.6rem;
    color: var(--ink);
}

.news-post-content p {
    margin-bottom: 1.5rem;
}

.news-post-content a {
    color: #6b3a1f;
    text-decoration: underline;
    text-decoration-color: rgba(139, 69, 19, 0.35);
    text-underline-offset: 2px;
    transition: color 0.15s, text-decoration-color 0.15s;
}

.news-post-content a:visited {
    color: #7a5a4a;
    text-decoration-color: rgba(122, 90, 74, 0.3);
}

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

.news-post-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.5rem auto;
}

.news-post-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 3px solid var(--gold);
    background: rgba(201, 162, 39, 0.06);
    color: var(--ink-light);
    font-style: italic;
}

.news-post-content blockquote p:last-child {
    margin-bottom: 0;
}

.news-post-content ul,
.news-post-content ol {
    margin: 0.5rem 0 1.5rem 1.5rem;
}

.news-post-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.news-post-content code {
    font-family: "Courier New", Courier, monospace;
    font-size: 0.9em;
    background: var(--parchment-dark);
    padding: 0.15rem 0.4rem;
}

.news-post-content pre {
    margin: 1.5rem 0;
    padding: 1.2rem;
    background: var(--ink);
    color: var(--parchment);
    overflow-x: auto;
    line-height: 1.5;
}

.news-post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: 0.85rem;
}

.news-post-content hr {
    border: none;
    border-top: 1px solid var(--parchment-dark);
    margin: 2rem 0;
}

.news-post-content mark {
    background: rgba(201, 162, 39, 0.25);
    color: inherit;
    padding: 0.1em 0.25em;
    border-radius: 2px;
}

.news-post-content u {
    text-decoration-color: var(--gold);
    text-underline-offset: 2px;
}

/* Tags footer on post page */
.news-post-tags {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--parchment-dark);
}

.news-post-tags span {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--accent);
    background: rgba(139, 69, 19, 0.08);
    padding: 0.2rem 0.6rem;
    margin-right: 0.4rem;
    margin-bottom: 0.4rem;
}

/* AT Protocol provenance link */
.news-post-provenance {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--ink-light);
}

.news-post-provenance a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

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

/* Draft banner */
.news-post-draft-banner {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .news-page,
    .news-post-page {
        padding: 1.5rem 1rem 2rem;
    }

    .news-hero h1 {
        font-size: 1.6rem;
    }

    .news-post-header h1 {
        font-size: 1.5rem;
    }

    .news-card {
        padding: 1rem;
    }

    .news-card h2 {
        font-size: 1.2rem;
    }

    .news-post-content {
        font-size: 1rem;
    }
}
