.backend-concept-demo {
  --backend-accent: #1268ff;
  --backend-cyan: #19c6c0;
  --backend-good: #28c785;
  --backend-ink: #eaf1ff;
  --backend-muted: #91a5c7;
  --backend-line: #294162;
  display: grid;
  width: min(100%, 480px);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--backend-line);
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0%, rgba(18,104,255,.22), transparent 35%),
    linear-gradient(145deg, #12233d, #071326);
  box-shadow: inset 0 1px rgba(255,255,255,.06), 0 10px 28px rgba(9,31,65,.13);
  color: var(--backend-ink);
  font: 600 11px/1.35 "DM Sans", sans-serif;
}

.backend-concept-toolbar {
  display: grid;
  min-height: 38px;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--backend-line);
  background: rgba(3,11,24,.45);
  padding: 7px 10px;
}

.backend-concept-toolbar span { display: flex; align-items: center; gap: 6px; color: #b7c9e8; font-size: 7px; font-weight: 900; letter-spacing: .1em; }
.backend-concept-toolbar span i { width: 8px; height: 8px; border: 2px solid var(--backend-cyan); border-radius: 50%; box-shadow: 0 0 0 3px rgba(25,198,192,.12); }
.backend-concept-toolbar code { min-width: 0; overflow: hidden; color: #849abc; font: 600 8px/1.3 "IBM Plex Mono", monospace; text-overflow: ellipsis; white-space: nowrap; }
.backend-concept-toolbar b { border: 1px solid #4c617f; border-radius: 99px; color: #a9b8d1; font-size: 6px; letter-spacing: .08em; padding: 4px 6px; }

.backend-concept-flow { display: grid; min-height: 112px; grid-template-columns: minmax(0,1fr) 32px minmax(0,1fr); align-items: center; gap: 5px; padding: 11px 10px; }
.backend-concept-flow section { display: grid; min-width: 0; min-height: 76px; align-content: center; gap: 5px; border: 1px solid var(--backend-line); border-radius: 8px; background: rgba(255,255,255,.035); padding: 8px; transition: border-color 180ms, background 180ms, transform 180ms; }
.backend-concept-flow small { color: var(--backend-muted); font-size: 6px; font-weight: 900; letter-spacing: .12em; }
.backend-concept-flow strong { display: -webkit-box; overflow: hidden; color: var(--backend-ink); font: 650 8px/1.35 "IBM Plex Mono", monospace; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.backend-concept-flow span { overflow: hidden; color: var(--backend-muted); font-size: 6.5px; text-overflow: ellipsis; white-space: nowrap; }
.backend-concept-pipe { position: relative; display: grid; height: 35px; place-items: center; }
.backend-concept-pipe i { width: 100%; height: 2px; overflow: hidden; border-radius: 2px; background: var(--backend-line); }
.backend-concept-pipe i::before { content: ""; display: block; width: 0; height: 100%; background: linear-gradient(90deg,var(--backend-accent),var(--backend-cyan)); transition: width 360ms ease; }
.backend-concept-pipe b { position: absolute; display: grid; width: 18px; height: 18px; place-items: center; border: 1px solid var(--backend-line); border-radius: 50%; background: #09172b; color: var(--backend-muted); font-size: 13px; transition: color 180ms, border-color 180ms, box-shadow 180ms; }

.backend-concept-demo footer { display: flex; min-height: 40px; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--backend-line); background: rgba(3,11,24,.28); padding: 6px 9px; }
.backend-concept-demo footer small { min-width: 0; overflow: hidden; color: #91a5c7; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.backend-concept-demo footer button { flex: 0 0 auto; border: 1px solid #4d76b4; border-radius: 7px; background: rgba(18,104,255,.12); color: #bbd3ff; font: 800 7px/1 "DM Sans", sans-serif; padding: 7px 8px; cursor: pointer; }
.backend-concept-demo footer button:hover { border-color: #6a9dff; background: rgba(18,104,255,.22); }
.backend-concept-demo footer button:focus-visible { outline: 2px solid #69a1ff; outline-offset: 2px; }

.backend-concept-demo.is-verified .backend-concept-pipe i::before { width: 100%; }
.backend-concept-demo.is-verified .backend-concept-pipe b { border-color: var(--backend-good); color: var(--backend-good); box-shadow: 0 0 0 4px rgba(40,199,133,.12); }
.backend-concept-demo.is-verified .backend-concept-toolbar b { border-color: var(--backend-good); color: #68e0aa; }
.backend-concept-demo.is-verified .backend-concept-flow section:last-child { border-color: var(--backend-good); background: rgba(40,199,133,.07); transform: translateX(-1px); }

.concept-card-preview .backend-concept-demo { width: 100%; }
.concept-card-preview .backend-concept-toolbar { min-height: 31px; gap: 4px; padding: 5px 6px; }
.concept-card-preview .backend-concept-toolbar code { font-size: 6px; }
.concept-card-preview .backend-concept-flow { min-height: 88px; grid-template-columns: minmax(0,1fr) 23px minmax(0,1fr); gap: 3px; padding: 7px 6px; }
.concept-card-preview .backend-concept-flow section { min-height: 62px; gap: 3px; padding: 5px; }
.concept-card-preview .backend-concept-flow strong { font-size: 6.2px; }
.concept-card-preview .backend-concept-flow span { font-size: 5.2px; }
.concept-card-preview .backend-concept-demo footer { min-height: 33px; padding: 5px 6px; }
.concept-card-preview .backend-concept-demo footer small { max-width: 92px; font-size: 5.8px; }
.concept-card-preview .backend-concept-demo footer button { max-width: 86px; overflow: hidden; font-size: 6px; padding: 6px; text-overflow: ellipsis; white-space: nowrap; }

[data-theme="dark"] .backend-concept-demo { border-color: #314967; }

@media (max-width: 560px) {
  .backend-concept-demo { width: 100%; }
  .backend-concept-flow { grid-template-columns: minmax(0,1fr) 28px minmax(0,1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .backend-concept-pipe i::before,
  .backend-concept-pipe b,
  .backend-concept-flow section { transition: none; }
}

@media (forced-colors: active) {
  .backend-concept-demo,
  .backend-concept-flow section,
  .backend-concept-demo footer button,
  .backend-concept-pipe b { border: 1px solid CanvasText; }
}
