:root {
  --bg: #0c0c0e;
  --surface: rgba(255,255,255,0.035);
  --surface-solid: #141416;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --accent: #c8f542;
  --accent-dim: rgba(200,245,66,0.12);
  --accent2: #42d9c5;
  --text: #ebebeb;
  --text-secondary: rgba(255,255,255,0.45);
  --radius: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 18px; }
body { background: var(--bg); color: var(--text); font-family: 'Outfit', system-ui, sans-serif; line-height: 1.8; -webkit-font-smoothing: antialiased; }

/* Header */
.blog-header { display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 2rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: rgba(12,12,14,0.92); backdrop-filter: blur(12px); z-index: 100; }
.logo { display: flex; align-items: center; gap: 6px; text-decoration: none; cursor: pointer; transition: all 0.3s ease; }
.logo:hover .logo-badge { background: var(--accent); color: #0c0c0e; box-shadow: 0 0 14px rgba(200,245,66,0.3); }
.logo:hover .logo-text { opacity: 1; }
.logo-badge { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; font-weight: 500; color: var(--accent); background: var(--accent-dim); border: 1px solid rgba(200,245,66,0.2); padding: 3px 8px; border-radius: 6px; letter-spacing: 0.01em; transition: all 0.35s ease; position: relative; overflow: hidden; }
.logo-badge::after { content: ''; position: absolute; top: 0; left: -100%; width: 60%; height: 100%; background: linear-gradient(90deg, transparent, rgba(200,245,66,0.25), transparent); animation: shimmer 3s ease-in-out infinite; }
@keyframes shimmer { 0% { left: -100%; } 40% { left: 150%; } 100% { left: 150%; } }
.logo-text { font-family: 'Outfit', system-ui, sans-serif; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.04em; color: var(--text); opacity: 0.85; transition: opacity 0.3s ease; }
.header-right { display: flex; align-items: center; gap: 12px; }

/* Header nav links */
.pricing-header-link { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--text-secondary); text-decoration: none; padding: 7px 14px; transition: color 0.25s ease; }
.pricing-header-link:hover { color: var(--accent); }

#auth-header-btn { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--text-secondary); text-decoration: none; padding: 7px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; transition: all 0.25s ease; }
#auth-header-btn:hover { border-color: var(--border-hover); color: var(--text); }

#signup-header-btn { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--accent); text-decoration: none; padding: 7px 16px; background: var(--accent-dim); border: 1px solid rgba(200,245,66,0.2); border-radius: 8px; transition: all 0.25s ease; }
#signup-header-btn:hover { background: var(--accent); color: #0c0c0e; }

