*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0c10;
  --surface: #111420;
  --surface2: #181d2e;
  --border: #1e2538;
  --accent: #22d98a;
  --accent2: #4f7fff;
  --text: #e8eaf2;
  --muted: #9ba3c0;
  --faint: #4a5070;
  --red: #ff5e72;
  --amber: #ffb23e;
  --font-head: 'Manrope', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); line-height: 1.6; overflow-x: hidden; }

/* ── NAV (mirrors index.html) ── */
body > nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; height: 68px;
  background: rgba(10,12,16,0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo { font-family: var(--font-head); font-size: 18px; font-weight: 800; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.nav-logo .dot { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 14px; color: var(--muted); text-decoration: none; transition: color .2s; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-links a.current { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.btn-ghost { padding: 8px 20px; border-radius: 8px; border: 1px solid var(--border); color: var(--muted); font-size: 13px; text-decoration: none; transition: all .2s; font-family: var(--font-body); font-weight: 500; }
.btn-ghost:hover { border-color: var(--accent2); color: var(--text); }
.btn-green { padding: 10px 22px; border-radius: 8px; background: var(--accent); color: #0a0c10; font-size: 13px; font-weight: 700; text-decoration: none; transition: all .2s; font-family: var(--font-body); white-space: nowrap; }
.btn-green:hover { background: #1bc97a; transform: translateY(-1px); }

/* ── HERO ── */
.edu-hero {
  padding: 140px 40px 60px;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(34,217,138,0.07) 0%, transparent 60%),
              radial-gradient(ellipse 60% 40% at 80% 80%, rgba(79,127,255,0.06) 0%, transparent 50%),
              var(--bg);
  text-align: center; position: relative; overflow: hidden;
}
.edu-hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h60v60H0z' fill='none'/%3E%3Ccircle cx='30' cy='30' r='0.5' fill='%231e2538'/%3E%3C/svg%3E");
  opacity: 0.5; pointer-events: none;
}
.edu-hero-inner { max-width: 800px; margin: 0 auto; position: relative; }
.edu-hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 100px;
  border: 1px solid rgba(34,217,138,0.3); background: rgba(34,217,138,0.06);
  font-size: 12px; font-family: var(--font-mono); color: var(--accent);
  margin-bottom: 28px;
}
.edu-hero h1 {
  font-family: var(--font-head); font-size: clamp(34px, 5vw, 58px);
  font-weight: 800; line-height: 1.1; letter-spacing: -1.5px;
  margin-bottom: 22px;
  background: linear-gradient(160deg, #fff 40%, #b0b8d8 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.edu-hero h1 em { font-style: normal; -webkit-text-fill-color: var(--accent); }
.edu-hero p { font-size: 17px; color: var(--muted); max-width: 600px; margin: 0 auto; line-height: 1.7; }

/* ── SEARCH ── */
.search-bar {
  max-width: 600px; margin: 32px auto 0; position: relative;
}
.search-input {
  width: 100%; padding: 14px 20px 14px 48px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-family: var(--font-body);
  font-size: 15px; outline: none; transition: border-color .2s;
}
.search-input::placeholder { color: var(--faint); }
.search-input:focus { border-color: var(--accent2); }
.search-icon {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  font-size: 16px; color: var(--faint); pointer-events: none;
}

/* ── SECTIONS ── */
.edu-content {
  max-width: 1200px; margin: 0 auto; padding: 60px 40px 80px;
}
.section-block { margin-bottom: 80px; }
.section-block:last-child { margin-bottom: 0; }
.section-header {
  display: flex; align-items: baseline; gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.section-number {
  font-family: var(--font-mono); font-size: 12px; color: var(--accent);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.section-title {
  font-family: var(--font-head); font-size: 28px; font-weight: 700;
  letter-spacing: -0.5px; color: var(--text);
}
.section-desc {
  font-size: 14px; color: var(--muted); margin-left: auto; max-width: 380px;
  font-family: var(--font-body);
}

/* ── VIDEO GRID ── */
.video-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.video-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  transition: all .2s; cursor: pointer;
  display: flex; flex-direction: column;
}
.video-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.video-card.coming-soon { opacity: 0.55; cursor: default; }
.video-card.coming-soon:hover { border-color: var(--border); transform: none; box-shadow: none; }
.video-thumb {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--surface2) 0%, var(--surface) 100%);
  position: relative;
}
.video-thumb-placeholder::after {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h40v40H0z' fill='none'/%3E%3Ccircle cx='20' cy='20' r='0.5' fill='%231e2538'/%3E%3C/svg%3E");
  opacity: 0.4;
}
.play-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(34,217,138,0.95); color: #0a0c10;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; padding-left: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: all .2s; position: relative; z-index: 1;
}
.video-card:hover .play-icon { transform: scale(1.08); }
.video-card.coming-soon .play-icon {
  background: var(--surface); color: var(--faint);
  border: 1px solid var(--border);
}
.video-duration {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(10,12,16,0.85); color: var(--text);
  padding: 3px 8px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 10px;
  z-index: 2;
}
.video-info { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.video-title {
  font-family: var(--font-head); font-size: 15px; font-weight: 700;
  color: var(--text); margin-bottom: 6px; line-height: 1.35;
}
.video-desc {
  font-size: 13px; color: var(--muted); line-height: 1.55; flex: 1;
}
.coming-soon-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  background: rgba(255,178,62,0.1); color: var(--amber);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em;
  text-transform: uppercase; margin-top: 10px;
  border: 1px solid rgba(255,178,62,0.25);
}

/* ── ARTICLE CARDS (same grid as videos, different visual treatment) ── */
.article-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  transition: all .2s; cursor: pointer;
  display: flex; flex-direction: column;
}
.article-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.article-thumb {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1e2842 0%, #131826 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.article-thumb::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 25% 40%, rgba(79,127,255,0.18) 0%, transparent 55%),
    radial-gradient(circle at 75% 70%, rgba(34,217,138,0.10) 0%, transparent 55%);
}
.article-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(79,127,255,0.95); color: #0a0c10;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: all .2s; position: relative; z-index: 1;
}
.article-card:hover .article-icon { transform: scale(1.08); }
.article-type-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: rgba(79,127,255,0.9); color: #fff;
  padding: 3px 8px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.article-readtime {
  position: absolute; bottom: 8px; right: 8px; z-index: 2;
  background: rgba(10,12,16,0.85); color: var(--text);
  padding: 3px 8px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 10px;
}

/* ── EMPTY STATE for search ── */
.no-results {
  text-align: center; padding: 80px 20px;
  color: var(--muted); font-family: var(--font-mono); font-size: 14px;
}

/* ── MODAL (video player) ── */
.modal-backdrop {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(10,12,16,0.92); backdrop-filter: blur(8px);
  align-items: center; justify-content: center; padding: 40px;
}
.modal-backdrop.open { display: flex; }
.modal-content {
  position: relative; width: 100%; max-width: 1000px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(10,12,16,0.85); color: var(--text);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; transition: all .2s;
  font-family: var(--font-body);
}
.modal-close:hover { background: var(--surface2); border-color: var(--accent); }
.modal-iframe-wrap {
  width: 100%; aspect-ratio: 16/9; background: #000;
}
.modal-iframe-wrap iframe { width: 100%; height: 100%; border: 0; }

/* When showing an article, the iframe-wrap becomes a scrollable content area. */
.modal-content.article-mode { max-height: 88vh; display: flex; flex-direction: column; }
.modal-content.article-mode .modal-iframe-wrap {
  aspect-ratio: auto; background: var(--bg);
  overflow-y: auto; flex: 1; min-height: 0;
}
.modal-content.article-mode .modal-meta { display: none; }
.modal-article-body {
  padding: 36px 44px 40px;
  max-width: 760px; margin: 0 auto;
  color: var(--text);
}
.article-headline {
  font-family: var(--font-head); font-size: 28px; font-weight: 800;
  line-height: 1.2; margin: 0 0 12px;
}
.article-subtitle {
  font-size: 16px; color: var(--muted); line-height: 1.55;
  margin: 0 0 8px;
}
.article-meta-line {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--faint); letter-spacing: 0.05em; text-transform: uppercase;
  margin: 0 0 24px; padding-bottom: 18px; border-bottom: 1px solid var(--border);
}
.article-tldr {
  background: rgba(79, 127, 255, 0.08);
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  margin: 0 0 28px;
  border-radius: 0 6px 6px 0;
}
.article-tldr .tldr-label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 6px;
}
.article-tldr p {
  font-size: 14px; line-height: 1.6; color: var(--text);
  margin: 0;
}

