/* Article chrome injected by the build into every article document.
   Articles keep their own body styling — chrome uses a fixed dark top bar
   plus neutral translucent surfaces that adapt to any article palette.
   All classes are bc-prefixed to avoid collisions with article styles. */

.bc-topbar {
  background: #0f172a;
  color: #e2e8f0;
  border-bottom: 1px solid rgba(128,128,128,0.3);
  height: 3em; padding: 0 1.5rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: nowrap;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  position: sticky; top: 0; z-index: 40;
}
.bc-topbar .bc-brand, .bc-topbar nav { white-space: nowrap; }
.bc-topbar nav { overflow-x: auto; }
.bc-topbar a { color: inherit; text-decoration: none; }
.bc-topbar .bc-brand { font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; }
@keyframes bc-playh {
  from { background-position: 0 0; }
  to { background-position: -24em 0; }
}
.bc-mesh64 {
  width: 1.7em; height: 1.7em;
  background-image: url('/images/jpc_icon_crystal64x64x13x1.png');
  background-size: 22.1em 1.7em;
  animation: bc-playh 3s steps(12) infinite alternate-reverse;
  display: inline-flex; margin-right: 0.25em; position: relative; top: 0.05em;
}
.bc-topbar .bc-crumb { font-size: 0.78rem; color: #64748b; }
.bc-topbar .bc-crumb a { color: #94a3b8; }
.bc-topbar .bc-crumb a:hover { color: #fff; }
.bc-topbar nav { margin-left: auto; display: flex; gap: 0.5rem; font-size: 0.875rem; }
.bc-topbar nav a { color: #fff; font-weight: 500; padding: 0.5rem 0.75rem; border-radius: 0.375rem; }
.bc-topbar nav a:hover { color: #60a5fa; background: rgba(51,65,85,0.5); }

.bc-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, #60a5fa, #a78bfa); z-index: 50;
}

.bc-layout {
  display: grid; grid-template-columns: 1fr; gap: 2rem;
  max-width: 72rem; margin: 0 auto;
}
@media (min-width: 64rem) {
  .bc-layout { grid-template-columns: 14rem 1fr; padding: 0 1.5rem; }
}

.bc-toc { display: none; }
@media (min-width: 64rem) {
  .bc-toc {
    display: block; position: sticky; top: 4.5rem; align-self: start;
    font-size: 0.8rem; max-height: 75vh; overflow: auto; padding-top: 1rem;
    font-family: ui-sans-serif, system-ui, sans-serif;
  }
}
.bc-toc .bc-toc-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.55; margin-bottom: 0.6rem; }
.bc-toc ul { list-style: none; }
.bc-toc li { margin: 0.3rem 0; }
.bc-toc a { color: inherit; opacity: 0.65; text-decoration: none; border-left: 2px solid rgba(128,128,128,0.35); padding-left: 0.6rem; display: block; }
.bc-toc a:hover { opacity: 1; }
.bc-toc a.bc-here { opacity: 1; border-left-color: #60a5fa; }
.bc-toc li.bc-sub { padding-left: 0.9rem; }

.bc-meta {
  font-size: 0.8rem; opacity: 0.65; display: flex; flex-wrap: wrap;
  gap: 0.35rem 0.9rem; margin-bottom: 1.5rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
}
.bc-meta .bc-aud { color: #a78bfa; opacity: 1; }

.bc-inline-sub {
  margin: 2.2rem 0; padding: 1.1rem 1.25rem;
  border: 1px solid rgba(128,128,128,0.3); border-left: 3px solid #60a5fa;
  border-radius: 0.5rem; background: rgba(128,128,128,0.08);
  font-family: ui-sans-serif, system-ui, sans-serif;
}
.bc-inline-sub .t { font-weight: 600; font-size: 0.95rem; }
.bc-inline-sub .d { font-size: 0.82rem; opacity: 0.7; margin: 0.2rem 0 0.7rem; }
.bc-inline-sub form { display: flex; gap: 0.5rem; }
.bc-inline-sub input {
  flex: 1; border: 1px solid rgba(128,128,128,0.4); border-radius: 0.35rem;
  padding: 0.45rem 0.7rem; font-size: 0.85rem;
  background: rgba(255,255,255,0.06); color: inherit;
}
.bc-inline-sub button {
  background: linear-gradient(90deg, #60a5fa, #a78bfa);
  border: 0; border-radius: 0.35rem; color: #0f172a; font-weight: 700;
  padding: 0.45rem 0.9rem; font-size: 0.8rem; cursor: pointer;
}

.bc-sharebar {
  display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 2.5rem 0 0;
  font-family: ui-sans-serif, system-ui, sans-serif;
}
.bc-sharebar button, .bc-sharebar a {
  border: 1px solid rgba(128,128,128,0.4); border-radius: 999px;
  background: rgba(128,128,128,0.1); color: inherit;
  font-size: 0.78rem; padding: 0.4rem 0.9rem; cursor: pointer; text-decoration: none;
  opacity: 0.8;
}
.bc-sharebar button:hover, .bc-sharebar a:hover { opacity: 1; border-color: #60a5fa; }

.bc-variants { margin-top: 1.75rem; font-size: 0.8rem; opacity: 0.7; font-family: ui-sans-serif, system-ui, sans-serif; }
.bc-variants a { color: inherit; border-bottom: 1px dotted rgba(128,128,128,0.6); text-decoration: none; }
.bc-variants a:hover { border-bottom-color: #60a5fa; }

.bc-next { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(128,128,128,0.3); font-family: ui-sans-serif, system-ui, sans-serif; }
.bc-next .n-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.55; margin-bottom: 0.9rem; }
.bc-next a.n-item {
  display: block; padding: 0.8rem 1rem; margin-bottom: 0.6rem;
  border: 1px solid rgba(128,128,128,0.3); border-radius: 0.55rem;
  text-decoration: none; color: inherit; background: rgba(128,128,128,0.06);
}
.bc-next a.n-item:hover { border-color: #60a5fa; }
.bc-next .n-title { font-weight: 600; font-size: 0.95rem; }
.bc-next .n-why { font-size: 0.78rem; opacity: 0.6; margin-top: 0.15rem; }
.bc-next .n-why em { font-style: normal; color: #a78bfa; }

.bc-footer {
  margin-top: 3rem; padding: 1.5rem;
  border-top: 1px solid rgba(128,128,128,0.3);
  font-size: 0.78rem; opacity: 0.6;
  display: flex; gap: 1rem; flex-wrap: wrap;
  font-family: ui-sans-serif, system-ui, sans-serif;
}
.bc-footer a { color: inherit; }
.bc-footer span:last-child { margin-left: auto; }
