/* ============================================================
   css/blog.css — the blog in the Nebula interface (owner, 2026-10-10).

   Loaded after css/ui-v2.css by blog/index.html and every article; every
   rule hangs off html.ui-v2 like the rest of the interface, so it sits over
   each page's own inline styles without touching their markup. js/blog.js
   adds the interactive parts (search and topic filter on the index; the
   reading progress bar, the contents rail and the reveal on articles).
   ============================================================ */

/* ---- shared ---- */
html.ui-v2 body { font-family: 'Manrope', -apple-system, sans-serif; }
html.ui-v2 .bl-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 400; background: linear-gradient(90deg, #00d4ff, #bf5af2); box-shadow: 0 0 12px rgba(0, 212, 255, 0.6); transition: width 0.08s linear; pointer-events: none; }
html.ui-v2 .footer { max-width: 1100px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
html.ui-v2 .footer a { color: #5ee4ff; }

/* Fades in as it scrolls into view; only when js/blog.js runs (html.bl-js),
   and never under reduced motion. */
html.ui-v2.bl-js .bl-reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
html.ui-v2.bl-js .bl-reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.ui-v2.bl-js .bl-reveal { opacity: 1; transform: none; transition: none; } }

/* ---- the index ---- */
html.ui-v2 .hero { max-width: 1100px; padding: 56px 20px 28px; text-align: center; }
html.ui-v2 .bl-logo { display: block; width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 18px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 24px rgba(0, 212, 255, 0.35); }
html.ui-v2 .hero h1 { font-size: clamp(40px, 6vw, 64px); margin: 0 0 14px; }
html.ui-v2 .hero h1 .bl-brand { color: #00d4ff; -webkit-text-fill-color: #00d4ff; text-shadow: 0 0 24px rgba(0, 212, 255, 0.35); }
html.ui-v2 .hero > p { max-width: 720px; margin: 0 auto; text-align: center; }
html.ui-v2 .hero > p a { color: #5ee4ff !important; }
html.ui-v2 .bl-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; font: 600 11px 'JetBrains Mono', monospace; letter-spacing: 0.14em; text-transform: uppercase; color: #9a9ac0; }
html.ui-v2 .bl-stats span { padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.035); }
html.ui-v2 .bl-stats b { color: #00d4ff; font-weight: 700; }

html.ui-v2 .bl-tools { max-width: 1100px; margin: 0 auto 22px; padding: 0 20px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
html.ui-v2 .bl-search { flex: 1 1 260px; max-width: 380px; position: relative; }
html.ui-v2 .bl-search input { width: 100%; padding: 11px 16px 11px 40px; font: 500 14px 'Manrope', sans-serif; border-radius: 999px !important; }
html.ui-v2 .bl-search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; stroke: #8484aa; fill: none; stroke-width: 2; }
html.ui-v2 .bl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
html.ui-v2 .bl-chip { font: 700 12px 'Manrope', sans-serif; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.035); color: #c4c4dc; cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s; }
html.ui-v2 .bl-chip:hover { border-color: rgba(255, 255, 255, 0.22); color: #fff; }
html.ui-v2 .bl-chip.on { background: rgba(0, 212, 255, 0.12); border-color: #00d4ff; color: #00d4ff; }
html.ui-v2 .bl-chip i { font-style: normal; opacity: 0.6; margin-left: 4px; }
html.ui-v2 .bl-empty { max-width: 1100px; margin: 0 auto; padding: 30px 20px; text-align: center; color: #8484aa; font: 500 13px 'JetBrains Mono', monospace; }

html.ui-v2 .posts { max-width: 1100px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-bottom: 72px; }
html.ui-v2 .post-card { position: relative; overflow: hidden; padding: 26px 28px; border-radius: 22px; background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
/* A light that follows the pointer (js/blog.js sets --mx / --my). */
html.ui-v2 .post-card::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.25s; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(0, 212, 255, 0.13), rgba(191, 90, 242, 0.06) 40%, transparent 70%); }
html.ui-v2 .post-card:hover { transform: translateY(-3px); border-color: rgba(0, 212, 255, 0.35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 22px rgba(0, 212, 255, 0.12); }
html.ui-v2 .post-card:hover::before { opacity: 1; }
html.ui-v2 .post-card > a { position: relative; display: flex; flex-direction: column; height: 100%; }
html.ui-v2 .post-card:first-child { grid-column: 1 / -1; padding: 34px 36px; background: radial-gradient(600px 300px at 0% 0%, rgba(0, 212, 255, 0.1), transparent 70%), radial-gradient(600px 300px at 100% 100%, rgba(191, 90, 242, 0.1), transparent 70%), rgba(255, 255, 255, 0.035); }
html.ui-v2 .post-card:first-child .post-title { font-size: 30px; }
html.ui-v2 .post-card:first-child .post-tag::after { content: ' · Latest'; }
html.ui-v2 .post-tag { align-self: flex-start; font: 700 10.5px 'JetBrains Mono', monospace; letter-spacing: 0.12em; padding: 5px 11px; border-radius: 999px; margin-bottom: 14px; border: 1px solid currentColor; }
html.ui-v2 .tag-guide { color: #00d4ff; background: rgba(0, 212, 255, 0.08); }
html.ui-v2 .tag-security { color: #ff4d6d; background: rgba(255, 77, 109, 0.08); }
html.ui-v2 .tag-trading { color: #30d158; background: rgba(48, 209, 88, 0.08); }
html.ui-v2 .tag-analysis { color: #bf5af2; background: rgba(191, 90, 242, 0.08); }
html.ui-v2 .post-title { font: 800 21px/1.25 'Manrope', sans-serif; letter-spacing: -0.02em; color: #f0f0f8; margin-bottom: 10px; }
html.ui-v2 .post-card:hover .post-title { color: #fff; }
html.ui-v2 .post-excerpt { color: #b8b8d4; font-size: 14.5px; line-height: 1.6; margin-bottom: 18px; flex: 1; }
html.ui-v2 .post-meta { display: flex; align-items: center; gap: 8px; font: 500 12px 'JetBrains Mono', monospace; color: #8484aa; opacity: 1; }
html.ui-v2 .post-meta::after { content: 'Read →'; margin-left: auto; color: #00d4ff; font-weight: 700; opacity: 0; transform: translateX(-6px); transition: opacity 0.2s, transform 0.2s; }
html.ui-v2 .post-card:hover .post-meta::after { opacity: 1; transform: none; }
html.ui-v2 .post-card.bl-hide { display: none; }

@media (max-width: 760px) {
  html.ui-v2 .posts { grid-template-columns: minmax(0, 1fr); }
  html.ui-v2 .post-card, html.ui-v2 .post-card:first-child { padding: 22px; }
  html.ui-v2 .post-card:first-child .post-title { font-size: 23px; }
  html.ui-v2 .bl-search { max-width: none; }
  html.ui-v2 .bl-logo { width: 56px; height: 56px; border-radius: 14px; }
}

/* ---- an article ---- */
html.ui-v2 article { max-width: 780px; padding: 36px 20px 80px; counter-reset: bl-sec; }
html.ui-v2 article .breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font: 600 11px 'JetBrains Mono', monospace; letter-spacing: 0.08em; text-transform: uppercase; color: #8484aa; margin-bottom: 26px; }
html.ui-v2 article .breadcrumb a { color: #9a9ac0; padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.035); text-decoration: none; }
html.ui-v2 article .breadcrumb a:hover { color: #00d4ff; border-color: rgba(0, 212, 255, 0.4); }
html.ui-v2 article > h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.1; margin-bottom: 18px; }
html.ui-v2 article > h1::before { content: 'DeFade research'; display: block; margin-bottom: 14px; font: 700 11px 'JetBrains Mono', monospace; letter-spacing: 0.2em; text-transform: uppercase; color: #00d4ff; -webkit-text-fill-color: #00d4ff; }
html.ui-v2 article .meta { display: inline-flex; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.035); font: 600 12px 'JetBrains Mono', monospace; color: #9a9ac0; margin-bottom: 36px; }
html.ui-v2 article p,
html.ui-v2 article li { color: #c4c4dc; font-size: 17px; line-height: 1.75; }
html.ui-v2 article strong, html.ui-v2 article b { color: #f0f0f8; }
html.ui-v2 article a { color: #5ee4ff; text-decoration: none; border-bottom: 1px solid rgba(94, 228, 255, 0.35); }
html.ui-v2 article a:hover { color: #fff; border-bottom-color: #fff; }
html.ui-v2 article ul, html.ui-v2 article ol { padding-left: 22px; margin: 0 0 22px; }
html.ui-v2 article li { margin-bottom: 8px; }
html.ui-v2 article li::marker { color: #00d4ff; }
html.ui-v2 article h2 { position: relative; font-size: 26px; line-height: 1.25; margin: 52px 0 18px; scroll-margin-top: 90px; }
html.ui-v2 article h2::before { counter-increment: bl-sec; content: counter(bl-sec, decimal-leading-zero); display: inline-block; margin-right: 12px; padding: 3px 9px; border-radius: 8px; vertical-align: 4px; font: 700 12px 'JetBrains Mono', monospace; color: #00d4ff; background: rgba(0, 212, 255, 0.1); border: 1px solid rgba(0, 212, 255, 0.3); }
html.ui-v2 article h3 { font: 800 19px 'Manrope', sans-serif; color: #f0f0f8; margin: 28px 0 10px; }
html.ui-v2 article code { font-family: 'JetBrains Mono', monospace; font-size: 0.88em; color: #5ee4ff; background: rgba(0, 212, 255, 0.08); padding: 1px 6px; border-radius: 6px; }
html.ui-v2 article blockquote { margin: 24px 0; padding: 16px 20px; border-left: 3px solid #bf5af2; border-radius: 0 16px 16px 0; background: rgba(191, 90, 242, 0.06); color: #d8d8ea; }

/* The callout panels the articles use: one glass, a coloured edge by kind. */
html.ui-v2 article .highlight,
html.ui-v2 article .step,
html.ui-v2 article .red-flag,
html.ui-v2 article .pattern,
html.ui-v2 article .good-pattern,
html.ui-v2 article .warning,
html.ui-v2 article .check,
html.ui-v2 article .comparison,
html.ui-v2 article .stat { position: relative; background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 18px; padding: 20px 22px 20px 26px; margin: 22px 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); overflow: hidden; }
html.ui-v2 article .highlight::before,
html.ui-v2 article .step::before,
html.ui-v2 article .red-flag::before,
html.ui-v2 article .pattern::before,
html.ui-v2 article .good-pattern::before,
html.ui-v2 article .warning::before,
html.ui-v2 article .check::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #00d4ff; box-shadow: 0 0 14px #00d4ff; }
html.ui-v2 article .red-flag::before { background: #ff4d6d; box-shadow: 0 0 14px #ff4d6d; }
html.ui-v2 article .warning::before, html.ui-v2 article .pattern::before { background: #ff8844; box-shadow: 0 0 14px #ff8844; }
html.ui-v2 article .good-pattern::before { background: #30d158; box-shadow: 0 0 14px #30d158; }
html.ui-v2 article .step::before { background: linear-gradient(#00d4ff, #bf5af2); }
html.ui-v2 article .step-num { font: 700 11px 'JetBrains Mono', monospace; letter-spacing: 0.14em; color: #00d4ff; }
html.ui-v2 article .highlight p:last-child, html.ui-v2 article .step p:last-child, html.ui-v2 article .red-flag p:last-child, html.ui-v2 article .pattern p:last-child, html.ui-v2 article .warning p:last-child { margin-bottom: 0; }
html.ui-v2 article .stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 24px 0; }
html.ui-v2 article .stat-grid .stat { margin: 0; padding: 18px 20px; }
html.ui-v2 article .stat .num { font: 800 32px 'Manrope', sans-serif; letter-spacing: -0.03em; color: #00d4ff; text-shadow: 0 0 20px rgba(0, 212, 255, 0.3); }
html.ui-v2 article .stat .lbl { font: 600 11px 'JetBrains Mono', monospace; letter-spacing: 0.1em; text-transform: uppercase; color: #9a9ac0; }
html.ui-v2 article .cmp-wrap { border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.035); overflow-x: auto; margin: 24px 0; }
html.ui-v2 article table { width: 100%; border-collapse: collapse; font-size: 14px; }
html.ui-v2 article th { text-align: left; padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.02); }
html.ui-v2 article td { padding: 11px 14px; color: #c4c4dc; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
html.ui-v2 article tr:hover td { background: rgba(255, 255, 255, 0.025); }

/* The call to action: a nebula panel and the site's gradient button. */
html.ui-v2 article .cta-box { position: relative; overflow: hidden; margin: 48px 0; padding: 34px 32px; border-radius: 24px; text-align: center; border: 1px solid rgba(0, 212, 255, 0.3); background: radial-gradient(500px 220px at 15% 0%, rgba(0, 212, 255, 0.16), transparent 70%), radial-gradient(500px 220px at 85% 100%, rgba(191, 90, 242, 0.16), transparent 70%), rgba(255, 255, 255, 0.035); box-shadow: 0 0 24px rgba(0, 212, 255, 0.12); }
html.ui-v2 article .cta-box h3 { font: 800 24px 'Manrope', sans-serif; color: #f0f0f8; margin: 0 0 8px; }
html.ui-v2 article .cta-box p { color: #b8b8d4; }
html.ui-v2 article .cta-btn { display: inline-block; padding: 13px 28px; border-radius: 999px; border: 0; background: linear-gradient(135deg, #00d4ff, #bf5af2); color: #03030a; font: 700 14px 'Chakra Petch', sans-serif; letter-spacing: 0.06em; text-transform: uppercase; box-shadow: 0 0 22px rgba(0, 212, 255, 0.35); transition: transform 0.15s, box-shadow 0.15s; }
html.ui-v2 article .cta-btn:hover { transform: translateY(-2px); box-shadow: 0 0 28px rgba(0, 212, 255, 0.55); color: #03030a; border: 0; }

html.ui-v2 article .share-bar { border-top: 1px solid rgba(255, 255, 255, 0.06); flex-wrap: wrap; }
html.ui-v2 article .share-btn { border-radius: 999px; font-family: 'Manrope', sans-serif; font-weight: 700; padding: 9px 16px; border-bottom: 0; }
html.ui-v2 article .share-btn-x { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); color: #f0f0f8; }
html.ui-v2 article .share-btn-x:hover { background: rgba(255, 255, 255, 0.12); }
html.ui-v2 article .share-btn-copy { background: rgba(0, 212, 255, 0.06); border: 1px solid rgba(0, 212, 255, 0.3); color: #5ee4ff; }

/* The contents rail beside the article on a wide screen (js/blog.js). */
html.ui-v2 .bl-toc { display: none; }
@media (min-width: 1280px) {
  html.ui-v2 .bl-toc { display: block; position: fixed; top: 120px; left: calc(50% + 420px); width: 230px; max-height: calc(100vh - 160px); overflow-y: auto; padding: 16px 0 16px 16px; border-left: 1px solid rgba(255, 255, 255, 0.08); }
  html.ui-v2 .bl-toc h4 { margin: 0 0 10px; font: 700 10.5px 'JetBrains Mono', monospace; letter-spacing: 0.18em; text-transform: uppercase; color: #00d4ff; }
  html.ui-v2 .bl-toc a { display: block; padding: 6px 10px; margin-left: -17px; border-left: 2px solid transparent; font: 600 12.5px/1.35 'Manrope', sans-serif; color: #9a9ac0; text-decoration: none; transition: color 0.15s, border-color 0.15s, background 0.15s; }
  html.ui-v2 .bl-toc a:hover { color: #fff; }
  html.ui-v2 .bl-toc a.on { color: #00d4ff; border-left-color: #00d4ff; background: linear-gradient(90deg, rgba(0, 212, 255, 0.08), transparent); }
}

@media (max-width: 600px) {
  html.ui-v2 article { padding: 24px 16px 60px; }
  html.ui-v2 article p, html.ui-v2 article li { font-size: 16px; }
  html.ui-v2 article h2 { font-size: 22px; margin-top: 40px; }
  html.ui-v2 article .cta-box { padding: 26px 20px; }
}
html.ui-v2 article .bl-live, html.ui-v2 .bl-stats b[data-bl-rugtotal] { color: #00d4ff; font-variant-numeric: tabular-nums; }
