/* articles.css — Article listing + article viewer styles
   MoreRight ink-steel design system */

/* ═══════════════════════════════════════════════════════════════
   LISTING PAGE — articles.html
   ═══════════════���═══════════════════════════════════════════════ */

/* ── Hero ── */
.articles-hero {
    padding: 4rem 0 2.5rem;
    text-align: center;
}
.hero-inner {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.hero-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
    animation: fadeUp 0.4s ease both;
}
.articles-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    animation: fadeUp 0.5s ease both 0.05s;
}
.hero-desc {
    font-size: 1rem;
    color: var(--text-dim);
    line-height: 1.7;
    animation: fadeUp 0.5s ease both 0.1s;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Sections ���─ */
.section {
    padding: 2.5rem 0;
}
.section-alt {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.section-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.section-header {
    margin-bottom: 1.5rem;
}
.section-header h2 {
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}
.section-note {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.6;
}
.section-note strong {
    color: var(--green);
    font-weight: 600;
}

/* ── Featured article ── */
.featured-link {
    display: block;
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.featured-link:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), var(--shadow-lg);
}
.featured-eyebrow {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.featured-badge {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--accent);
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
}
.featured-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
}
.featured-title {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.featured-subtitle {
    font-size: 1.05rem;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 1.25rem;
    font-style: italic;
}
.featured-summary {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}
.featured-cta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    letter-spacing: 0.02em;
}

/* ── Filter bar ── */
.filter-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.filter-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-dim);
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: var(--font-mono);
    transition: all 0.2s;
}
.filter-btn:hover {
    color: var(--text);
    border-color: var(--text-dim);
}
.filter-btn.active {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(200, 151, 106, 0.08);
}

/* ── Article cards ── */
.article-card {
    display: block;
    text-decoration: none;
    padding: 1.5rem;
    margin-bottom: 1px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}
.article-card:first-child {
    border-top: 1px solid var(--border);
}
.article-card:hover {
    background: var(--surface-2);
}
.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.card-tags {
    display: flex;
    gap: 0.4rem;
}
.tag {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
    background: rgba(255, 220, 200, 0.06);
    padding: 0.15rem 0.45rem;
    border-radius: 2px;
}
.card-date {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-faint);
}
.card-title {
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin-bottom: 0.25rem;
    color: var(--text);
}
.card-subtitle {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 0.5rem;
    font-style: italic;
}
.card-summary {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Papers CTA ── */
.papers-cta {
    border-left: 2px solid var(--accent);
    padding: 1.25rem 1.5rem;
    background: rgba(200, 151, 106, 0.04);
}
.papers-cta p {
    font-size: 0.92rem;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 1rem;
}
.cta-link {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.cta-link:hover {
    text-decoration: underline;
}

/* ── Empty state ── */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* ══════════════════════════════════════════════════════════════
   JOURNAL ARTICLE CHROME — applied when article has journal_issue
   ══════════════════════════════════════════════════════════════ */

/* ── Journal masthead bar (replaces back-link) ── */
.journal-bar {
    max-width: 680px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 var(--glow-dim);
    padding-bottom: 0.75rem;
}
.journal-bar__name {
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
}
.journal-bar__name:hover { color: var(--accent); text-shadow: 0 0 8px var(--glow-accent); }
.journal-bar__jp {
    font-size: 0.7em;
    font-weight: 400;
    color: var(--text-faint);
    margin-left: 0.3em;
}
.journal-bar__issue {
    font-family: var(--font-mono);
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-faint);
}

/* When journal bar is present, article header adjusts */
.journal-bar + .article-header {
    padding-top: 1.5rem;
}
.journal-bar + .article-header .back-link {
    display: none;
}

/* ── Issue prev/next navigation ── */
.journal-nav {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    border-top: 1px solid var(--border);
}
.journal-nav__link {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s, border-color 0.15s;
}
.journal-nav__link:hover {
    background: var(--surface-2);
    border-color: var(--accent);
    box-shadow: 0 0 8px var(--glow-dim);
}
.journal-nav__link--next { text-align: right; }
.journal-nav__dir {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-faint);
}
.journal-nav__title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.78rem;
    color: var(--text);
}
.journal-nav__link:hover .journal-nav__title { color: var(--accent); }