/* History dropdown */
.history-picker { position: relative; z-index: 101; }
.history-btn { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; font-weight: 400; padding: 7px 14px; border-radius: 8px; cursor: pointer; transition: all 0.25s ease; letter-spacing: 0.02em; white-space: nowrap; }
.history-btn:hover { color: var(--text); border-color: var(--border-hover); background: rgba(255,255,255,0.06); }
.history-dropdown { display: none; position: absolute; top: calc(100% + 8px); right: 0; width: 340px; max-height: 420px; background: var(--surface-solid); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,0.5); overflow: hidden; z-index: 200; }
.history-dropdown.show { display: flex; flex-direction: column; }
.history-dropdown-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02); }
.history-dropdown-header span { font-size: 0.72rem; font-weight: 600; color: var(--text); letter-spacing: 0.03em; text-transform: uppercase; }
.history-dropdown-header button { background: none; border: none; color: var(--text-secondary); font-size: 0.62rem; cursor: pointer; padding: 2px 8px; border-radius: 4px; transition: all 0.15s; font-family: 'JetBrains Mono', monospace; }
.history-dropdown-header button:hover { color: #ff5c5c; background: rgba(255,92,92,0.1); }
#history-list { overflow-y: auto; max-height: 360px; }
#history-list::-webkit-scrollbar { width: 4px; }
#history-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.history-item { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid rgba(255,255,255,0.04); cursor: pointer; transition: background 0.15s; text-decoration: none; color: inherit; }
.history-item:hover { background: rgba(255,255,255,0.04); }
.history-item:last-child { border-bottom: none; }
.history-item-icon { flex-shrink: 0; width: 28px; height: 28px; border-radius: 6px; background: rgba(200,245,66,0.08); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; }
.history-item-info { flex: 1; min-width: 0; }
.history-item-tool { font-size: 0.72rem; font-weight: 600; color: var(--text); }
.history-item-preview { font-size: 0.65rem; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.history-item-time { flex-shrink: 0; font-size: 0.58rem; color: var(--text-secondary); opacity: 0.7; }
.history-empty { text-align: center; color: var(--text-secondary); padding: 28px 14px; font-size: 0.75rem; }

/* Language dropdown */
.lang-picker { position: relative; z-index: 101; }
.lang-btn { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; font-weight: 400; padding: 7px 14px; border-radius: 8px; cursor: pointer; transition: all 0.25s ease; letter-spacing: 0.02em; }
.lang-btn:hover { color: var(--text); border-color: var(--border-hover); }
.lang-btn::after { content: '\25BE'; font-size: 0.7em; opacity: 0.5; }
.lang-dropdown { display: none; position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface-solid); border: 1px solid var(--border); border-radius: 8px; padding: 4px; min-width: 150px; box-shadow: 0 8px 32px rgba(0,0,0,0.4); z-index: 200; }
.lang-dropdown.show { display: block; }
.lang-option { display: block; width: 100%; text-align: left; padding: 7px 12px; background: none; border: none; color: var(--text-secondary); cursor: pointer; border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; transition: all 0.15s; }
.lang-option:hover { background: var(--surface); color: var(--text); }
.lang-option.active { color: var(--accent); }

/* Responsive header */
@media (max-width: 640px) {
  .blog-header { padding: 1rem; gap: 8px; }
  .header-right { gap: 6px; }
  .pricing-header-link { display: none; }
  #auth-header-btn, #signup-header-btn { padding: 6px 10px; font-size: 0.72rem; }
  .history-btn, .lang-btn { padding: 6px 10px; font-size: 0.72rem; }
  .history-dropdown { width: calc(100vw - 24px); right: -12px; }
}

/* Back button */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  padding: 0;
  margin: 16px 0 0 28px;
  cursor: pointer;
  transition: color 0.25s ease;
  text-decoration: none;
}
.back-btn svg {
  width: 18px; height: 18px;
  stroke: var(--text-secondary);
  transition: stroke 0.25s ease, transform 0.25s ease;
}
.back-btn:hover { color: var(--text); }
.back-btn:hover svg { stroke: var(--text); transform: translateX(-3px); }

/* Breadcrumb */
.breadcrumb { padding: 1rem 2rem; font-size: 0.85rem; color: var(--text-secondary); max-width: 820px; margin: 0 auto; }
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 0.4rem; }

