/* ═══════════════════════════════════════════════════════════════════════════
   Phivote — Blog (SEO content)
   Self-contained styling for /blog and article pages. Builds on theme.css
   (CSS variables, .btn, .brand) — no dependency on landing.css or app-shell.js,
   so article text ships in the HTML and is fully crawlable.
   ═══════════════════════════════════════════════════════════════════════════ */

.blog-wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.reading   { max-width: 760px; margin: 0 auto; padding: 0 22px; }

/* ── Top nav ─────────────────────────────────────────────────────── */
.blog-nav {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: var(--glass); border-bottom: 1px solid var(--line);
}
.blog-nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 18px; }
.blog-nav-links { display: flex; align-items: center; gap: 22px; }
.blog-nav-links a { color: var(--txt-2); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .15s; }
.blog-nav-links a:hover { color: var(--txt); }

/* ── Blog index hero ─────────────────────────────────────────────── */
.blog-hero { padding: 64px 0 30px; text-align: center; }
.blog-hero .eyebrow {
  display: inline-block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin-bottom: 14px;
}
.blog-hero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.1; letter-spacing: -.02em; font-weight: 850; }
.blog-hero p { color: var(--txt-2); font-size: 16px; max-width: 620px; margin: 16px auto 0; line-height: 1.65; }

/* ── Post grid (index) ───────────────────────────────────────────── */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; padding: 28px 0 70px; }
.post-card {
  display: flex; flex-direction: column; background: var(--bg-panel);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  text-decoration: none; color: inherit; transition: border-color .18s, transform .18s, box-shadow .18s;
}
.post-card:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: var(--shadow); }
.post-card-cover { height: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.post-card.gold .post-card-cover { background: linear-gradient(90deg, var(--gold), #ff9d3b); }
.post-card.short .post-card-cover { background: linear-gradient(90deg, var(--short), #ff7aa0); }
.post-card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.post-tag { align-self: flex-start; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-dim); padding: 4px 10px; border-radius: var(--r-pill); }
.post-card h2 { font-size: 19px; line-height: 1.32; margin: 14px 0 10px; letter-spacing: -.01em; font-weight: 750; }
.post-card p { color: var(--txt-2); font-size: 14px; line-height: 1.6; flex: 1; }
.post-meta { display: flex; gap: 12px; align-items: center; margin-top: 18px; color: var(--txt-3); font-size: 12.5px; }
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--txt-4); }

/* ── Article ─────────────────────────────────────────────────────── */
.article-head { padding: 56px 0 8px; text-align: center; }
.breadcrumb { font-size: 13px; color: var(--txt-3); margin-bottom: 20px; }
.breadcrumb a { color: var(--txt-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.article-head .post-tag { display: inline-block; margin-bottom: 18px; }
.article-head h1 { font-size: clamp(28px, 4.6vw, 42px); line-height: 1.14; letter-spacing: -.02em; font-weight: 850; max-width: 820px; margin: 0 auto; }
.article-head .post-meta { justify-content: center; margin-top: 22px; }

.article { padding: 14px 0 40px; font-size: 16.5px; line-height: 1.78; color: #cdd7e3; }
.article > p, .article > ul, .article > ol, .article > blockquote, .article > figure, .article > .cta-inline, .article > table, .article > h2, .article > h3 { margin-top: 26px; }
.article h2 { font-size: 25px; line-height: 1.25; letter-spacing: -.015em; color: var(--txt); font-weight: 800; margin-top: 46px; }
.article h3 { font-size: 19.5px; color: var(--txt); font-weight: 700; margin-top: 34px; }
.article a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(0,229,160,.3); }
.article a:hover { border-bottom-color: var(--accent); }
.article strong { color: var(--txt); font-weight: 700; }
.article ul, .article ol { padding-left: 24px; }
.article li { margin: 9px 0; }
.article li::marker { color: var(--accent); }
.article blockquote {
  border-left: 3px solid var(--accent); background: var(--accent-dim);
  padding: 14px 20px; border-radius: 0 var(--r) var(--r) 0; color: var(--txt); font-style: italic;
}
.article code {
  font-family: var(--font-mono); font-size: .88em; background: var(--bg-raised);
  border: 1px solid var(--line); border-radius: var(--r-xs); padding: 2px 6px; color: var(--accent);
}
.article hr { border: none; border-top: 1px solid var(--line); margin: 40px 0; }
.article figure { text-align: center; }
.article figcaption { color: var(--txt-3); font-size: 13px; margin-top: 10px; }
.article table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.article th, .article td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.article th { color: var(--txt); font-weight: 700; background: var(--bg-panel); }
.article td { color: var(--txt-2); }
.article .lede { font-size: 19px; line-height: 1.7; color: var(--txt); }

/* Key-levels callout used in posts */
.fib-levels { display: grid; gap: 8px; background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; }
.fib-levels .row { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 14px; }
.fib-levels .row.zone { color: var(--gold); }
.fib-levels .row span:first-child { color: var(--txt-2); }

/* In-article CTA */
.cta-inline {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(120deg, rgba(0,229,160,.10), rgba(24,180,255,.06));
  border: 1px solid rgba(0,229,160,.22); border-radius: var(--r-lg); padding: 22px 24px;
}
.cta-inline div { flex: 1; min-width: 220px; }
.cta-inline h4 { font-size: 17px; color: var(--txt); margin-bottom: 4px; }
.cta-inline p { font-size: 13.5px; color: var(--txt-2); margin: 0; }

/* Author / share strip */
.article-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; justify-content: space-between;
  border-top: 1px solid var(--line); margin-top: 44px; padding-top: 26px; color: var(--txt-3); font-size: 13.5px; }

/* Related posts */
.related { padding: 18px 0 70px; }
.related h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .1em; color: var(--txt-3); margin-bottom: 18px; }

/* ── Footer ──────────────────────────────────────────────────────── */
.blog-footer { border-top: 1px solid var(--line); padding: 34px 0; color: var(--txt-3); font-size: 13px; }
.blog-footer-inner { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.blog-footer a { color: var(--txt-2); text-decoration: none; }
.blog-footer a:hover { color: var(--accent); }
.blog-footer .links { display: flex; gap: 18px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .blog-nav-links { gap: 14px; }
  .blog-nav-links a:not(.btn) { display: none; }
  .blog-nav-links a.btn { display: inline-flex; }
  .article { font-size: 16px; }
}
