/* ─────────────────────────────────────────────────────────────────
   OrcaScale Blog — full-width white reading surface with its own
   left sidebar (related/category nav). The dark OrcaScale system
   shell is intentionally NOT loaded on /blog routes — instead a
   slim white top bar with an "Explore OrcaScale" grid menu (the
   same modules the rest of the site has) gives access to the core
   nav. Click the OrcaScale logo / Home → goes back to the main
   landing page (where the dark sidebar shell lives).
   ───────────────────────────────────────────────────────────────── */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: #0f0f10;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* `hidden` attribute must always win over later `display` rules — see
   docs/hidden-overlay-audit.md. */
[hidden] { display: none !important; }

body.bz-body {
  min-height: 100vh;
  background: #ffffff;
  /* Native cursor — always visible on white. Pointer for clickables added below. */
  cursor: default;
}

a, button, [role="button"] { cursor: pointer; }
input, textarea, [contenteditable="true"] { cursor: text; }

a { color: inherit; }

img { max-width: 100%; height: auto; display: block; }

/* ─────────────────────────────────────────────────────────────────
   TOP BAR — slim, white, sticky. Brand → /, "Explore OrcaScale"
   button on the right opens the OrcaScale grid popup (same idea
   as the main site's mobile menu).
   ───────────────────────────────────────────────────────────────── */
.bz-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  height: 60px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid #ececec;
}

