/*
Theme Name: Bloxtra
Theme URI: https://www.bloxtra.com/
Author: Bloxtra Editorial
Author URI: https://www.bloxtra.com/
Description: A single-page editorial landing theme for Bloxtra — the unique hub for AI Tools, AI Models, and Roblox Enhancements. Inspired by orevateai.com layout: dark sticky header with mega-menu category navigation, hero with formula band, long-form tutorial article with sticky sidebar (TOC, AI Tools Directory, Key Formulas), 14-emoji topics grid, contact section, and emoji-led 4-column footer. Built for Google E-E-A-T compliance and AdSense readiness — fast, mobile-first, and self-contained CSS with no external framework dependencies.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bloxtra
Tags: blog, editorial, one-column, two-columns, custom-menu, custom-logo, featured-images, sticky-post, threaded-comments, translation-ready
*/

/* ============= RESET ============= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
html, body { width: 100%; overflow-x: hidden; max-width: 100vw; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
* { -webkit-font-smoothing: antialiased; }

body {
  background: #ffffff;
  color: #1a2238;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
}

.serif { font-family: 'Playfair Display', Georgia, serif; letter-spacing: -0.015em; }
.mono  { font-family: 'JetBrains Mono', monospace; }
.italic-accent { font-style: italic; color: #2563eb; }

.kicker {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: #2563eb;
  background: #eff5ff;
  border: 1px solid #d6e3ff;
  padding: 0.45rem 0.85rem;
  border-radius: 0.5rem;
}
.kicker::before { content: "// "; }

/* ============= HEADER (sticky, dark, with mega-menu) ============= */
.bx-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #0b1220;
  color: #ffffff;
  border-bottom: 1px solid #1f2940;
  width: 100%;
}
.bx-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.bx-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  text-decoration: none;
  color: #ffffff;
}
.bx-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: 1.25rem;
  color: #ffffff;
  flex-shrink: 0;
}
.bx-logo-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.015em;
  color: #ffffff;
  white-space: nowrap;
}

/* Desktop mega-menu */
.bx-mega-nav {
  display: none;
  align-items: center;
  flex: 1;
  justify-content: center;
  gap: 0;
  font-size: 0.85rem;
}
.bx-mega-item {
  position: relative;
}
.bx-mega-item > a, .bx-mega-item > span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.6rem 0.7rem;
  color: #ffffff !important;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.bx-mega-item > a:hover, .bx-mega-item:hover > a, .bx-mega-item:hover > span { color: #93c5fd !important; background: #111a2e; }
.bx-mega-item > a::after, .bx-mega-item > span::after {
  content: '▾';
  font-size: 0.65rem;
  margin-left: 0.2rem;
  opacity: 0.7;
}
.bx-mega-item.no-arrow > a::after, .bx-mega-item.no-arrow > span::after { display: none; }

