/* ============================================================
   Shared styles for blog articles and legal pages
   Loads after style.css and reuses its tokens.
   ============================================================ */

:root { --reading-width: 760px; }
body { background: var(--bg-soft); }

/* ---- Top bar ---- */
.blog-article-nav {
  position: sticky; top: 0; z-index: 900;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.blog-article-nav .container {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px;
}
.blog-article-nav a:not(.btn) {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink-2); font-weight: 600; font-size: 14px; text-decoration: none;
  transition: color .15s ease;
}
.blog-article-nav a:not(.btn):hover { color: var(--brand); }
.blog-nav-cta { display: flex; align-items: center; gap: 8px; }
.blog-article-nav .btn { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.blog-article-nav .btn-secondary { background: #fff; color: var(--ink); border: 1.5px solid var(--line-strong); }
.blog-article-nav .btn-secondary:hover { border-color: var(--ink); }

/* ---- Article hero ---- */
.blog-article-hero {
  padding: 56px 0 36px;
  background:
    radial-gradient(700px 300px at 90% 0%, rgba(37, 99, 255, 0.10), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--bg-soft) 100%);
  border-bottom: 1px solid var(--line);
}
.blog-article-hero .container { max-width: var(--reading-width); }
.blog-article-meta {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  color: var(--muted); font-weight: 500; font-size: 13px; margin-bottom: 18px;
}
.blog-article-meta .pill {
  padding: 5px 12px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.blog-article-hero h1 { font-size: clamp(30px, 5vw, 46px); margin-bottom: 16px; }
.blog-article-hero p { color: var(--muted); font-size: 17px; line-height: 1.6; }

/* ---- Article body ---- */
.blog-article-content { padding: 36px 0 80px; }
.blog-article-content .container { max-width: var(--reading-width); }
.blog-article-content h2 { font-size: 26px; margin: 40px 0 12px; }
.blog-article-content h3 { font-size: 19px; margin: 28px 0 10px; }
.blog-article-content p { color: var(--ink-2); margin-bottom: 16px; line-height: 1.75; font-size: 17px; }
.blog-article-content ul, .blog-article-content ol { margin: 0 0 18px 22px; color: var(--ink-2); line-height: 1.7; list-style: disc; }
.blog-article-content ol { list-style: decimal; }
.blog-article-content li { margin-bottom: 8px; font-size: 16px; }
.blog-article-content a { color: var(--brand); }

/* ---- Tip box ---- */
.tip-box {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: 14px; padding: 16px 18px; margin: 24px 0;
  color: var(--ink-2); line-height: 1.65; box-shadow: var(--shadow-sm);
}
.tip-box strong { color: var(--brand); }

/* ---- Figures ---- */
.blog-article-figure {
  margin: 28px 0 12px; border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow-md); background: #fff; border: 1px solid var(--line);
}
.blog-article-figure img { width: 100%; display: block; height: auto; }
.fig-caption { padding: 10px 14px; font-size: 13px; color: var(--muted); background: #fff; border-top: 1px solid var(--line); }

/* ---- CTA panel ---- */
.cta-panel {
  margin-top: 48px; padding: 28px 26px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand) 0%, #1a4fe0 100%);
  color: #fff; display: flex; flex-direction: column; gap: 16px;
  box-shadow: var(--shadow-brand);
}
.cta-panel h3 { color: #fff; margin: 0 0 6px; font-size: 22px; }
.cta-panel p { color: rgba(255, 255, 255, 0.88); margin: 0; font-size: 16px; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-panel .btn { box-shadow: none; background: #fff; color: var(--brand); }
.cta-panel .btn:hover { background: #f1f4ff; }
.cta-panel .btn.secondary { background: rgba(255, 255, 255, 0.14); color: #fff; border: 1px solid rgba(255, 255, 255, 0.35); }
.cta-panel .btn.secondary:hover { background: rgba(255, 255, 255, 0.22); }

/* ---- Legacy modal markup used by some articles ---- */
.modal-content {
  position: relative; width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto;
  background: #fff; border-radius: var(--radius); padding: 32px 24px; box-shadow: var(--shadow-lg);
}
.modal-content h2 { font-size: 24px; margin-bottom: 16px; }
.modal-form { display: grid; gap: 12px; }
.modal-form input, .modal-form select, .modal-form textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; background: var(--bg-soft);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-size: 15px;
}
.modal-form input:focus, .modal-form select:focus, .modal-form textarea:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px var(--brand-glow); }
.close-modal { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border-radius: 10px; font-size: 24px; color: var(--muted); }
.close-modal:hover { background: var(--bg-soft); color: var(--ink); }

/* ---- Site footer (compact) ---- */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.75); padding: 44px 0 24px; }
.site-footer-top { display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; margin-bottom: 28px; }
.site-footer .brand { color: #fff; }
.site-footer-top nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.site-footer-top nav a { color: rgba(255,255,255,0.75); text-decoration: none; font-size: 15px; }
.site-footer-top nav a:hover { color: #fff; }
.site-footer .social { margin-top: 0; }
.site-footer .footer-bottom { border-top-color: rgba(255,255,255,0.1); }

/* ============================================================
   Article graphics (unchanged visuals, retuned tokens)
   ============================================================ */

/* Pricing: fee breakdown */
.blog-fee-visual {
  margin: 0 0 32px; border-radius: 18px; padding: 28px 24px;
  background: linear-gradient(135deg, #eef2ff 0%, #f5f7ff 100%); border: 1px solid #dfe7ff;
  display: flex; flex-direction: column; gap: 20px; box-shadow: 0 8px 24px rgba(37, 99, 255, 0.08);
}
.bfv-eyebrow { font-size: 12px; font-weight: 800; color: var(--brand); text-transform: uppercase; letter-spacing: 0.08em; }
.bfv-bar { display: flex; height: 48px; border-radius: 10px; overflow: hidden; font-size: 13px; font-weight: 800; }
.bfv-keep { flex: 85; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; gap: 6px; }
.bfv-fee-seg { flex: 15; background: #c7d4fe; color: var(--brand); display: flex; align-items: center; justify-content: center; }
.bfv-example { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.bfv-ex-item { display: flex; flex-direction: column; gap: 3px; }
.bfv-dollar { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1; }
.bfv-dollar.bfv-fee-amt { color: #7c8dc7; }
.bfv-dollar.bfv-green { color: var(--mint); }
.bfv-sub { font-size: 12px; color: var(--muted); font-weight: 600; }
.bfv-arrow { font-size: 20px; color: #c7d4fe; font-weight: 700; flex-shrink: 0; }

/* Delegate: handoff flow */
.delegate-flow-visual { background: linear-gradient(135deg, #f0f5ff 0%, #eef7f4 100%); padding: 36px 20px 28px; display: flex; align-items: flex-start; justify-content: center; gap: 8px; }
.dfv-step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; flex: 1; min-width: 0; max-width: 160px; }
.dfv-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.dfv-icon-2 { background: #0ea5e9; }
.dfv-icon-3 { background: var(--mint); }
.dfv-label { font-size: 13px; font-weight: 800; color: var(--ink); line-height: 1.3; }
.dfv-sub { font-size: 11px; color: var(--muted); line-height: 1.4; }
.dfv-connector { color: #c7d4fe; font-size: 22px; margin-top: 17px; flex-shrink: 0; }

/* Matching: routing flow */
.match-flow-visual { background: linear-gradient(135deg, #0b1533 0%, #1a4fe0 100%); padding: 32px 20px; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 180px; }
.mfv-card { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; max-width: 200px; }
.mfv-eyebrow { font-size: 10px; font-weight: 800; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.08em; }
.mfv-title { font-size: 14px; font-weight: 700; color: #fff; line-height: 1.3; }
.mfv-agent-row { background: rgba(255,255,255,0.05); border-radius: 8px; padding: 6px 10px; font-size: 11px; color: rgba(255,255,255,0.6); font-weight: 600; }
.mfv-agent-row.mfv-top { background: rgba(11,138,75,0.18); border: 1px solid rgba(11,138,75,0.3); color: #4ade80; }
.mfv-confirmed-col { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; max-width: 120px; }
.mfv-check { width: 48px; height: 48px; border-radius: 50%; background: var(--mint); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; }
.mfv-conf-label { font-size: 13px; font-weight: 700; color: #fff; text-align: center; }
.mfv-timer { font-size: 11px; color: rgba(255,255,255,0.4); }
.mfv-arrow { color: rgba(255,255,255,0.2); font-size: 20px; flex-shrink: 0; }

/* Trends: bar chart */
.trends-chart-visual { background: #0b1533; padding: 24px 20px 0; display: flex; flex-direction: column; gap: 12px; }
.tcv-header { font-size: 12px; font-weight: 800; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.08em; }
.tcv-chart { display: flex; align-items: flex-end; gap: 6px; height: 110px; }
.tcv-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.tcv-bar { width: 100%; border-radius: 4px 4px 0 0; background: rgba(37,99,255,0.3); }
.tcv-bar.tcv-hi { background: #2563ff; }
.tcv-bar.tcv-med { background: rgba(37,99,255,0.6); }
.tcv-val { font-size: 10px; font-weight: 800; color: rgba(255,255,255,0.5); }
.tcv-labels { display: flex; gap: 6px; }
.tcv-label { flex: 1; text-align: center; font-size: 11px; color: rgba(255,255,255,0.35); font-weight: 700; padding-bottom: 12px; }
.tcv-legend { display: flex; gap: 16px; font-size: 11px; font-weight: 700; padding: 0 0 16px; }
.tcv-leg-item { display: flex; align-items: center; gap: 6px; }
.tcv-leg-dot { width: 10px; height: 10px; border-radius: 3px; background: rgba(37,99,255,0.3); }
.tcv-leg-dot.hi { background: #2563ff; }
.tcv-leg-label { color: rgba(255,255,255,0.4); }

/* ---- Responsive ---- */
@media (min-width: 640px) {
  .site-footer-top { flex-direction: row; justify-content: space-between; text-align: left; }
  .cta-panel { flex-direction: row; align-items: center; justify-content: space-between; padding: 32px; }
  .cta-actions { flex-shrink: 0; }
}
@media (min-width: 900px) {
  .blog-article-hero { padding: 88px 0 48px; }
  .blog-article-content { padding: 48px 0 110px; }
  .blog-article-content h2 { font-size: 30px; }
  .blog-article-content h3 { font-size: 21px; }
  .bfv-example { flex-wrap: nowrap; }
}