/* Loading + error states for lazy-fetched articles */
.edu-loading,
.edu-error,
.article-loading,
.article-load-error {
  padding: 60px 20px; text-align: center;
  font-family: var(--font-mono); font-size: 13px;
  color: var(--muted);
}
.edu-error,
.article-load-error {
  color: #c44; /* red-ish but not screaming */
}
.article-loading {
  padding: 40px 0; font-style: italic;
}

.article-body-content {
  font-size: 15px; line-height: 1.75; color: var(--text);
}
.article-body-content > *:first-child { margin-top: 0; }
.article-body-content p { margin: 0 0 1em; }
.article-body-content h2 {
  font-family: var(--font-head); font-size: 22px; font-weight: 700;
  margin: 1.8em 0 0.6em; color: var(--text);
}
.article-body-content h3 {
  font-family: var(--font-head); font-size: 17px; font-weight: 700;
  margin: 1.6em 0 0.5em; color: var(--text);
}
.article-body-content h4 {
  font-family: var(--font-head); font-size: 15px; font-weight: 700;
  margin: 1.4em 0 0.4em; color: var(--text);
}
.article-body-content ul, .article-body-content ol { margin: 0 0 1em 1.4em; }
.article-body-content li { margin-bottom: 0.4em; }
.article-body-content strong { color: var(--text); font-weight: 700; }
.article-body-content em { font-style: italic; }
.article-body-content a { color: var(--accent); text-decoration: underline; }
.article-body-content a:hover { color: var(--text); }
.article-body-content code {
  background: var(--surface2); padding: 1px 6px; border-radius: 3px;
  font-family: var(--font-mono); font-size: 13px; color: var(--text);
}
.article-body-content pre {
  background: var(--surface2); padding: 14px 16px; border-radius: 8px;
  overflow-x: auto; margin: 1em 0;
  border: 1px solid var(--border);
}
.article-body-content pre code { background: none; padding: 0; }
.article-body-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.4em 0 0.4em 1em; margin: 1.2em 0;
  color: var(--muted); font-style: italic;
}
.article-body-content img {
  max-width: 100%; border-radius: 8px; margin: 1.2em 0;
  border: 1px solid var(--border);
}
.article-body-content hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.article-body-content table {
  width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 14px;
}
.article-body-content th, .article-body-content td {
  border: 1px solid var(--border); padding: 8px 10px; text-align: left;
}
.article-body-content th { background: var(--surface); font-weight: 700; }
.modal-meta {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
}
.modal-meta h2 {
  font-family: var(--font-head); font-size: 20px; font-weight: 700;
  color: var(--text); margin-bottom: 6px;
}
.modal-meta p { font-size: 14px; color: var(--muted); }