.bx-mega-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #0b1220;
  border: 1px solid #1f2940;
  border-radius: 8px;
  min-width: 220px;
  padding: 0.5rem 0;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.18s ease;
  z-index: 110;
}
.bx-mega-item:hover .bx-mega-dropdown,
.bx-mega-item:focus-within .bx-mega-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.bx-mega-dropdown a {
  display: block;
  padding: 0.55rem 1rem;
  color: #d1d5db !important;
  font-size: 0.85rem;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.bx-mega-dropdown a:hover { background: #111a2e; color: #93c5fd !important; }
.bx-mega-dropdown a.all-link {
  font-weight: 600;
  color: #93c5fd !important;
  border-bottom: 1px solid #1f2940;
  margin-bottom: 0.35rem;
  padding-bottom: 0.6rem;
}

.bx-cta {
  background: #2563eb !important;
  color: #ffffff !important;
  padding: 0.5rem 1.1rem !important;
  border-radius: 9999px !important;
  font-weight: 600;
  white-space: nowrap;
  font-size: 0.85rem;
  text-decoration: none;
  display: inline-flex !important;
  align-items: center;
  flex-shrink: 0;
  line-height: 1.4 !important;
  transition: background 0.15s;
}
.bx-cta:hover { background: #1d4ed8 !important; }

/* Mobile hamburger */
.bx-toggle { position: absolute; left: -9999px; opacity: 0; }
.bx-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-right: -0.5rem;
  cursor: pointer;
  user-select: none;
  color: #ffffff;
  background: transparent;
  border: 0;
  border-radius: 8px;
}
.bx-burger:hover { background: rgba(255,255,255,0.06); }

.bx-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 90;
  cursor: pointer;
}
.bx-toggle:checked ~ .bx-overlay { opacity: 1; pointer-events: auto; }

.bx-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 88%;
  max-width: 380px;
  background: #0b1220;
  color: #ffffff;
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  box-shadow: -10px 0 40px rgba(0,0,0,0.4);
}
.bx-toggle:checked ~ .bx-drawer { transform: translateX(0); }
.bx-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  height: 60px;
  border-bottom: 1px solid #1f2940;
}
.bx-drawer-nav { padding: 0; }
.bx-drawer-section {
  border-bottom: 1px solid #1f2940;
}
.bx-drawer-section > a, .bx-drawer-section > details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  color: #ffffff !important;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  text-decoration: none;
}
.bx-drawer-section > details > summary::-webkit-details-marker { display: none; }
.bx-drawer-section > details > summary::after { content: '▾'; color: #8893ab; font-size: 0.75rem; }
.bx-drawer-section > details[open] > summary::after { transform: rotate(180deg); }
.bx-drawer-sublist { padding: 0 0 0.5rem 0; background: #111a2e; }
.bx-drawer-sublist a {
  display: block;
  padding: 0.6rem 1.25rem 0.6rem 2.25rem;
  color: #d1d5db !important;
  font-size: 0.9rem;
  text-decoration: none;
}
.bx-drawer-sublist a:hover { background: #1a2238; color: #93c5fd !important; }
.bx-drawer-cta-wrap { padding: 1.5rem 1.25rem 2rem; }
.bx-drawer-cta {
  display: block;
  background: #2563eb !important;
  color: #ffffff !important;
  font-weight: 600;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
}
.bx-drawer-cta:hover { background: #1d4ed8 !important; }

@media (min-width: 1100px) {
  .bx-mega-nav { display: flex; }
  .bx-burger { display: none; }
  .bx-drawer, .bx-overlay { display: none; }
  .bx-header-inner { height: 64px; padding: 0 1.5rem; }
  .bx-logo-mark { width: 40px; height: 40px; font-size: 1.4rem; }
  .bx-logo-text { font-size: 1.4rem; }
}

/* ============= CONTAINERS ============= */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

.container-narrow {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 1024px) { .container-narrow { padding: 0 2rem; } }

/* ============= HERO ============= */
.hero {
  background: #ffffff;
  padding: 2.5rem 0 3rem;
}
@media (min-width: 1024px) { .hero { padding: 4rem 0 5rem; } }
.hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  margin-top: 1.5rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-size: clamp(2.1rem, 7vw, 4.5rem);
  color: #1a2238;
}
.hero .subtitle {
  font-size: 1.125rem;
  color: #5a6480;
  margin-top: 1.5rem;
  line-height: 1.55;
  max-width: 48rem;
}
.hero-buttons {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 28rem;
}
@media (min-width: 640px) { .hero-buttons { flex-direction: row; max-width: none; } }
.btn-primary, .btn-outline {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  padding: 0.85rem 1.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: #2563eb; color: #ffffff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-outline { background: #ffffff; border: 1px solid #e3e8ef; color: #1a2238; }
.btn-outline:hover { border-color: #2563eb; color: #2563eb; }

.stat-row {
  border-top: 1px solid #e3e8ef;
  margin-top: 3rem;
  padding-top: 2rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 2rem;
}
@media (min-width: 640px) { .stat-row { grid-template-columns: repeat(4, 1fr); } }
.stat-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: #1a2238;
}
.stat-label { font-size: 0.875rem; color: #5a6480; margin-top: 0.25rem; }

/* ============= DARK FORMULA BAND ============= */
.formula-band {
  background: #0b1220;
  color: #ffffff;
  padding: 3rem 0;
  border-top: 1px solid #1f2940;
  border-bottom: 1px solid #1f2940;
}
.formula-band .grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 1024px) { .formula-band .grid-2 { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.formula-band .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: #60a5fa;
  margin-bottom: 1rem;
}
.formula-band .formulas {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.92rem;
  color: #e8edf7;
  line-height: 2;
}
.formula-band .formulas .c { color: #60a5fa; }
.formula-band .formulas .y { color: #fbbf24; }
.formula-band .lead {
  font-size: 1.05rem;
  color: #d1d5db;
  line-height: 1.7;
}

/* Marquee */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-wrap {
  background: #0b1220;
  color: #ffffff;
  padding: 1rem 0;
  border-top: 1px solid #1f2940;
  overflow: hidden;
}
.marquee-track {
  display: flex;
  gap: 2rem;
  animation: marquee 60s linear infinite;
  width: max-content;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: #93c5fd;
  white-space: nowrap;
}

/* ============= ARTICLE WITH SIDEBAR ============= */
.article-section {
  background: #ffffff;
  padding: 3rem 0 4rem;
}
@media (min-width: 1024px) { .article-section { padding: 5rem 0 6rem; } }

.article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 1100px) {
  .article-grid {
    grid-template-columns: 1fr 320px;
    gap: 3rem;
  }
}

article.bx-article { min-width: 0; }

/* Author meta strip */
.author-strip {
  background: #f4f7fc;
  border: 1px solid #e3e8ef;
  border-radius: 0.85rem;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}
.avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #ffffff;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.author-strip .name { font-weight: 700; color: #1a2238; font-size: 0.95rem; }
.author-strip .meta { font-size: 0.78rem; color: #5a6480; margin-top: 0.15rem; }

/* Article body */
.bx-article h1.title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #1a2238;
  margin-bottom: 1.5rem;
}
.bx-article > p.lead {
  font-size: 1.15rem;
  color: #5a6480;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.toc-box {
  background: #f4f7fc;
  border: 1px solid #e3e8ef;
  border-radius: 0.85rem;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.toc-box .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: #5a6480;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.toc-box ul { columns: 1; }
@media (min-width: 640px) { .toc-box ul { columns: 2; column-gap: 1.5rem; } }
.toc-box li { margin: 0.25rem 0; break-inside: avoid; }
.toc-box a {
  color: #2563eb;
  font-size: 0.9rem;
  text-decoration: none;
}
.toc-box a:hover { text-decoration: underline; }

.bx-article h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: #1a2238;
  margin: 3rem 0 1rem;
}
.bx-article h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a2238;
  margin: 1.75rem 0 0.6rem;
}
.bx-article p {
  font-size: 1.05rem;
  color: #1a2238;
  line-height: 1.75;
  margin: 1rem 0;
}
.bx-article ul, .bx-article ol {
  margin: 1rem 0 1.5rem 1.4rem;
  font-size: 1.05rem;
  color: #1a2238;
  line-height: 1.75;
}
.bx-article ul { list-style: disc; }
.bx-article ol { list-style: decimal; }
.bx-article li { margin: 0.4rem 0; }
.bx-article a { color: #2563eb; text-decoration: underline; text-underline-offset: 2px; }
.bx-article a:hover { color: #1d4ed8; }
.bx-article strong { color: #0b1220; font-weight: 700; }
.bx-article em { color: #1a2238; }

.callout {
  background: #eff5ff;
  border: 1px solid #d6e3ff;
  border-radius: 0.85rem;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}
.callout .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 0.5rem;
}
.callout p { margin: 0; font-size: 1rem; }

.callout-yellow {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: 0.85rem;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}
.callout-yellow .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: #b45309;
  margin-bottom: 0.5rem;
}
.callout-yellow p { margin: 0; font-size: 1rem; }

.formula-block {
  background: #0b1220;
  color: #e8edf7;
  border-radius: 0.7rem;
  padding: 1.25rem 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.92rem;
  line-height: 1.85;
  margin: 1.5rem 0;
  overflow-x: auto;
}
.formula-block .c { color: #60a5fa; }
.formula-block .y { color: #fbbf24; }

.pullquote {
  background: #f4f7fc;
  border-left: 4px solid #2563eb;
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.55;
  color: #1a2238;
}

/* Algorithm grid */
.algo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 1.75rem 0;
}
@media (min-width: 640px) { .algo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .algo-grid { grid-template-columns: repeat(3, 1fr); } }
.algo-card {
  background: #f4f7fc;
  border: 1px solid #e3e8ef;
  border-radius: 0.7rem;
  padding: 1.1rem 1.25rem;
}
.algo-card .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: #5a6480;
  margin-bottom: 0.45rem;
}
.algo-card .eq {
  font-family: 'JetBrains Mono', monospace;
  color: #2563eb;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}
.algo-card p { font-size: 0.85rem; color: #5a6480; margin: 0; }

/* Action table (transformer-style) */
.action-table {
  border: 1px solid #e3e8ef;
  border-radius: 0.85rem;
  overflow: hidden;
  margin: 1.75rem 0;
}
.action-table .head {
  background: #f4f7fc;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e3e8ef;
}
.action-table .head .title { font-weight: 700; color: #1a2238; }
.action-table .head .sub { font-size: 0.78rem; color: #5a6480; margin-top: 0.15rem; }
.action-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e3e8ef;
  align-items: start;
}
.action-row:last-child { border-bottom: 0; }
.action-row .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #5a6480;
  padding-top: 0.15rem;
}
.action-row .body { font-size: 0.92rem; color: #1a2238; line-height: 1.6; }
.action-row .body .b { color: #2563eb; font-weight: 600; }

/* Step list */
.steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 2rem 0;
}
.step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.step-num {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  flex-shrink: 0;
}
.step .body { padding-top: 0.25rem; }
.step strong { font-size: 1.05rem; color: #1a2238; }
.step p { color: #5a6480; font-size: 0.92rem; margin-top: 0.25rem; }

/* Link pills */
.linkpills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}
.linkpill {
  display: inline-flex;
  align-items: center;
  background: #eff5ff;
  border: 1px solid #d6e3ff;
  color: #2563eb !important;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: 0.5rem;
  text-decoration: none !important;
  transition: background 0.15s;
}
.linkpill:hover { background: #dde9ff; }
.linkpill::before { content: "→ "; margin-right: 0.4rem; }

/* FAQ */
details.faq {
  background: #f4f7fc;
  border: 1px solid #e3e8ef;
  border-radius: 0.65rem;
  margin-bottom: 0.6rem;
}
details.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: #1a2238;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "▼";
  color: #2563eb;
  font-size: 0.7rem;
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 1rem;
}
details.faq[open] summary::after { transform: rotate(180deg); }
details.faq[open] summary { border-bottom: 1px solid #e3e8ef; }
details.faq p {
  padding: 1rem 1.25rem;
  color: #5a6480;
  line-height: 1.65;
  font-size: 0.92rem;
  margin: 0;
}

/* References */
.refs {
  border-top: 1px solid #e3e8ef;
  padding-top: 1rem;
  margin-top: 2rem;
}
.refs h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.refs ul { font-size: 0.9rem; color: #5a6480; line-height: 1.8; margin-left: 0; list-style: none; }
.refs li { margin: 0.5rem 0; padding-left: 0; }

/* Author block */
.author-block {
  background: #f4f7fc;
  border: 1px solid #e3e8ef;
  border-radius: 0.85rem;
  padding: 1.5rem;
  margin-top: 2rem;
}
.author-block .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5a6480;
  margin-bottom: 0.85rem;
}
.author-block .row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.author-block .name { font-weight: 700; color: #1a2238; }
.author-block .meta { font-size: 0.85rem; color: #5a6480; margin-top: 0.15rem; }
.author-block p { font-size: 0.92rem; color: #5a6480; line-height: 1.6; margin-top: 0.5rem; }
.author-block .reviewer { font-size: 0.78rem; color: #5a6480; margin-top: 0.85rem; }

/* ============= SIDEBAR ============= */
.bx-sidebar { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 1100px) {
  .bx-sidebar {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding-right: 0.5rem;
  }
}
.widget {
  background: #f4f7fc;
  border: 1px solid #e3e8ef;
  border-radius: 0.85rem;
  padding: 1.25rem;
}
.widget h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #5a6480;
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #e3e8ef;
}
.widget ul { list-style: none; }
.widget li { margin: 0.5rem 0; }
.widget a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  color: #1a2238;
  text-decoration: none;
  padding: 0.35rem 0;
}
.widget a:hover { color: #2563eb; }
.widget .count { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: #8893ab; }

.widget-dark {
  background: #0b1220;
  color: #e8edf7;
  border: 0;
}
.widget-dark h3 { color: #60a5fa; border-bottom-color: #1f2940; }
.widget-dark a { color: #d1d5db; }
.widget-dark a:hover { color: #93c5fd; }
.widget-dark .group-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: #93c5fd;
  margin-top: 0.85rem;
  padding-top: 0.5rem;
}
.widget-dark .group-title:first-child { margin-top: 0; padding-top: 0; }
.tool-tag-free {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.45rem;
  background: rgba(16,185,129,0.18);
  color: #10b981;
  border-radius: 0.25rem;
}
.tool-tag-paid {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.45rem;
  background: rgba(245,158,11,0.18);
  color: #f59e0b;
  border-radius: 0.25rem;
}

.formula-widget li { margin: 0.5rem 0; }
.formula-widget .name { font-weight: 600; color: #1a2238; font-size: 0.85rem; }
.formula-widget .eq { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: #5a6480; margin-top: 0.15rem; }

/* ============= TOPICS GRID ============= */
.topics-section { background: #f8f9fb; padding: 3rem 0; }
@media (min-width: 1024px) { .topics-section { padding: 5rem 0; } }
.topics-section h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: clamp(1.85rem, 4vw, 3rem);
  line-height: 1.1;
  margin-top: 1.25rem;
}
.topics-section .lead { font-size: 1.05rem; color: #5a6480; margin-top: 0.75rem; max-width: 42rem; }

.topics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
}
@media (min-width: 640px) { .topics-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .topics-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .topics-grid { grid-template-columns: repeat(4, 1fr); } }

.topic-card {
  background: #ffffff;
  border: 1px solid #e3e8ef;
  border-radius: 0.85rem;
  padding: 1.5rem;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none !important;
  color: inherit !important;
}
.topic-card:hover {
  border-color: #2563eb;
  box-shadow: 0 8px 24px -8px rgba(37,99,235,0.18);
  transform: translateY(-2px);
}
.topic-card .emoji { font-size: 2rem; margin-bottom: 0.5rem; }
.topic-card .title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: #1a2238;
}
.topic-card .desc {
  font-size: 0.85rem;
  color: #5a6480;
  margin-top: 0.4rem;
  line-height: 1.5;
}
.topic-card .articles {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-style: italic;
  color: #5a6480;
  margin-top: auto;
  padding-top: 0.85rem;
}

/* ============= CONTACT ============= */
.contact-section { background: #eef2f8; padding: 3rem 0; }
@media (min-width: 1024px) { .contact-section { padding: 5rem 0; } }
.contact-section h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: clamp(1.85rem, 4vw, 3rem);
  line-height: 1.1;
  margin-top: 1.25rem;
}
.contact-section .lead { font-size: 1.05rem; color: #5a6480; margin-top: 1rem; max-width: 42rem; line-height: 1.6; }
.response-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #ffffff;
  border: 1px solid rgba(16,185,129,0.35);
  color: #10b981;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  margin-top: 1.25rem;
}
.contact-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
}
@media (min-width: 768px) { .contact-cards { grid-template-columns: repeat(3, 1fr); } }
.contact-card {
  background: #ffffff;
  border: 1px solid #e3e8ef;
  border-radius: 0.85rem;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.contact-icon {
  width: 3rem;
  height: 3rem;
  background: #eff5ff;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}
.contact-card .label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #5a6480;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.contact-card .value {
  color: #2563eb;
  font-weight: 700;
  display: block;
  margin-top: 0.15rem;
  font-size: 0.95rem;
  word-break: break-word;
}
.contact-card .meta { font-size: 0.78rem; color: #5a6480; margin-top: 0.2rem; }

.contact-form-card {
  margin-top: 2.5rem;
  background: #ffffff;
  border: 1px solid #e3e8ef;
  border-radius: 0.85rem;
  overflow: hidden;
}
.contact-form-card .head {
  background: #2563eb;
  color: #ffffff;
  padding: 1.5rem 1.75rem;
}
.contact-form-card .head h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.5rem;
}
.contact-form-card .head p { font-size: 0.85rem; color: #dbeafe; margin-top: 0.25rem; }
.contact-form-card form {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .contact-form-card form { grid-template-columns: 1fr 1fr; padding: 2rem; }
  .contact-form-card .full { grid-column: 1 / -1; }
}
.contact-form-card label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a2238;
  margin-bottom: 0.5rem;
}
.contact-form-card label .req { color: #ef4444; }
.contact-form-card input,
.contact-form-card textarea,
.contact-form-card select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #e3e8ef;
  border-radius: 0.5rem;
  font: inherit;
  font-size: 0.95rem;
  color: #1a2238;
  background: #ffffff;
}
.contact-form-card input:focus,
.contact-form-card textarea:focus,
.contact-form-card select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.contact-form-card .submit-btn {
  background: #2563eb;
  color: #ffffff;
  border: 0;
  font-weight: 600;
  padding: 0.95rem 1.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  width: 100%;
  font-size: 1rem;
}
.contact-form-card .submit-btn:hover { background: #1d4ed8; }
.contact-form-card .privacy-note { font-size: 0.78rem; color: #5a6480; text-align: center; margin-top: 0.85rem; }

/* ============= FOOTER ============= */
.bx-footer { background: #0b1220; color: #d1d5db; margin-top: 0; }
.bx-footer .top {
  background: rgba(17,26,46,0.4);
  border-top: 1px solid #1f2940;
  padding: 3rem 0;
}
.bx-footer .top-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (min-width: 1024px) {
  .bx-footer .top-grid { padding: 0 2rem; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
}
.bx-footer h4 {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.bx-footer ul { display: flex; flex-direction: column; gap: 0.7rem; list-style: none; }
.bx-footer ul a { color: #d1d5db; font-size: 0.875rem; text-decoration: none; transition: color 0.15s; }
.bx-footer ul a:hover { color: #93c5fd; }
.bx-footer .bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 1rem;
}
@media (min-width: 1024px) {
  .bx-footer .bottom {
    padding: 2.5rem 2rem;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2.5rem;
  }
}
.bx-footer .wordmark {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  font-size: 1.85rem;
  color: #ffffff;
}
.bx-footer .tag { font-size: 0.875rem; color: #8893ab; margin-top: 0.5rem; }
.bx-footer .mini-nav {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.875rem;
}
.bx-footer .mini-nav a { color: #d1d5db; text-decoration: none; }
.bx-footer .mini-nav a:hover { color: #93c5fd; }
.bx-footer .contact-block {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  font-size: 0.875rem;
}
@media (min-width: 1024px) { .bx-footer .contact-block { margin-top: 0; } }
.bx-footer .contact-block .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #8893ab;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.bx-footer .contact-block a { color: #93c5fd; text-decoration: none; }
.bx-footer .contact-block a:hover { text-decoration: underline; }

/* ============= ARTICLE PAGES (single posts/pages) ============= */
.crumb {
  padding: 1rem 0 0;
  font-size: 0.85rem;
  color: #5a6480;
  font-family: 'JetBrains Mono', monospace;
}
.crumb a { color: #2563eb; }
.crumb a:hover { text-decoration: underline; }

.article-hero {
  padding: 2.5rem 0 1.5rem;
}
@media (min-width: 1024px) { .article-hero { padding: 4rem 0 2rem; } }
.article-hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  color: #1a2238;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 6vw, 3.5rem);
  margin-top: 1rem;
}
.article-hero .subtitle {
  font-size: 1.15rem;
  color: #5a6480;
  margin-top: 1.25rem;
  line-height: 1.55;
  max-width: 48rem;
}
.article-hero .author-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
  font-size: 0.875rem;
  color: #5a6480;
}

.article-body {
  padding: 2rem 0 4rem;
  max-width: 48rem;
  margin: 0 auto;
  font-size: 1.05rem;
  color: #1a2238;
  line-height: 1.75;
}
.article-body p { margin: 1.15rem 0; }
.article-body h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a2238;
  margin: 2.25rem 0 0.85rem;
  letter-spacing: -0.015em;
}
.article-body h3 { font-size: 1.25rem; font-weight: 700; color: #1a2238; margin: 1.75rem 0 0.6rem; }
.article-body ul { margin: 0.85rem 0 1.25rem 1.4rem; list-style: disc; }
.article-body ol { margin: 0.85rem 0 1.25rem 1.4rem; list-style: decimal; }
.article-body li { margin: 0.4rem 0; }
.article-body a { color: #2563eb; text-decoration: underline; }
.article-body strong { color: #0b1220; font-weight: 700; }
.article-body blockquote {
  border-left: 4px solid #2563eb;
  padding: 0.85rem 1.25rem;
  margin: 1.5rem 0;
  background: #f4f7fc;
  border-radius: 0 0.5rem 0.5rem 0;
  color: #1a2238;
  font-style: italic;
}
.article-body code {
  background: #f4f7fc;
  border: 1px solid #e3e8ef;
  padding: 0.1rem 0.4rem;
  border-radius: 0.3rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88em;
  color: #2563eb;
}
.article-body pre {
  background: #0b1220;
  color: #e8edf7;
  padding: 1.25rem;
  border-radius: 0.6rem;
  overflow-x: auto;
  margin: 1.25rem 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
}
.article-body hr { border: 0; border-top: 1px solid #e3e8ef; margin: 2.5rem 0; }

.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 2rem 0;
}
@media (min-width: 640px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards-grid { grid-template-columns: repeat(3, 1fr); } }
.article-card {
  background: #ffffff;
  border: 1px solid #e3e8ef;
  border-radius: 0.85rem;
  padding: 1.5rem;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.article-card:hover {
  border-color: #2563eb;
  box-shadow: 0 8px 24px -8px rgba(37,99,235,0.18);
  transform: translateY(-2px);
}
.article-card .cat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: #2563eb;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.article-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a2238;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
.article-card p {
  font-size: 0.875rem;
  color: #5a6480;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}
.article-card .meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #8893ab;
  margin-top: auto;
}

/* ============= WORDPRESS REQUIRED ============= */
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: #5a6480; text-align: center; margin-top: 0.5rem; }
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}
.sticky { display: block; }
.bypostauthor { display: block; }

/* Custom logo size cap (in case user uploads big PNG) */
.custom-logo, .custom-logo-link img, img.custom-logo {
  max-height: 40px !important;
  width: auto !important;
  max-width: 200px !important;
  display: inline-block !important;
}
body > .custom-logo-link, .entry-content .custom-logo {
  display: none !important;
}

/* Pagination */
.nav-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 3rem 0;
  flex-wrap: wrap;
}
.nav-links a, .nav-links span {
  padding: 0.6rem 1rem;
  border: 1px solid #e3e8ef;
  border-radius: 6px;
  color: #1a2238;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}
.nav-links a:hover { border-color: #2563eb; color: #2563eb; }
.nav-links .current {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

/* Comments */
.comments-area {
  max-width: 48rem;
  margin: 3rem auto 0;
  padding: 2rem 0;
  border-top: 1px solid #e3e8ef;
}
.comments-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.comment-list { list-style: none; }
.comment-body {
  background: #f8f9fb;
  border: 1px solid #e3e8ef;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.comment-author { font-weight: 700; color: #1a2238; font-size: 0.95rem; }
.comment-metadata { font-size: 0.75rem; color: #8893ab; margin-top: 0.25rem; }
.comment-content { margin-top: 0.75rem; color: #1a2238; }
.comment-form input, .comment-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e3e8ef;
  border-radius: 0.5rem;
  margin-top: 0.4rem;
  font: inherit;
}
.comment-form label { font-size: 0.85rem; font-weight: 600; color: #1a2238; }
.comment-form p { margin-bottom: 1rem; }
.form-submit input[type="submit"] {
  background: #2563eb;
  color: #ffffff;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border: 0;
  border-radius: 0.5rem;
  cursor: pointer;
}

/* Search form */
.search-form { display: flex; gap: 0.5rem; max-width: 24rem; }
.search-form input[type="search"] {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 1px solid #e3e8ef;
  border-radius: 0.5rem;
  font: inherit;
}
.search-form input[type="submit"] {
  background: #2563eb;
  color: #ffffff;
  border: 0;
  padding: 0.6rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
}

::selection { background: #2563eb; color: #ffffff; }

/* Mobile fixes */
@media (max-width: 639px) {
  .hero { padding: 2rem 0 2.5rem; }
  .article-section { padding: 2rem 0 3rem; }
  .topics-section, .contact-section { padding: 2.5rem 0; }
  .stat-num { font-size: 2rem; }
  .topic-card, .article-card { padding: 1.25rem; }
  .formula-band { padding: 2rem 0; }
}
