/* story.css — Shared styles for LITF article pages */

:root {
  --bg: #ffffff; --bg-alt: #f8f9fa; --text: #1a1a2e; --text-muted: #6c757d;
  --accent: #6c5ce7; --accent-hover: #5a4bd1; --accent-light: rgba(108,92,231,0.1);
  --border: #e9ecef; --card-bg: #ffffff; --font: 'Inter', -apple-system, sans-serif;
}
html.dark {
  --bg: #0f0f1a; --bg-alt: #1a1a2e; --text: #e8e8f0; --text-muted: #9090a8;
  --accent: #a29bfe; --accent-hover: #b8b2ff; --accent-light: rgba(162,155,254,0.15);
  --border: #2d2d44; --card-bg: #1a1a2e;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; transition: background 0.3s, color 0.3s; }
a { color: var(--accent); text-decoration: none; }

/* Layout */
.story-page { max-width: 720px; margin: 0 auto; padding: 32px 24px 64px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; margin-bottom: 24px; color: var(--text-muted); }
.back-link:hover { color: var(--accent); }

/* Header */
.story-kicker { display: inline-block; padding: 3px 12px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; background: var(--accent-light); color: var(--accent); margin-bottom: 12px; }
.story-title { font-size: 2rem; font-weight: 800; line-height: 1.2; margin-bottom: 12px; }
.story-deck { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 16px; }
.story-byline { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 32px; }
.story-byline strong { color: var(--text); }
.story-hero { width: 100%; border-radius: 12px; margin-bottom: 24px; }
.story-hero-img { width: 100%; max-height: 400px; object-fit: cover; border-radius: 12px; margin-bottom: 24px; }

/* Body */
.story-body { font-size: 1.05rem; line-height: 1.75; }
.story-body h2 { font-size: 1.4rem; font-weight: 700; margin: 32px 0 12px; }
.story-body p { margin-bottom: 16px; }
.story-body table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.9rem; }
.story-body th { text-align: left; padding: 10px 12px; background: var(--accent-light); color: var(--accent); font-weight: 600; border-bottom: 2px solid var(--accent); }
.story-body td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.story-body blockquote { border-left: 3px solid var(--accent); padding: 12px 20px; margin: 20px 0; background: var(--accent-light); border-radius: 0 8px 8px 0; font-style: italic; }
.story-body ul, .story-body ol { margin: 16px 0; padding-left: 24px; }
.story-body li { margin-bottom: 8px; }

/* Bottom Line / Closing */
.bottom-line { background: var(--accent-light); padding: 20px; border-radius: 12px; margin: 32px 0; border-left: 4px solid var(--accent); }
.bottom-line h3 { margin-top: 0; color: var(--accent); margin-bottom: 8px; font-size: 1.1rem; }

/* Related */
.related { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.related h3 { font-size: 1.1rem; margin-bottom: 16px; }
.related a { display: block; margin-bottom: 8px; }

/* Share bar */
.share-bar { display: flex; align-items: center; gap: 10px; margin: 32px 0; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.share-label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; background: var(--bg-alt); color: var(--text); text-decoration: none; font-weight: 700; font-size: 0.9rem; border: 1px solid var(--border); cursor: pointer; transition: all 0.2s; font-family: var(--font); }
.share-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-1px); }
.share-copy { font-size: 1rem; }

/* Reading progress bar */
.reading-progress { position: fixed; top: 0; left: 0; width: 0; height: 3px; background: var(--accent); z-index: 9999; transition: width 0.1s; }

/* Sources section */
.sources { margin-top: 48px; padding: 24px; background: var(--bg-alt); border-radius: 12px; border: 1px solid var(--border); }
.sources h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; color: var(--accent); }
.sources ol { padding-left: 24px; margin: 0; font-size: 0.85rem; line-height: 1.6; }
.sources li { margin-bottom: 8px; color: var(--text-muted); }
.sources li a { color: var(--accent); word-break: break-word; }
.sources li a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 768px) {
  .story-title { font-size: 1.5rem; }
  .story-page { padding: 20px 16px 48px; }
  .article-nav { flex-direction: column; }
  .nav-link { max-width: 100%; }
}

/* Prev/Next Article Nav */
.article-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.nav-link { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text); padding: 16px; border-radius: 12px; background: var(--bg-alt); border: 1px solid var(--border); max-width: 48%; transition: all 0.2s; }
.nav-link:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.nav-dir { font-size: 0.75rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; }
.nav-title { font-size: 0.85rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nav-newer { text-align: right; margin-left: auto; }
.nav-placeholder { flex: 1; }