/* Article */
.article { max-width: 780px; margin: 0 auto; padding: 2rem 2rem 4rem; }
.article-meta { display: flex; gap: 1.2rem; color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 2rem; }
.article h1 { font-size: 2.2rem; font-weight: 700; line-height: 1.25; margin-bottom: 1.5rem; background: linear-gradient(135deg, var(--text), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.article h2 { font-size: 1.4rem; font-weight: 600; color: var(--accent); margin: 2.5rem 0 1rem; padding-bottom: 0.4rem; border-bottom: 1px solid rgba(200,245,66,0.1); }
.article h3 { font-size: 1.1rem; font-weight: 600; color: var(--text); margin: 1.5rem 0 0.5rem; }
.article p { margin-bottom: 1rem; color: rgba(255,255,255,0.85); }
.article a { color: var(--accent); text-decoration: none; }
.article a:hover { text-decoration: underline; }
.article ul, .article ol { margin: 1rem 0 1rem 1.5rem; color: rgba(255,255,255,0.85); }
.article li { margin-bottom: 0.5rem; }
.article strong { color: var(--text); }

/* CTA Box */
.cta-box { background: linear-gradient(135deg, rgba(200,245,66,0.08), rgba(66,217,197,0.06)); border: 1px solid rgba(200,245,66,0.2); border-radius: var(--radius); padding: 1.5rem; margin: 2rem 0; text-align: center; }
.cta-box p { color: var(--text); margin-bottom: 0.8rem; }
.cta-btn, .article .cta-btn { display: inline-block; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #0c0c0e !important; padding: 10px 28px; border-radius: 8px; font-weight: 700; text-decoration: none !important; font-size: 0.95rem; transition: transform 0.2s, box-shadow 0.2s; }
.cta-btn:hover, .article .cta-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(200,245,66,0.25); text-decoration: none !important; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9rem; }
.data-table th { text-align: left; padding: 0.7rem 1rem; color: var(--accent); border-bottom: 2px solid rgba(200,245,66,0.2); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
.data-table td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); color: rgba(255,255,255,0.8); }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.savings { color: var(--accent); font-weight: 600; }

/* Code blocks */
.code-block { background: var(--surface-solid); border: 1px solid var(--border); border-radius: 8px; padding: 1.2rem; margin: 1.5rem 0; overflow-x: auto; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; line-height: 1.6; color: rgba(255,255,255,0.8); }

/* FAQ */
.faq-section { margin: 2.5rem 0; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin: 0.6rem 0; overflow: hidden; transition: border-color 0.3s; }
.faq-item:hover { border-color: var(--border-hover); }
.faq-q { padding: 1rem 1.2rem; cursor: pointer; font-weight: 500; display: flex; justify-content: space-between; align-items: center; }
.faq-q::after { content: '+'; color: var(--accent); font-size: 1.2rem; transition: transform 0.3s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s; padding: 0 1.2rem; color: var(--text-secondary); font-size: 0.95rem; }
.faq-item.open .faq-a { max-height: 300px; padding: 0 1.2rem 1rem; }

/* Related */
.related-section { margin: 3rem 0 2rem; padding: 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.related-section h3 { color: var(--accent); margin-bottom: 1rem; font-size: 1rem; }
/* Legacy .related-links flex layout was overridden by the card layout
   appended at the end of this file (post-2026-05-10). Pseudo-element
   arrow before each link removed — the card border provides separation. */
.related-links a { text-decoration: none; }
.related-links a:hover { color: var(--accent); }

/* Footer */
.blog-footer { text-align: center; padding: 2rem; border-top: 1px solid var(--border); color: var(--text-secondary); font-size: 0.85rem; }
.blog-footer a { color: var(--accent); text-decoration: none; }

/* Steps */
.step { display: flex; gap: 1rem; margin: 1.2rem 0; align-items: flex-start; }
.step-num { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-dim); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; margin-top: 2px; }
.step-content { flex: 1; }
.step-content strong { display: block; margin-bottom: 0.3rem; }

/* Tool cards grid */
.tool-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.8rem; margin: 1.5rem 0; }
.tool-link { display: block; padding: 0.8rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--text); text-decoration: none; font-size: 0.9rem; transition: border-color 0.2s, transform 0.2s; }
.tool-link:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.tool-link span { color: var(--accent); }

/* Responsive */
@media (max-width: 640px) {
  .blog-header { padding: 1rem; }
  .article { padding: 1.5rem 1rem 3rem; }
  .article h1 { font-size: 1.6rem; }
  .article h2 { font-size: 1.2rem; }
  .breadcrumb { padding: 0.8rem 1rem; }
  .tool-links { grid-template-columns: 1fr; }
}

/* Tips list */
.tips-list { list-style: none; padding: 0; }
.tips-list li { background: var(--surface); padding: 1.25rem; margin-bottom: 1rem; border-left: 4px solid var(--accent); border-radius: 4px; color: rgba(255,255,255,0.85); }
.tips-list li strong { color: var(--text); }

