/* Shared theme for DB-rendered blog posts (functions/blog/[slug].js).
   Mirrors the inline styles baked into the 88 static /blog/*.html posts so
   DB-backed and file-backed articles are visually identical. Static posts are
   NOT changed — they keep their own inline copy. Edit both if the look drifts. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #07080C; --bg2: #0D0F17; --bg3: #12141F;
  --gold: #FBBF24; --teal: #14B8A6;
  --text: #E8EAF0; --muted: #9CA3AF; --border: #1E2130;
}
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: 'Inter', sans-serif; font-size: 16px; line-height: 1.8; -webkit-font-smoothing: antialiased; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

.article-wrapper { max-width: 800px; margin: 0 auto; padding: 0 24px 80px; }

.breadcrumb { padding: 20px 0 0; font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--gold); text-decoration: none; }
.breadcrumb span { color: var(--border); }

.article-header { padding: 40px 0 32px; border-bottom: 1px solid var(--border); margin-bottom: 48px; }
.article-tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; color: var(--teal); background: rgba(20,184,166,0.12); padding: 4px 10px; border-radius: 20px; margin-bottom: 20px; }
.article-header h1 { font-family: 'Sora', sans-serif; font-size: clamp(28px, 4vw, 44px); font-weight: 800; line-height: 1.2; letter-spacing: -1px; margin-bottom: 20px; color: var(--text); }
.article-meta { display: flex; gap: 20px; font-size: 13px; color: var(--muted); flex-wrap: wrap; align-items: center; }

article h2 { font-family: 'Sora', sans-serif; font-size: clamp(22px, 3vw, 28px); font-weight: 700; line-height: 1.25; color: var(--text); margin: 48px 0 16px; }
article h3 { font-family: 'Sora', sans-serif; font-size: 20px; font-weight: 600; color: var(--text); margin: 32px 0 12px; }
article p { margin-bottom: 20px; color: #C8CADE; }
article ul, article ol { padding-left: 24px; margin-bottom: 20px; }
article li { margin-bottom: 8px; color: #C8CADE; }
article strong { color: var(--text); font-weight: 600; }
article code { font-family: 'JetBrains Mono', ui-monospace, monospace; background: var(--bg3); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-size: 13px; color: var(--gold); }

.callout { background: var(--bg2); border-left: 3px solid var(--gold); border-radius: 0 12px 12px 0; padding: 20px 24px; margin: 32px 0; }
.callout.teal { border-left-color: var(--teal); }
.callout p { margin: 0; }

.table-wrap { overflow-x: auto; margin: 32px 0; border-radius: 12px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead { background: var(--bg3); }
thead th { padding: 14px 16px; text-align: left; font-family: 'Sora', sans-serif; font-weight: 600; color: var(--text); font-size: 13px; letter-spacing: 0.3px; border-bottom: 1px solid var(--border); }
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: #C8CADE; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(251,191,36,0.04); }
.check { color: #14B8A6; font-weight: 700; }
.cross { color: #F87171; }
.partial { color: #FBBF24; }

.cta-box { background: linear-gradient(135deg, rgba(251,191,36,0.08) 0%, rgba(20,184,166,0.08) 100%); border: 1px solid rgba(251,191,36,0.25); border-radius: 20px; padding: 48px 40px; text-align: center; margin: 64px 0 0; }
.cta-box h2 { font-family: 'Sora', sans-serif; font-size: 28px; font-weight: 800; color: var(--text); margin-bottom: 12px; letter-spacing: -0.5px; }
.cta-box p { color: var(--muted); margin-bottom: 28px; font-size: 16px; }
.cta-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-gold { background: var(--gold); color: #07080C; font-family: 'Sora', sans-serif; font-weight: 700; font-size: 15px; padding: 14px 28px; border-radius: 10px; transition: opacity 0.2s; display: inline-block; }
.btn-gold:hover { opacity: 0.9; text-decoration: none; }
.btn-outline { border: 1px solid var(--border); color: var(--text); font-family: 'Sora', sans-serif; font-weight: 600; font-size: 15px; padding: 14px 28px; border-radius: 10px; transition: border-color 0.2s; display: inline-block; }
.btn-outline:hover { border-color: var(--teal); text-decoration: none; }

.also-read { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 24px; margin: 48px 0; }
.also-read p { font-size: 12px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.also-read a { font-family: 'Sora', sans-serif; font-size: 16px; font-weight: 600; color: var(--gold); display: block; margin-bottom: 8px; }
.also-read a:last-child { margin-bottom: 0; }

.faq-section { margin: 48px 0; }
.faq-item { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.faq-q { background: var(--bg2); padding: 20px 24px; font-family: 'Sora', sans-serif; font-weight: 600; font-size: 16px; color: var(--text); }
.faq-a { padding: 20px 24px; color: #C8CADE; border-top: 1px solid var(--border); }
.faq-a p { margin: 0; }

footer { border-top: 1px solid var(--border); background: var(--bg2); }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 40px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer-logo { font-family: 'Sora', sans-serif; font-size: 19px; font-weight: 900; letter-spacing: -0.5px; text-transform: lowercase; text-decoration: none; }
.footer-logo .logo-e { color: #F1F5F9; }
.footer-logo .logo-x { color: #FBBF24; }
.footer-logo .logo-rest { color: #F1F5F9; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { font-size: 14px; color: var(--muted); transition: color 0.2s; text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-copy { width: 100%; text-align: center; font-size: 13px; color: var(--muted); margin-top: 16px; padding-top: 20px; border-top: 1px solid var(--border); }

/* ===== design-code skin (mirrors data-dc block in static posts) ===== */
body::before{content:'';position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:
    radial-gradient(ellipse 120% 92% at 50% 28%,transparent 58%,rgba(0,0,0,0.42) 100%),
    radial-gradient(ellipse 44% 38% at 50% -8%,rgba(251,191,36,0.14),transparent 60%),
    radial-gradient(ellipse 85% 60% at 50% -12%,rgba(222,228,240,0.085),transparent 64%),
    radial-gradient(ellipse 44% 34% at 88% 110%,rgba(13,148,136,0.05),transparent 70%),
    linear-gradient(180deg,#0D0E15 0%,#08090D 48%,#050609 100%);
}
body::after{content:'';position:fixed;top:0;left:0;right:0;height:78vh;z-index:-1;pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0.897 0.297 0.098 0 0 0.150 0.933 0.079 0 0 0.084 0.094 0.756 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode:screen;opacity:0.12;
  -webkit-mask-image:radial-gradient(ellipse 62% 72% at 50% -10%,#000,transparent 72%);
  mask-image:radial-gradient(ellipse 62% 72% at 50% -10%,#000,transparent 72%);
}
@media (prefers-reduced-motion:reduce){body::after{display:none}}
.article-tag{
  border-radius:5px;background:rgba(8,9,13,0.82);border:1px solid rgba(13,148,136,0.38);
  color:#2DD4BF;font-family:'JetBrains Mono',monospace;font-size:9px;font-weight:700;
  letter-spacing:1.6px;box-shadow:0 3px 9px rgba(0,0,0,0.45);
}
.callout{
  border:1px solid rgba(245,158,11,0.22);border-left:1px solid rgba(245,158,11,0.22);border-radius:10px;
  background:radial-gradient(ellipse 240px 130px at 100% 100%,rgba(245,158,11,0.06) 0%,transparent 65%),linear-gradient(180deg,#14151c 0%,#0d0e14 100%);
  box-shadow:inset 0 1px 0 rgba(251,191,36,0.10),0 1px 2px rgba(0,0,0,0.45);
}
.callout.teal{border-color:rgba(13,148,136,0.28);border-left-color:rgba(13,148,136,0.28);box-shadow:inset 0 1px 0 rgba(226,232,240,0.07),0 1px 2px rgba(0,0,0,0.45)}
.also-read{
  background:linear-gradient(180deg,#12131a 0%,#0c0d12 100%);border-radius:10px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.05),0 1px 2px rgba(0,0,0,0.45),0 8px 20px -8px rgba(0,0,0,0.45);
}
.table-wrap{
  border-radius:10px;border-color:rgba(245,158,11,0.14);
  background:linear-gradient(180deg,#12131a 0%,#0c0d12 100%);
  box-shadow:inset 0 1px 0 rgba(251,191,36,0.08),0 1px 2px rgba(0,0,0,0.45);
}
.cta-box{
  border-radius:12px;border:1px solid rgba(245,158,11,0.24);position:relative;overflow:hidden;
  background:radial-gradient(ellipse 46% 60% at 50% 0%,rgba(251,191,36,.08),transparent 66%),radial-gradient(ellipse 260px 170px at 100% 100%,rgba(245,158,11,0.07) 0%,transparent 65%),linear-gradient(180deg,#16171f 0%,#0d0e14 100%);
  box-shadow:inset 0 1px 0 rgba(251,191,36,0.14),0 2px 4px rgba(0,0,0,0.5),0 20px 44px -10px rgba(0,0,0,0.55);
}
.cta-box::before{content:'';position:absolute;top:0;left:10%;right:10%;height:1px;background:linear-gradient(90deg,transparent,#F59E0B,#14B8A6,transparent)}
.btn-gold{
  background:linear-gradient(135deg,#FBBF24 0%,#F59E0B 100%);border-radius:8px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.35),inset 0 -1px 0 rgba(180,83,9,0.55),0 3px 9px -1px rgba(0,0,0,0.5),0 2px 14px rgba(245,158,11,0.18);
  transition:background .3s,transform .3s,box-shadow .3s;
}
.btn-gold:hover{
  background:linear-gradient(135deg,#FCD34D 0%,#FBBF24 100%);opacity:1;transform:translateY(-1px);text-decoration:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.4),inset 0 -1px 0 rgba(180,83,9,0.5),0 6px 16px -2px rgba(0,0,0,0.5),0 4px 22px rgba(245,158,11,0.28);
}
.btn-outline{
  background:linear-gradient(180deg,#171821 0%,#0f1016 100%);border:1px solid rgba(255,255,255,0.08);border-radius:8px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.06),0 2px 6px rgba(0,0,0,0.4);
  transition:border-color .3s,transform .3s;
}
.btn-outline:hover{border-color:rgba(255,255,255,0.16);transform:translateY(-1px);text-decoration:none}
footer,.footer-copy{color:#4B5563}
.footer-links a{color:#4B5563}
.footer-links a:hover{color:#FBBF24}

/* author box */
.author-box{display:flex;gap:16px;align-items:center;background:#121212;border:1px solid rgba(255,255,255,0.07);border-radius:14px;padding:18px 20px;margin:40px 0 8px}
.author-name{font-weight:700;font-size:14px;color:#F3F4F6;margin-bottom:4px}
.author-name a{color:#FBBF24;text-decoration:none}
.author-name a:hover{text-decoration:underline}
.author-bio{font-size:13px;color:#9CA3AF;margin:0;line-height:1.55}
.author-bio a{color:#FBBF24;text-decoration:none}
.author-bio a:hover{text-decoration:underline}
.author-top{display:flex;align-items:center;gap:8px;margin:16px 0 12px;font-size:14px;color:#9CA3AF}
.author-top a{color:#F3F4F6;font-weight:600;text-decoration:none}
.author-top a:hover{color:#FBBF24}
