#motor {
  background: var(--ink); color: #fff; border-top: none;
}
#motor .sec-h              { border-bottom-color: rgba(255,255,255,.15); }
#motor .sec-h::before      { background: var(--c-n); }
#motor .sec-h h2           { color: #fff; }
#motor .sec-h h2 em        { color: var(--c-n); }
#motor .sec-tag,
#motor .sec-note           { color: #555; }

/* IO panel */
.motor-io {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0; border: 1px solid rgba(255,255,255,.1);
  border-radius: 22px; overflow: hidden; margin-bottom: 48px;
  background: rgba(255,255,255,.03);
}
.motor-in  { padding: 40px 44px; border-right: 1px solid rgba(255,255,255,.08); }
.motor-out { padding: 40px 44px; }

.m-label {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: .18em; text-transform: uppercase; color: #444;
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.m-label-dot      { width: 6px; height: 6px; border-radius: 50%; background: #444; }
.m-label-dot.live { background: var(--c-n); box-shadow: 0 0 8px var(--c-n); }

.m-query {
  font-family: 'Fraunces', serif; font-style: italic;
  font-size: 26px; line-height: 1.3; color: #fff; letter-spacing: -.01em;
}

.m-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.m-chip {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  letter-spacing: .04em; padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.15); color: #777;
  opacity: 0; transform: translateX(10px);
  transition: opacity .45s ease, transform .45s ease;
}
.m-chip.lit { background: var(--c-n); color: var(--ink); border-color: var(--c-n); }
.m-chip.in  { opacity: 1; transform: none; }

/* Process steps */
.motor-steps {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 0; border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px; overflow: hidden;
}
.mstep {
  padding: 32px 26px; border-right: 1px solid rgba(255,255,255,.06);
  transition: background .5s;
}
.mstep:last-child { border-right: none; }
.mstep.active { background: rgba(200,255,30,.07); }

.mstep-icon {
  width: 48px; height: 48px; border-radius: 13px;
  background: rgba(255,255,255,.06); margin-bottom: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: background .4s, box-shadow .4s;
}
.mstep.active .mstep-icon {
  background: var(--c-n);
  box-shadow: 0 0 18px rgba(200,255,30,.3);
}
.mstep-icon svg { width: 24px; height: 24px; }
.mstep.active .mstep-icon svg path,
.mstep.active .mstep-icon svg circle,
.mstep.active .mstep-icon svg rect,
.mstep.active .mstep-icon svg line,
.mstep.active .mstep-icon svg polyline { stroke: #000; }

.mstep-verb {
  font-family: 'Fraunces', serif; font-style: italic;
  font-size: 28px; color: #fff; letter-spacing: -.02em;
  line-height: 1; margin-bottom: 8px;
}
.mstep-sub {
  font-size: 12px; color: #555; line-height: 1.5;
  font-family: 'JetBrains Mono', monospace;
}

@media(max-width:860px) {
  .motor-io { grid-template-columns: 1fr; }
  .motor-in { border-right: none; border-bottom: 1px solid rgba(255,255,255,.08); }
  .motor-steps { grid-template-columns: 1fr 1fr; }
}

@media(max-width:520px) {
  .motor-io { border-radius: 18px; margin-bottom: 32px; }
  .motor-in, .motor-out { padding: 28px 22px; }
  .m-query { font-size: 20px; }
  .m-chip { font-size: 11px; padding: 7px 11px; }

  .motor-steps { border-radius: 14px; }
  .mstep { padding: 24px 18px; border-right: none; border-bottom: 1px solid rgba(255,255,255,.06); }
  .mstep:nth-child(2) { border-right: none; }
  .mstep:last-child { border-bottom: none; }
  .mstep-verb { font-size: 22px; }
  .mstep-icon { width: 40px; height: 40px; margin-bottom: 14px; }
}

@media(max-width:420px) {
  .motor-steps { grid-template-columns: 1fr; }
}