/* ── FOOTER (mirrors index.html) ── */
footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 60px 40px 30px; margin-top: 60px;
}
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand p { font-size: 13px; color: var(--muted); line-height: 1.6; margin-top: 12px; max-width: 320px; }
.footer-col h5 { font-family: var(--font-head); font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 14px; letter-spacing: 0.5px; }
.footer-col a { display: block; color: var(--muted); font-size: 13px; text-decoration: none; padding: 4px 0; transition: color .2s; }

/* ─── Standalone article page additions (v3 SEO) ────────────────────────── */

.article-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 120px 24px 80px;
}

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 32px;
  letter-spacing: 0.02em;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep {
  margin: 0 8px;
  color: var(--faint);
}

.article-section-indicator {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.article-page article > h1 {
  font-family: var(--font-head);
  font-size: 40px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.article-page .article-subtitle {
  font-size: 18px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 20px;
}

.article-page .article-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  margin-bottom: 32px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.article-page .article-meta .dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--faint);
}

.article-page .article-tldr {
  background: rgba(34, 217, 138, 0.06);
  border-left: 3px solid var(--accent);
  padding: 18px 22px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 40px;
}
.article-page .article-tldr .tldr-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.article-page .article-tldr p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}

.article-page .article-body-content {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
}
.article-page .article-body-content > *:first-child { margin-top: 0; }
.article-page .article-body-content p { margin: 0 0 1.2em; }
.article-page .article-body-content h2 {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  margin: 2em 0 0.7em;
  color: var(--text);
  letter-spacing: -0.01em;
}
.article-page .article-body-content h3 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  margin: 1.6em 0 0.5em;
  color: var(--text);
}
.article-page .article-body-content ul,
.article-page .article-body-content ol {
  margin: 0 0 1.2em 1.5em;
  padding: 0;
}
.article-page .article-body-content li { margin-bottom: 0.5em; }
.article-page .article-body-content strong { color: var(--text); font-weight: 600; }
.article-page .article-body-content em { font-style: italic; }
.article-page .article-body-content code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface2);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--accent);
}