.bz-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #0f0f10;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.bz-brand img { width: 22px; height: 22px; border-radius: 5px; }
.bz-brand span { display: inline-block; }
.bz-brand:hover { color: #0a8a8c; }

.bz-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #888;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.bz-crumb a {
  color: #555;
  text-decoration: none;
  transition: color .15s;
}
.bz-crumb a:hover { color: #0a8a8c; }
.bz-crumb-sep { color: #ccc; }

.bz-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.bz-link {
  font-size: 13px;
  font-weight: 500;
  color: #555;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all .15s;
}
.bz-link:hover { color: #0f0f10; background: #f5f5f5; }

.bz-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #0f0f10;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: all .15s;
}
.bz-menu-trigger svg { width: 16px; height: 16px; color: #6EE7FF; }
.bz-menu-trigger:hover { background: #1f1f22; transform: translateY(-1px); }
.bz-menu-trigger[aria-expanded="true"] { background: #00C5C8; color: #0f0f10; }
.bz-menu-trigger[aria-expanded="true"] svg { color: #0f0f10; }

@media (max-width: 760px) {
  .bz-topbar { padding: 0 14px; gap: 10px; height: 56px; }
  .bz-link { display: none; }
  .bz-menu-trigger span { display: none; }
  .bz-menu-trigger { padding: 8px 10px; }
  .bz-crumb { font-size: 10.5px; }
}

/* ─────────────────────────────────────────────────────────────────
   LAYOUT — sidebar + main, no max-width on the outer wrapper so
   the page takes the full screen width.
   ───────────────────────────────────────────────────────────────── */
.bz-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  width: 100%;
  align-items: start;
}

/* Mobile sidebar trigger (only shows < 960px) */
.bz-side-toggle {
  display: none;
  position: sticky;
  top: 60px;
  z-index: 60;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: #ffffff;
  border: none;
  border-bottom: 1px solid #ececec;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #0f0f10;
  text-align: left;
}
.bz-side-toggle svg { width: 18px; height: 18px; color: #00C5C8; }
.bz-side-toggle[aria-expanded="true"] { background: #fafafa; }

/* Mobile sidebar backdrop — covers content when drawer is open */
.bz-side-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(15, 15, 16, .35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

/* ─────────────────────────────────────────────────────────────────
   SIDEBAR — sticky, scrolls within itself
   ───────────────────────────────────────────────────────────────── */
.bz-sidebar {
  position: sticky;
  top: 60px;
  align-self: start;
  height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 28px 22px 32px;
  border-right: 1px solid #ececec;
  background: #fafafa;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}
.bz-sidebar::-webkit-scrollbar { width: 6px; }
.bz-sidebar::-webkit-scrollbar-thumb { background: #d4d4d4; border-radius: 3px; }
.bz-sidebar::-webkit-scrollbar-thumb:hover { background: #aaa; }

.bz-side-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #555;
  text-decoration: none;
  padding: 8px 10px;
  margin: -8px -10px 22px;
  border-radius: 8px;
  transition: all .15s;
}
.bz-side-back svg { width: 14px; height: 14px; }
.bz-side-back:hover { background: #fff; color: #00b0b3; }

.bz-side-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 4px 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid #ececec;
}
.bz-side-eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #0a8a8c;
}
.bz-side-count {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: #0f0f10;
}

.bz-side-section {
  margin-bottom: 26px;
}
.bz-side-section h3 {
  margin: 0 0 10px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #888;
  padding: 0 4px;
}
.bz-side-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.bz-side-section li { margin: 0; }

.bz-side-current ul a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  text-decoration: none;
  color: #444;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  transition: all .15s;
}
.bz-side-current ul a:hover {
  background: #fff;
  color: #0f0f10;
}
.bz-side-current .bz-side-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #d4d4d4;
  margin-top: 7px;
  flex-shrink: 0;
  transition: background .15s;
}
.bz-side-current ul a:hover .bz-side-dot { background: #00C5C8; }
.bz-side-current ul a.bz-current {
  background: #fff;
  color: #0f0f10;
  font-weight: 600;
  box-shadow: 0 0 0 1px #ececec, 0 1px 2px rgba(0,0,0,.04);
}
.bz-side-current ul a.bz-current .bz-side-dot {
  background: #00C5C8;
  box-shadow: 0 0 0 3px rgba(0,197,200,.15);
}

.bz-side-cats a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  text-decoration: none;
  color: #444;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  transition: all .15s;
}
.bz-side-cats a:hover {
  background: #fff;
  color: #0f0f10;
}
.bz-side-cat-count {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  color: #aaa;
}
.bz-side-cats a:hover .bz-side-cat-count { color: #00C5C8; }

.bz-side-cta {
  margin-top: 32px;
  padding: 18px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 12px;
}
.bz-side-cta h3 {
  margin: 0 0 6px;
  padding: 0;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: #0f0f10;
  text-transform: none;
  letter-spacing: -0.01em;
}
.bz-side-cta p {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.45;
  color: #666;
}

.bz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s;
}
.bz-btn-block { display: flex; width: 100%; }
.bz-btn-block + .bz-btn-block { margin-top: 8px; }
.bz-btn-primary {
  background: #00C5C8;
  color: #0f0f10;
}
.bz-btn-primary:hover {
  background: #0f0f10;
  color: #fff;
  transform: translateY(-1px);
}
.bz-btn-secondary {
  background: transparent;
  color: #0f0f10;
  border: 1px solid #d4d4d4;
}
.bz-btn-secondary:hover { border-color: #0f0f10; background: #fafafa; }

/* ─────────────────────────────────────────────────────────────────
   MAIN CONTENT
   ───────────────────────────────────────────────────────────────── */
.bz-main {
  min-width: 0;
  padding: 48px clamp(20px, 4vw, 56px) 80px;
  background: #ffffff;
}

/* ── Index hero ─────────────────────────────────────────────── */
.blog-hero {
  max-width: 760px;
  margin: 0 0 56px;
}
.blog-hero-eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #0a8a8c;
  background: rgba(0,197,200,.08);
  border: 1px solid rgba(0,197,200,.25);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.blog-hero h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: #0f0f10;
  margin: 0 0 18px;
}
.blog-hero-lede {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: #555;
  max-width: 640px;
  margin: 0 0 28px;
}

.blog-search {
  position: relative;
  max-width: 480px;
}
.blog-search input {
  width: 100%;
  padding: 14px 18px 14px 44px;
  font-family: inherit;
  font-size: 15px;
  border: 1.5px solid #e5e5e5;
  border-radius: 12px;
  background: #fafafa;
  color: #0f0f10;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.blog-search input:focus {
  outline: none;
  border-color: #00C5C8;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(0,197,200,.12);
}
.blog-search input::placeholder { color: #999; }
.blog-search-icon {
  position: absolute;
  left: 16px; top: 50%; transform: translateY(-50%);
  color: #999;
  font-size: 18px;
  pointer-events: none;
}

/* ── Featured strip ─────────────────────────────────────────── */
.blog-featured {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 64px;
}
@media (max-width: 1100px) { .blog-featured { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .blog-featured { grid-template-columns: 1fr; } }

.blog-feature {
  display: block;
  text-decoration: none;
  color: #fff;
  background: #0f0f10;
  border-radius: 16px;
  padding: 28px 26px;
  transition: transform .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}
.blog-feature::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at top right, rgba(0,197,200,.18) 0%, transparent 60%);
  pointer-events: none;
}
.blog-feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0,0,0,.2);
}
.blog-feature-cat {
  display: inline-block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #6EE7FF;
  margin-bottom: 14px;
  position: relative;
}
.blog-feature h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 10px;
  position: relative;
  color: #fff;
}
.blog-feature p {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255,255,255,.72);
  margin: 0;
  position: relative;
}

/* ── Post grid ──────────────────────────────────────────────── */
.blog-categories { max-width: 1320px; }

.blog-cat {
  margin-bottom: 56px;
  scroll-margin-top: 80px;
}

.blog-cat-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid #ececec;
}
.blog-cat-head h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #0f0f10;
  margin: 0;
}
.blog-cat-count {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: #999;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.blog-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px 22px 20px;
  background: #ffffff;
  border: 1px solid #ececec;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: all .18s ease;
}
.blog-card:hover {
  border-color: #00C5C8;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,.05), 0 0 0 1px rgba(0,197,200,.08);
}
.blog-card-cat {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #0a8a8c;
  margin-bottom: 12px;
}
.blog-card-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 19px;
  line-height: 1.25;
  font-weight: 600;
  color: #0f0f10;
  margin: 0 0 10px;
}
.blog-card-desc {
  font-size: 14px;
  line-height: 1.55;
  color: #555;
  margin: 0 0 16px;
  flex: 1;
}
.blog-card-cta {
  font-size: 13px;
  font-weight: 600;
  color: #0a8a8c;
}
.blog-card:hover .blog-card-cta { color: #00b0b3; }

.blog-empty {
  text-align: center;
  padding: 60px 20px;
  color: #888;
  font-size: 16px;
}

/* ─────────────────────────────────────────────────────────────────
   ARTICLE PAGE
   ───────────────────────────────────────────────────────────────── */
.blog-article {
  max-width: 760px;
  margin: 0 auto;
}

.blog-crumbs {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.blog-crumbs a { color: #555; text-decoration: none; transition: color .15s; }
.blog-crumbs a:hover { color: #00b0b3; }

.blog-article-head { margin-bottom: 40px; }

.blog-article-cat {
  display: inline-block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #0a8a8c;
  background: rgba(0,197,200,.08);
  border: 1px solid rgba(0,197,200,.2);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.blog-article h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: #0f0f10;
  margin: 0 0 18px;
}

.blog-article-lede {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.45;
  color: #4a4a4a;
  margin: 0 0 24px;
  font-weight: 400;
}

.blog-article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #888;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: .04em;
  padding-top: 20px;
  border-top: 1px solid #ececec;
}
.blog-meta-dot { color: #ccc; }

/* Body — the reading area */
.blog-article-body {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 19px;
  line-height: 1.75;
  color: #1a1a1a;
}
.blog-article-body > * + * { margin-top: 1.4em; }
.blog-article-body h2 {
  font-family: 'Inter', sans-serif;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0f0f10;
  margin-top: 2em;
  margin-bottom: 0.4em;
  scroll-margin-top: 80px;
}
.blog-article-body h3 {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #0f0f10;
  margin-top: 1.8em;
  margin-bottom: 0.4em;
}
.blog-article-body p { margin: 1em 0; }
.blog-article-body strong { font-weight: 700; color: #0f0f10; }
.blog-article-body em { font-style: italic; }
.blog-article-body a {
  color: #0a8a8c;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(0,197,200,.4);
  transition: color .15s, text-decoration-color .15s;
}
.blog-article-body a:hover {
  color: #00b0b3;
  text-decoration-color: #00C5C8;
}
.blog-article-body ul,
.blog-article-body ol { padding-left: 1.4em; margin: 1.2em 0; }
.blog-article-body li { margin-bottom: 0.5em; }
.blog-article-body blockquote {
  border-left: 3px solid #00C5C8;
  padding: 4px 0 4px 22px;
  margin: 1.6em 0;
  color: #555;
  font-style: italic;
}
.blog-article-body code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .9em;
  background: #f3f3f3;
  padding: 2px 6px;
  border-radius: 4px;
  color: #0f0f10;
}
.blog-article-body pre {
  background: #0f0f10;
  color: #eaf2fb;
  padding: 18px 22px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 14px;
}
.blog-article-body pre code { background: transparent; padding: 0; color: inherit; }
.blog-article-body hr {
  border: none;
  height: 1px;
  background: #ececec;
  margin: 2.4em 0;
}

/* ── CTA card ───────────────────────────────────────────────── */
.blog-cta-card {
  margin-top: 56px;
  padding: 36px clamp(24px, 4vw, 44px);
  background: #0f0f10;
  border-radius: 18px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.blog-cta-card::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at top right, rgba(0,197,200,.22) 0%, transparent 65%);
  pointer-events: none;
}
.blog-cta-card h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 12px;
  color: #fff;
  position: relative;
}
.blog-cta-card p {
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255,255,255,.78);
  margin: 0 0 22px;
  max-width: 540px;
  position: relative;
}
.blog-cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
}
.blog-cta-card .blog-btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s;
}
.blog-btn-primary { background: #00C5C8; color: #0f0f10; }
.blog-btn-primary:hover { background: #6EE7FF; transform: translateY(-1px); }
.blog-btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
}
.blog-btn-secondary:hover { border-color: #fff; background: rgba(255,255,255,.06); }

/* ── Related ────────────────────────────────────────────────── */
.blog-related {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid #ececec;
}
.blog-related h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 20px;
  color: #0f0f10;
}
.blog-related ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.blog-related a {
  display: block;
  padding: 18px 20px;
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all .15s;
}
.blog-related a:hover {
  border-color: #00C5C8;
  background: #fff;
  transform: translateX(2px);
}
.blog-related-cat {
  display: block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #0a8a8c;
  margin-bottom: 6px;
}
.blog-related-title {
  display: block;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  color: #0f0f10;
  margin-bottom: 4px;
  line-height: 1.3;
}
.blog-related-desc {
  display: block;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

/* ── Prev/Next ──────────────────────────────────────────────── */
.blog-prevnext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 32px;
}
.blog-prev, .blog-next {
  display: block;
  padding: 18px 20px;
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all .15s;
}
.blog-next { text-align: right; }
.blog-prev:hover, .blog-next:hover { border-color: #00C5C8; background: #fff; }
.blog-pn-label {
  display: block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 6px;
}
.blog-pn-title {
  display: block;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: #0f0f10;
  line-height: 1.3;
}

/* ─────────────────────────────────────────────────────────────────
   GRID MENU POPUP — opens when "Explore OrcaScale" is clicked.
   Native <dialog> element. Closed state is handled by the browser
   (display:none on a closed dialog), so no [hidden] / .open class
   gating is needed. Backdrop scrim is provided by ::backdrop, focus
   trap / Esc / return-focus / inert background are all native.
   ───────────────────────────────────────────────────────────────── */
.bz-grid-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  margin: 0;
  border: 0;
  padding: 80px 20px 40px;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  background: transparent;
  color: inherit;
  overflow: auto;
  /* Keep the dialog in the top layer while the close animation plays */
  transition:
    overlay .25s ease allow-discrete,
    display .25s ease allow-discrete;
}
.bz-grid-menu[open] {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.bz-grid-menu::backdrop {
  background: rgba(15, 15, 16, 0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  transition:
    background .25s ease,
    backdrop-filter .25s ease,
    -webkit-backdrop-filter .25s ease,
    overlay .25s ease allow-discrete,
    display .25s ease allow-discrete;
}
.bz-grid-menu[open]::backdrop {
  background: rgba(15, 15, 16, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
/* Fade the scrim in from transparent on first paint */
@starting-style {
  .bz-grid-menu[open]::backdrop {
    background: rgba(15, 15, 16, 0);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
  }
}
/* Lock body scroll while the dialog is open without needing a body class */
html:has(.bz-grid-menu[open]) { overflow: hidden; }

.bz-grid-inner {
  width: 100%;
  max-width: 720px;
  background: #ffffff;
  border-radius: 20px;
  padding: 28px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, .3),
    0 0 0 1px rgba(0, 0, 0, .06);
  /* Closed state — also used as the slide-out target on close */
  transform: translateY(-12px);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
}
.bz-grid-menu[open] .bz-grid-inner {
  transform: translateY(0);
  opacity: 1;
}
/* Slide-in entry animation using @starting-style */
@starting-style {
  .bz-grid-menu[open] .bz-grid-inner {
    transform: translateY(-12px);
    opacity: 0;
  }
}

.bz-grid-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.bz-grid-close {
  background: transparent;
  border: 1px solid #ececec;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 16px;
  color: #555;
  transition: all .15s;
}
.bz-grid-close:hover { background: #f5f5f5; color: #0f0f10; border-color: #d4d4d4; }

.bz-grid-eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #0a8a8c;
  margin: 0 0 16px;
}

.bz-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 560px) { .bz-grid { grid-template-columns: repeat(2, 1fr); } }

.bz-grid-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 18px 16px;
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: 14px;
  text-decoration: none;
  color: #0f0f10;
  transition: all .15s;
  position: relative;
}
.bz-grid-tile:hover {
  background: #ffffff;
  border-color: #00C5C8;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.05);
}
.bz-grid-tile svg {
  width: 22px; height: 22px;
  color: #00C5C8;
  margin-bottom: 4px;
}
.bz-tile-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.bz-tile-meta {
  position: absolute;
  top: 14px; right: 14px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  color: #aaa;
  letter-spacing: .08em;
}

.bz-grid-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #ececec;
}
.bz-grid-cta .bz-btn { width: 100%; padding: 12px 16px; font-size: 13px; }
@media (max-width: 560px) { .bz-grid-cta { grid-template-columns: 1fr; } }

/* ─────────────────────────────────────────────────────────────────
   RESPONSIVE — collapse sidebar below 960px
   ───────────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .bz-layout { grid-template-columns: 1fr; }

  .bz-side-toggle { display: flex; }

  .bz-sidebar {
    position: fixed;
    top: 0; left: 0;
    width: min(320px, 88vw);
    height: 100vh;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform .25s ease;
    border-right: 1px solid #ececec;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0);
    padding-top: 28px;
  }
  .bz-sidebar.bz-side-open {
    transform: translateX(0);
    box-shadow: 0 0 40px rgba(0, 0, 0, .15);
  }
  .bz-side-backdrop { display: block; }
  body.bz-side-open .bz-side-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 700px) {
  .bz-main { padding: 32px 18px 60px; }
  .blog-article-body { font-size: 17px; line-height: 1.7; }
  .blog-article-body h2 { font-size: 22px; }
  .blog-article-body h3 { font-size: 18px; }
  .blog-prevnext { grid-template-columns: 1fr; }
  .blog-next { text-align: left; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-hero h1 { font-size: 36px; }
  .blog-cat-head h2 { font-size: 22px; }
}

/* ── Social share buttons ────────────────────────────────────────────────── */
/* Two placements per post:
     1. .blog-article-head .blog-share — compact, sits under the meta line
     2. .blog-share-bottom .blog-share — prominent, after the article body
   Buttons brand-coloured on hover, accessible focus rings, no external icons. */

.blog-share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}
.blog-share-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6b7280;
  margin-right: 4px;
}
.blog-share-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #4b5563;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, color .15s ease, border-color .15s ease,
              background .15s ease, box-shadow .15s ease;
}
.blog-share-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}
.blog-share-btn:focus-visible {
  outline: 2px solid #00C5C8;
  outline-offset: 2px;
}
.blog-share-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}