/* ══��════════════════════════════��═══════════════════════════════
   ARTICLE VIEWER — article.html
   ════════════════��══════════════════════════════════════════════ */

/* ── Article header ── */
.article-header {
    max-width: 680px;
    margin: 0 auto;
    padding: 3rem 1.5rem 1.5rem;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-dim);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    margin-bottom: 1.5rem;
    transition: color 0.15s;
}
.back-link:hover { color: var(--accent); }

.article-header h1 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 0.6rem;
}
.article-header .subtitle {
    font-size: 1.05rem;
    color: var(--text-dim);
    line-height: 1.5;
    font-style: italic;
    margin-bottom: 1.5rem;
}

/* ── Meta bar ── */
.article-meta-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-dim);
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.article-tag {
    background: rgba(200, 151, 106, 0.08);
    color: var(--accent);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.65rem;
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ── Constraint check bar ── */
.constraint-check-bar {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 0.75rem 0;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    border-bottom: 1px solid var(--border);
}
.check-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.check-pass { color: var(--green); font-weight: 600; }
.check-fail { color: var(--red); font-weight: 600; }

/* ── Article body ── */
.article-body {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Override md-content layout for articles — no sidebar TOC on narrow articles */
.md-content-layout {
    display: flex;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}
.md-content-layout .article-body {
    flex: 1;
    min-width: 0;
    max-width: 680px;
    padding: 0;
}
.md-content-layout #md-toc {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    font-size: 0.75rem;
    padding-right: 1rem;
    border-right: 1px solid var(--border);
}

/* ── Reading typography overrides ── */
.article-body #md-content {
    font-size: 1rem;
}
.article-body #md-content h1 {
    display: none; /* Title already in header */
}
.article-body #md-content h2 {
    font-size: 1.25rem;
    margin: 2.5rem 0 0.75rem;
    padding-top: 1.5rem;
}
.article-body #md-content h2:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.article-body #md-content p {
    font-family: var(--font-prose);
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text);
}
.article-body #md-content li {
    font-family: var(--font-prose);
    line-height: 1.75;
}
.article-body #md-content blockquote {
    border-left: 2px solid var(--accent);
    background: rgba(200, 151, 106, 0.04);
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
}
.article-body #md-content blockquote p {
    color: var(--text-dim);
    font-style: italic;
}
.article-body #md-content strong {
    color: var(--text);
    font-weight: 700;
}
.article-body #md-content em {
    color: var(--text-dim);
}
.article-body #md-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2.5rem 0;
}

/* Article end marker */
.article-body #md-content > p:last-child {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* ── Responsive ��─ */
@media (max-width: 900px) {
    .md-content-layout {
        flex-direction: column;
    }
    .md-content-layout #md-toc {
        width: 100%;
        position: static;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 0 0 1rem;
        margin-bottom: 1rem;
    }
    .featured-link {
        padding: 1.5rem;
    }
    .articles-hero {
        padding: 2.5rem 0 1.5rem;
    }
    .section {
        padding: 2rem 0;
    }
}

@media (max-width: 600px) {
    .article-header {
        padding: 2rem 1rem 1rem;
    }
    .article-header h1 {
        font-size: 1.5rem;
    }
    .article-header .subtitle {
        font-size: 0.88rem;
    }
    .md-content-layout {
        padding: 1.5rem 1rem 3rem;
    }
    .article-body #md-content p {
        font-size: 0.88rem;
        line-height: 1.7;
    }
    .article-body #md-content h2 {
        font-size: 1.1rem;
    }
    .card-summary {
        display: none;
    }
    .journal-bar {
        padding: 1rem 1rem 0.6rem;
    }
    .journal-bar + .article-header {
        padding-top: 1rem;
    }
    .journal-nav {
        padding: 1.5rem 1rem 2rem;
        gap: 0.75rem;
    }
    .journal-nav__link { padding: 0.6rem 0.75rem; }
    .journal-nav__title { font-size: 0.72rem; }
}