/* Related articles section */
.related-articles {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.related-articles h2 {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.related-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  text-decoration: none;
  transition: border-color .2s, transform .15s;
}
.related-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.related-card .related-readtime {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}
.related-card .related-title {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}
.related-card .related-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* CTA panel */
.article-cta {
  margin-top: 56px;
  padding: 32px;
  background: linear-gradient(135deg, rgba(34, 217, 138, 0.08), rgba(79, 127, 255, 0.05));
  border: 1px solid var(--border);
  border-radius: 14px;
  text-align: center;
}
.article-cta h2 {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
}
.article-cta p {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 20px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.article-cta .btn-green {
  display: inline-block;
  padding: 12px 24px;
  background: var(--accent);
  color: #0a0c10;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: transform .15s, box-shadow .2s;
}
.article-cta .btn-green:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(34, 217, 138, 0.25);
}

/* Responsive */
@media (max-width: 680px) {
  .article-page { padding: 100px 16px 56px; }
  .article-page article > h1 { font-size: 30px; }
  .article-page .article-subtitle { font-size: 16px; }
  .article-page .article-body-content { font-size: 15px; }
  .article-cta { padding: 24px 18px; }
}

/* ─── BSP Widget Library (embedded interactive tools) ─────────────────────── */

.bsp-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin: 32px 0;
}
.bsp-widget-header {
  padding: 18px 24px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.bsp-widget-header .bsp-w-label {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent);
}
.bsp-widget-header h2 {
  font-family: var(--font-head);
  font-size: 18px; font-weight: 700;
  margin: 4px 0 0;
  color: var(--text);
}
.bsp-widget-header .bsp-w-icon { font-size: 24px; }
.bsp-widget-body { padding: 24px; }

.bsp-widget .bsp-w-section-title {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent);
  margin: 24px 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.bsp-widget .bsp-w-section-title:first-child { margin-top: 0; }
.bsp-widget .bsp-w-section-title .opt {
  text-transform: none; letter-spacing: 0;
  color: var(--faint); font-size: 11px; margin-left: 8px;
}

.bsp-widget .bsp-w-field-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 16px;
}
.bsp-widget .bsp-w-field-grid.full { grid-template-columns: 1fr; }
.bsp-widget .bsp-w-field-grid.three { grid-template-columns: repeat(3, 1fr); }

.bsp-widget .bsp-w-field {
  display: flex; flex-direction: column; gap: 6px;
}
.bsp-widget .bsp-w-field label {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.05em;
  color: var(--muted); text-transform: uppercase;
}
.bsp-widget .bsp-w-field label .opt {
  text-transform: none; color: var(--faint);
  font-size: 10px; margin-left: 4px;
}
.bsp-widget .bsp-w-field input,
.bsp-widget .bsp-w-field select,
.bsp-widget .bsp-w-field textarea {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px; border-radius: 6px;
  font-family: var(--font-body); font-size: 14px;
  transition: border-color .15s;
}
.bsp-widget .bsp-w-field input:focus,
.bsp-widget .bsp-w-field select:focus,
.bsp-widget .bsp-w-field textarea:focus {
  outline: none; border-color: var(--accent);
}
.bsp-widget .bsp-w-field input[type="number"] { font-family: var(--font-mono); }

.bsp-widget .bsp-w-info {
  margin-top: 16px; padding: 12px 16px;
  background: rgba(79, 127, 255, 0.06);
  border-left: 3px solid var(--accent2);
  border-radius: 0 6px 6px 0;
  font-size: 13px; line-height: 1.5; color: var(--muted);
}
.bsp-widget .bsp-w-info strong { color: var(--text); font-weight: 600; }
.bsp-widget .bsp-w-info code {
  font-family: var(--font-mono); font-size: 12px;
  background: var(--surface2); padding: 1px 5px; border-radius: 3px;
  color: var(--accent);
}

.bsp-widget .bsp-w-actions {
  margin-top: 20px; display: flex; gap: 12px; align-items: center;
}
.bsp-widget .bsp-w-btn {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em;
  padding: 11px 20px; border-radius: 6px; border: none;
  cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: transform .1s, box-shadow .2s;
}
.bsp-widget .bsp-w-btn-green {
  background: var(--accent); color: #0a0c10;
}
.bsp-widget .bsp-w-btn-green:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(34, 217, 138, 0.3);
}
.bsp-widget .bsp-w-btn-ghost {
  background: transparent; color: var(--muted);
  border: 1px solid var(--border);
}
.bsp-widget .bsp-w-btn-ghost:hover {
  color: var(--text); border-color: var(--muted);
}
.bsp-widget .bsp-w-status {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--muted); margin-left: auto;
}