/* Brand-tinted hover states */
.blog-share-x:hover  { color: #fff; background: #000;     border-color: #000;     }
.blog-share-li:hover { color: #fff; background: #0A66C2;  border-color: #0A66C2;  }
.blog-share-fb:hover { color: #fff; background: #1877F2;  border-color: #1877F2;  }
.blog-share-wa:hover { color: #fff; background: #25D366;  border-color: #25D366;  }
.blog-share-em:hover { color: #fff; background: #6b7280;  border-color: #6b7280;  }
.blog-share-cp:hover { color: #fff; background: #00C5C8;  border-color: #00C5C8;  }
.blog-share-cp.is-copied {
  color: #fff;
  background: #16a34a;
  border-color: #16a34a;
}

/* Copy-link button has two icons (link / check); CSS swaps them on .is-copied */
.blog-share-cp .blog-share-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.blog-share-cp .blog-share-ico-done    { display: none; }
.blog-share-cp.is-copied .blog-share-ico-default { display: none; }
.blog-share-cp.is-copied .blog-share-ico-done    { display: inline-flex; }

/* Tiny "Copied" toast that pops out of the copy-link button */
.blog-share-toast {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity .15s ease, transform .15s ease;
}
.blog-share-cp.is-copied .blog-share-toast {
  opacity: 1;
  transform: translate(-50%, 0);
}
.blog-share-toast::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #111827;
}

/* Bottom placement — a card before "Keep reading" */
.blog-share-bottom {
  margin: 32px 0 0;
  padding: 22px 24px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  text-align: center;
}
.blog-share-bottom h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -.01em;
}
.blog-share-bottom .blog-share {
  justify-content: center;
  margin: 0;
}
.blog-share-bottom .blog-share-label { display: none; }
.blog-share-bottom .blog-share-btn {
  width: 44px;
  height: 44px;
}
.blog-share-bottom .blog-share-btn svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 540px) {
  .blog-share { gap: 6px; }
  .blog-share-btn { width: 36px; height: 36px; }
  .blog-share-bottom { padding: 18px 16px; }
  .blog-share-bottom .blog-share-btn { width: 40px; height: 40px; }
}