/* Blog index page */
.blog-hero { max-width: 820px; margin: 0 auto; padding: 3rem 2rem 1.5rem; }
.blog-hero h1 { font-size: 2.4rem; font-weight: 700; background: linear-gradient(135deg, var(--text), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 0.5rem; }
.blog-hero p { color: var(--text-secondary); font-size: 1.05rem; max-width: 600px; }

.blog-grid { max-width: 820px; margin: 0 auto; padding: 1rem 2rem 4rem; display: flex; flex-direction: column; gap: 1.2rem; }

.blog-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem 1.8rem; text-decoration: none; transition: border-color 0.25s, transform 0.2s, box-shadow 0.25s; }
.blog-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 30px rgba(200,245,66,0.06); }
.blog-card-tag { display: inline-block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; padding: 3px 10px; border-radius: 20px; margin-bottom: 0.8rem; }
.tag-guide { background: var(--accent-dim); color: var(--accent); }
.tag-comparison { background: rgba(66,217,197,0.1); color: var(--accent2); }
.tag-tutorial { background: rgba(168,130,255,0.1); color: #a882ff; }
.blog-card h2 { font-size: 1.25rem; font-weight: 600; color: var(--text); margin-bottom: 0.5rem; line-height: 1.35; }
.blog-card p { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.6; margin: 0; }
.blog-card-meta { display: flex; gap: 1rem; margin-top: 0.8rem; font-size: 0.78rem; color: var(--text-secondary); }

@media (max-width: 640px) {
  .blog-hero { padding: 2rem 1rem 1rem; }
  .blog-hero h1 { font-size: 1.7rem; }
  .blog-grid { padding: 1rem 1rem 3rem; }
  .blog-card { padding: 1.2rem; }
  .blog-card h2 { font-size: 1.1rem; }
}

/* ── SEO-only block (hidden visually, indexed by crawlers) ──
   Same rules as in main.css; duplicated here because the blog
   template uses blog.css and not main.css. CSP blocks inline
   <style> so we cannot inject the rule from the render function. */
.seo-only {
  position: absolute !important;
  left: -99999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  clip-path: inset(50%) !important;
  white-space: normal !important;
}

/* ── Visible category nav inside .blog-hero region ── */
.blog-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.2rem 0 1.8rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
}
.blog-categories .blog-cat {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: all 0.15s ease;
}
.blog-categories .blog-cat:hover {
  background: rgba(255,255,255,0.07);
  color: #fff;
  border-color: rgba(255,255,255,0.15);
}
.blog-categories .blog-cat.active {
  background: rgba(200,245,66,0.12);
  border-color: rgba(200,245,66,0.25);
  color: #c8f542;
}
.blog-categories .blog-cat span {
  opacity: 0.55;
  margin-left: 0.25rem;
}

/* ── Pagination at the bottom of the visible grid ── */
.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 2.5rem 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
}
.blog-pagination .page-link {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: all 0.15s ease;
}
.blog-pagination .page-link:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.15);
}
.blog-pagination .page-link.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.blog-pagination .page-info {
  color: rgba(255,255,255,0.5);
}

/* ── SEO footer (visible footer with all tool links, rendered by api/_components.js#buildFooter) ──
   Same rules as in main.css; duplicated here because the blog template uses blog.css. */
.site-footer-seo {
  background: #0c0c0e;
  color: #cfcfd1;
  padding: 48px 24px;
  font-size: 14px;
  line-height: 1.6;
  border-top: 1px solid #1a1a1c;
  margin-top: 3rem;
}
.site-footer-seo .footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
}
.site-footer-seo h3 {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin: 0 0 12px;
  opacity: .8;
}
.site-footer-seo ul { list-style: none; padding: 0; margin: 0; }
.site-footer-seo li { margin: 4px 0; }
.site-footer-seo a { color: #cfcfd1; text-decoration: none; }
.site-footer-seo a:hover { color: #fff; text-decoration: underline; }
.site-footer-seo .footer-meta {
  max-width: 1200px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid #1a1a1c;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  opacity: .7;
}
.site-footer-seo .footer-meta a { color: #cfcfd1; }

/* ── Related sections at the bottom of articles, comparisons, use-cases ── */
.related-links {
  max-width: 780px;
  margin: 2.5rem auto;
  padding: 1.5rem 2rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
}
.related-links h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--accent);
  letter-spacing: 0.01em;
  text-transform: none;
  border-bottom: none;
  padding-bottom: 0;
}
.related-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}
.related-links li {
  margin: 0;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  transition: all 0.15s ease;
  /* No padding here — moved to the <a> so the whole card is the click target */
}
.related-links li:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(200,245,66,0.15);
}
.related-links li a {
  display: block;            /* whole card is one click target */
  padding: 0.8rem 1rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.related-links li a strong {
  display: block;
  margin-bottom: 0.25rem;
}
.related-links li a p {
  margin: 0.25rem 0 0;
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  line-height: 1.5;
  font-weight: 400;
}

/* ── Body-level layout containers (when injected directly into <body>) ── */
body > .blog-categories,
body > .blog-pagination {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 2rem;
}
body > .blog-categories {
  margin-top: 0;
  margin-bottom: 1.5rem;
}