.bsp-widget .bsp-w-cta {
  margin-top: 24px; padding: 18px 20px;
  background: linear-gradient(135deg, rgba(34,217,138,0.06), rgba(79,127,255,0.04));
  border: 1px solid var(--border); border-radius: 10px;
  text-align: center;
}
.bsp-widget .bsp-w-cta p {
  font-size: 13px; color: var(--muted);
  margin-bottom: 14px; line-height: 1.5;
}
.bsp-widget .bsp-w-cta p strong { color: var(--text); font-weight: 600; }

@media (max-width: 560px) {
  .bsp-widget .bsp-w-field-grid,
  .bsp-widget .bsp-w-field-grid.three { grid-template-columns: 1fr; }
}

/* ── Floating compact widget variant (used by campaign template generator) ── */

.bsp-widget.bsp-widget-floating {
  background: rgba(17, 20, 32, 0.96);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0;
  margin: 32px 0;  /* inline default for mobile */
  overflow: hidden;
}

.bsp-w-float-header {
  padding: 10px 16px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.bsp-w-float-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.bsp-w-float-body {
  padding: 16px;
}

.bsp-w-float-field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.bsp-w-float-select {
  display: block;
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 5px;
  font-family: var(--font-body);
  font-size: 13px;
  margin-bottom: 12px;
  cursor: pointer;
}
.bsp-w-float-select:focus { outline: none; border-color: var(--accent); }

.bsp-widget .bsp-w-btn-block {
  display: block;
  width: 100%;
  text-align: center;
  justify-content: center;
}

.bsp-w-float-note {
  font-size: 11px;
  color: var(--muted);
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  line-height: 1.4;
}
.bsp-w-float-status {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  margin: 8px 0 0;
  min-height: 14px;
  text-align: center;
}

/* Desktop: float in upper right of the viewport, below the navbar.
   Only on viewports wide enough that the panel won't overlap the article. */
@media (min-width: 1100px) {
  .bsp-widget.bsp-widget-floating {
    position: fixed;
    top: 92px;
    right: 24px;
    width: 256px;
    margin: 0;
    z-index: 50;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
  }
}

/* ── Compact article list (replaces card grid for article-heavy sections) ── */

.article-list {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 16px;
}

.article-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background .15s ease;
}
.article-row.numbered {
  grid-template-columns: 36px 1fr auto;
}
.article-row:last-child { border-bottom: none; }
.article-row:hover { background: rgba(255, 255, 255, 0.025); }

.article-row .row-number {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  font-weight: 600;
  text-align: right;
  padding-right: 4px;
  letter-spacing: 0.02em;
}
.article-row:hover .row-number { color: var(--muted); }

.article-row .row-content { min-width: 0; }

.article-row .row-title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

/* Description hidden in list view — visible on the article page itself.
   The DOM still has it for search and SEO purposes. */
.article-row .row-desc {
  display: none;
}

.article-row .row-meta-group {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.article-row .row-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 9px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.article-row .row-arrow {
  color: var(--faint);
  font-size: 16px;
  transition: color .15s, transform .15s;
}
.article-row:hover .row-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* ── Subsections within a section ─────────────────────────────────────── */

.subsection { margin-bottom: 28px; }
.subsection:last-child { margin-bottom: 0; }

.subsection-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 4px;
  padding: 0 22px;
}

.subsection .article-list {
  border-top: 1px solid var(--border);
}

@media (max-width: 560px) {
  .article-row { padding: 12px 16px; gap: 10px; }
  .article-row.numbered { grid-template-columns: 28px 1fr auto; }
  .article-row .row-title { font-size: 14px; }
  .article-row .row-meta { display: none; }
  .subsection-title { padding: 0 16px; }
}

/* ── Zone divider (between BSP sections and the standalone bulk ops guide) ── */

.zone-divider {
  margin: 96px 0 40px;
  padding-top: 56px;
  border-top: 1px solid var(--border);
}
.zone-divider-content {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.zone-divider .zone-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.zone-divider h2 {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 16px;
  line-height: 1.2;
}
.zone-divider p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
@media (max-width: 560px) {
  .zone-divider { margin: 64px 0 32px; padding-top: 40px; }
  .zone-divider h2 { font-size: 24px; }
  .zone-divider p { font-size: 14px; }
}

/* Standalone sections have no section-header (zone divider replaces it) */
.section-block.standalone .section-header { display: none; }
